From 159d630a3d539baad3b1980a2149ce8a4604bb71 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Tue, 14 Mar 2023 17:53:43 -0700 Subject: [PATCH] report: record xfs-specific information about a test run Report various XFS-specific information about a test run. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Signed-off-by: Zorro Lang --- common/report | 3 +++ common/xfs | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/common/report b/common/report index af3c04db..86274af8 100644 --- a/common/report +++ b/common/report @@ -64,6 +64,9 @@ __generate_report_vars() { __generate_blockdev_report_vars "TEST_DEV" __generate_blockdev_report_vars "SCRATCH_DEV" + # Add per-filesystem variables to the report variable list + test "$FSTYP" = "xfs" && __generate_xfs_report_vars + # Optional environmental variables for varname in "${REPORT_ENV_LIST_OPT[@]}"; do test -n "${!varname}" && REPORT_VARS["${varname}"]="${!varname}" diff --git a/common/xfs b/common/xfs index e679af82..e8e4832c 100644 --- a/common/xfs +++ b/common/xfs @@ -2,6 +2,17 @@ # XFS specific common functions. # +__generate_xfs_report_vars() { + __generate_blockdev_report_vars TEST_RTDEV + __generate_blockdev_report_vars TEST_LOGDEV + __generate_blockdev_report_vars SCRATCH_RTDEV + __generate_blockdev_report_vars SCRATCH_LOGDEV + + REPORT_VARS["XFS_ALWAYS_COW"]="$(cat /sys/fs/xfs/debug/always_cow 2>/dev/null)" + REPORT_VARS["XFS_LARP"]="$(cat /sys/fs/xfs/debug/larp 2>/dev/null)" + REPORT_ENV_LIST_OPT+=("TEST_XFS_REPAIR_REBUILD" "TEST_XFS_SCRUB_REBUILD") +} + _setup_large_xfs_fs() { fs_size=$1 -- 2.39.5