]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
report: record xfs-specific information about a test run
authorDarrick J. Wong <djwong@kernel.org>
Wed, 15 Mar 2023 00:53:43 +0000 (17:53 -0700)
committerZorro Lang <zlang@kernel.org>
Sun, 26 Mar 2023 14:08:33 +0000 (22:08 +0800)
Report various XFS-specific information about a test run.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/report
common/xfs

index af3c04db56c58bd874921f3459952e93d7cd4f68..86274af887e88e7e31a001f757d9b7321ba09479 100644 (file)
@@ -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}"
index e679af824fb82e91dfce2135fca357ea03fdd14c..e8e4832cea79ae24bb592dbfc9f086c7ac7dc923 100644 (file)
@@ -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