From 55a4357424c5206910928f27f66db62465581150 Mon Sep 17 00:00:00 2001 From: Wang Shilong Date: Mon, 28 Sep 2020 14:55:14 +0800 Subject: [PATCH] LU-8465 tests: enable pfsck if possible To test pfsck widely, try enable pfsck by default for Lustre tests. Signed-off-by: Wang Shilong Change-Id: I271422cf9d1f9cd0cc25c228c1f2df003e4f73f9 Reviewed-on: https://review.whamcloud.com/40070 Reviewed-by: Andreas Dilger Tested-by: jenkins Reviewed-by: Jian Yu Tested-by: Maloo --- lustre/tests/mmp.sh | 7 ++++--- lustre/tests/test-framework.sh | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lustre/tests/mmp.sh b/lustre/tests/mmp.sh index 1db6ff4..a4997ed 100755 --- a/lustre/tests/mmp.sh +++ b/lustre/tests/mmp.sh @@ -407,11 +407,12 @@ mount_after_reboot() { # Run e2fsck on the Lustre server target. run_e2fsck() { local facet=$1 - shift - local device=$1 - shift + local device=$2 + shift 2 local opts="$@" + # turn on pfsck if it is supported + do_facet $facet $E2FSCK -h 2>&1 | grep -qw -- -m && opts+=" -m8" echo "Running e2fsck on the device $device on $facet..." do_facet $facet "$E2FSCK $opts $device" return ${PIPESTATUS[0]} diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 69e0801..c8e5d45 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -5587,6 +5587,8 @@ run_e2fsck() { local log=$TMP/e2fsck.log local rc=0 + # turn on pfsck if it is supported + do_node $node $E2FSCK -h 2>&1 | grep -qw -- -m && cmd+=" -m8" echo $cmd do_node $node $cmd 2>&1 | tee $log rc=${PIPESTATUS[0]} -- 1.8.3.1