From 6884b8af231c2c39f60eae44ebbd32e82ca5ca91 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Tue, 20 Jun 2023 12:57:56 -0600 Subject: [PATCH] LU-16804 tests: rename 'complete' to 'complete_test' The test-framework.sh "complete" function conflicts with "complete" exported from bash_completion, and this causes lustre-initialization to fail in some configurations now that the lustre test config is loaded earlier during test-framework.sh init_test_env() setup. Rename "complete" to "complete_test" to avoid this conflict. Test-Parameters: trivial Fixes: fdbb2bc849 ("LU-16804 tests: load CONFIG at beginning of init_test_env") Signed-off-by: Andreas Dilger Change-Id: Ic72d8d5cc4a65feec6bfb2a76ac5f9b9d78e3f75 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51383 Tested-by: Oleg Drokin Reviewed-by: Oleg Drokin --- lustre/tests/conf-sanity.sh | 2 +- lustre/tests/dne_sanity.sh | 2 +- lustre/tests/dom-performance.sh | 2 +- lustre/tests/insanity.sh | 2 +- lustre/tests/large-lun.sh | 2 +- lustre/tests/large-scale.sh | 2 +- lustre/tests/lfsck-performance.sh | 2 +- lustre/tests/lnet-selftest.sh | 2 +- lustre/tests/lustre-rsync-test.sh | 2 +- lustre/tests/lutf.sh | 2 +- lustre/tests/mds-survey.sh | 2 +- lustre/tests/mdsrate-create-small.sh | 2 +- lustre/tests/mdsrate-lookup-10dirs.sh | 2 +- lustre/tests/mdsrate-lookup-1dir.sh | 2 +- lustre/tests/mdsrate-stat-large.sh | 2 +- lustre/tests/mdsrate-stat-small.sh | 2 +- lustre/tests/mmp.sh | 2 +- lustre/tests/obdfilter-survey.sh | 2 +- lustre/tests/ost-pools.sh | 2 +- lustre/tests/parallel-scale-cifs.sh | 2 +- lustre/tests/parallel-scale-nfs.sh | 2 +- lustre/tests/parallel-scale.sh | 2 +- lustre/tests/performance-sanity.sh | 2 +- lustre/tests/pjdfstest.sh | 2 +- lustre/tests/posix.sh | 2 +- lustre/tests/racer.sh | 2 +- lustre/tests/recovery-double-scale.sh | 2 +- lustre/tests/recovery-mds-scale.sh | 2 +- lustre/tests/recovery-oss-scale.sh | 2 +- lustre/tests/recovery-random-scale.sh | 2 +- lustre/tests/recovery-small.sh | 2 +- lustre/tests/replay-dual.sh | 4 ++-- lustre/tests/replay-ost-single.sh | 2 +- lustre/tests/replay-single-lmv.sh | 2 +- lustre/tests/replay-single.sh | 2 +- lustre/tests/replay-vbr.sh | 2 +- lustre/tests/runtests | 2 +- lustre/tests/sanity-benchmark.sh | 2 +- lustre/tests/sanity-dom.sh | 2 +- lustre/tests/sanity-flr.sh | 2 +- lustre/tests/sanity-hsm.sh | 2 +- lustre/tests/sanity-krb5.sh | 2 +- lustre/tests/sanity-lfsck.sh | 2 +- lustre/tests/sanity-lnet.sh | 3 +-- lustre/tests/sanity-lsnapshot.sh | 2 +- lustre/tests/sanity-pcc.sh | 2 +- lustre/tests/sanity-pfl.sh | 2 +- lustre/tests/sanity-quota.sh | 2 +- lustre/tests/sanity-scrub.sh | 2 +- lustre/tests/sanity-sec.sh | 2 +- lustre/tests/sanity-selinux.sh | 2 +- lustre/tests/sanity.sh | 2 +- lustre/tests/sanityn.sh | 2 +- lustre/tests/scrub-performance.sh | 2 +- lustre/tests/sgpdd-survey.sh | 2 +- lustre/tests/test-framework.sh | 6 +++--- 56 files changed, 59 insertions(+), 60 deletions(-) diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 09a9b36..e0fbaa4 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -10665,6 +10665,6 @@ MDSSIZE=$STORED_MDSSIZE OSTSIZE=$STORED_OSTSIZE reformat -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/dne_sanity.sh b/lustre/tests/dne_sanity.sh index d41d882..407ab8c 100644 --- a/lustre/tests/dne_sanity.sh +++ b/lustre/tests/dne_sanity.sh @@ -97,6 +97,6 @@ run_test sanity "Run sanity parallel on different directories at the same time" cleanup_running_directories || error "unlink running directories" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/dom-performance.sh b/lustre/tests/dom-performance.sh index f113506..ebcb4c9 100644 --- a/lustre/tests/dom-performance.sh +++ b/lustre/tests/dom-performance.sh @@ -431,6 +431,6 @@ run_test compbench "Performance comparision: compilebench" FAIL_ON_ERROR=$SAVED_FAIL_ON_ERROR $LCTL set_param -n debug="$SAVED_DEBUG" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/insanity.sh b/lustre/tests/insanity.sh index f5813a91..434f1af 100755 --- a/lustre/tests/insanity.sh +++ b/lustre/tests/insanity.sh @@ -746,6 +746,6 @@ test_14() { } run_test 14 "Fourteen Failure Mode: OST0,OST1/CLIENTS/MDS0,MDS1 `date`" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/large-lun.sh b/lustre/tests/large-lun.sh index 2c617a3..41a5d2c 100644 --- a/lustre/tests/large-lun.sh +++ b/lustre/tests/large-lun.sh @@ -330,7 +330,7 @@ test_4 () { } run_test 4 "run llverfs on lustre filesystem" -complete $SECONDS +complete_test $SECONDS $LARGE_LUN_RESTORE_MOUNT && setupall check_and_cleanup_lustre exit_status diff --git a/lustre/tests/large-scale.sh b/lustre/tests/large-scale.sh index 0eede94..2b70efc 100644 --- a/lustre/tests/large-scale.sh +++ b/lustre/tests/large-scale.sh @@ -107,6 +107,6 @@ test_3a() { run_test 3a "recovery time, $CLIENTCOUNT clients" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/lfsck-performance.sh b/lustre/tests/lfsck-performance.sh index 131ace6..b90ff63 100644 --- a/lustre/tests/lfsck-performance.sh +++ b/lustre/tests/lfsck-performance.sh @@ -1028,6 +1028,6 @@ run_test 8 "lfsck namespace impact on create performance" # cleanup the system at last lfsck_cleanup -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/lnet-selftest.sh b/lustre/tests/lnet-selftest.sh index dd3ec2b..cb0f45b 100755 --- a/lustre/tests/lnet-selftest.sh +++ b/lustre/tests/lnet-selftest.sh @@ -198,7 +198,7 @@ test_smoke () { } run_test smoke "lst regression test" -complete $SECONDS +complete_test $SECONDS _restore_mount check_and_cleanup_lustre exit_status diff --git a/lustre/tests/lustre-rsync-test.sh b/lustre/tests/lustre-rsync-test.sh index 55eed52..d06776e 100644 --- a/lustre/tests/lustre-rsync-test.sh +++ b/lustre/tests/lustre-rsync-test.sh @@ -678,6 +678,6 @@ test_9() { run_test 9 "Replicate recursive directory removal" cd $ORIG_PWD -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/lutf.sh b/lustre/tests/lutf.sh index 64f1b9a..bdc55b3 100755 --- a/lustre/tests/lutf.sh +++ b/lustre/tests/lutf.sh @@ -85,7 +85,7 @@ if [ -d /tmp/lutf/ ]; then fi -complete $SECONDS +complete_test $SECONDS cleanup_testsuite diff --git a/lustre/tests/mds-survey.sh b/lustre/tests/mds-survey.sh index f879d97..cf83b44 100644 --- a/lustre/tests/mds-survey.sh +++ b/lustre/tests/mds-survey.sh @@ -127,7 +127,7 @@ run_test 2 "Metadata survey with stripe_count = 1" # remount the clients restore_mount $MOUNT -complete $SECONDS +complete_test $SECONDS cleanup_echo_devs check_and_cleanup_lustre exit_status diff --git a/lustre/tests/mdsrate-create-small.sh b/lustre/tests/mdsrate-create-small.sh index 0a4ef84..439b1d4 100644 --- a/lustre/tests/mdsrate-create-small.sh +++ b/lustre/tests/mdsrate-create-small.sh @@ -166,7 +166,7 @@ else fi fi -complete $SECONDS +complete_test $SECONDS restore_lustre_params < $p rmdir $BASEDIR || true rm -f $MACHINEFILE diff --git a/lustre/tests/mdsrate-lookup-10dirs.sh b/lustre/tests/mdsrate-lookup-10dirs.sh index f4c2f5c..cb63c06 100644 --- a/lustre/tests/mdsrate-lookup-10dirs.sh +++ b/lustre/tests/mdsrate-lookup-10dirs.sh @@ -148,7 +148,7 @@ else fi fi -complete $SECONDS +complete_test $SECONDS restore_lustre_params < $p mdsrate_cleanup_all rmdir $BASEDIR || true diff --git a/lustre/tests/mdsrate-lookup-1dir.sh b/lustre/tests/mdsrate-lookup-1dir.sh index e5dba3a..0b9a793 100644 --- a/lustre/tests/mdsrate-lookup-1dir.sh +++ b/lustre/tests/mdsrate-lookup-1dir.sh @@ -134,7 +134,7 @@ else fi fi -complete $SECONDS +complete_test $SECONDS restore_lustre_params < $p mdsrate_cleanup $NUM_CLIENTS $MACHINEFILE $NUM_FILES $TESTDIR 'f%%d' rmdir $BASEDIR || true diff --git a/lustre/tests/mdsrate-stat-large.sh b/lustre/tests/mdsrate-stat-large.sh index 78a4a01..5d4fb37 100644 --- a/lustre/tests/mdsrate-stat-large.sh +++ b/lustre/tests/mdsrate-stat-large.sh @@ -138,7 +138,7 @@ else fi -complete $SECONDS +complete_test $SECONDS restore_lustre_params < $p mdsrate_cleanup $NUM_CLIENTS $MACHINEFILE $NUM_FILES $TESTDIR 'f%%d' rmdir $BASEDIR || true diff --git a/lustre/tests/mdsrate-stat-small.sh b/lustre/tests/mdsrate-stat-small.sh index f789520..715ab3d 100644 --- a/lustre/tests/mdsrate-stat-small.sh +++ b/lustre/tests/mdsrate-stat-small.sh @@ -138,7 +138,7 @@ else fi fi -complete $SECONDS +complete_test $SECONDS restore_lustre_params < $p mdsrate_cleanup $NUM_CLIENTS $MACHINEFILE $NUM_FILES $TESTDIR 'f%%d' rmdir $BASEDIR || true diff --git a/lustre/tests/mmp.sh b/lustre/tests/mmp.sh index bcafc18..4d00ff5 100755 --- a/lustre/tests/mmp.sh +++ b/lustre/tests/mmp.sh @@ -670,7 +670,7 @@ run_test 10 "e2fsck with mounted filesystem" mmp_fini FAIL_ON_ERROR=$SAVED_FAIL_ON_ERROR -complete $SECONDS +complete_test $SECONDS $MMP_RESTORE_MOUNT && setupall check_and_cleanup_lustre exit_status diff --git a/lustre/tests/obdfilter-survey.sh b/lustre/tests/obdfilter-survey.sh index 1abd640..d1b86dc 100644 --- a/lustre/tests/obdfilter-survey.sh +++ b/lustre/tests/obdfilter-survey.sh @@ -146,7 +146,7 @@ test_3a () { } run_test 3a "Network survey" -complete $SECONDS +complete_test $SECONDS cleanup_echo_devs check_and_cleanup_lustre exit_status diff --git a/lustre/tests/ost-pools.sh b/lustre/tests/ost-pools.sh index 95e509b..1189104 100755 --- a/lustre/tests/ost-pools.sh +++ b/lustre/tests/ost-pools.sh @@ -1928,7 +1928,7 @@ run_test 32 "force to create a file without pool (no inheritance)" cd $ORIG_PWD -complete $SECONDS +complete_test $SECONDS destroy_test_pools $FSNAME if ! combined_mgs_mds; then zconf_umount $mgs_HOST $MOUNT diff --git a/lustre/tests/parallel-scale-cifs.sh b/lustre/tests/parallel-scale-cifs.sh index d74ac32..fcc4e34 100644 --- a/lustre/tests/parallel-scale-cifs.sh +++ b/lustre/tests/parallel-scale-cifs.sh @@ -249,5 +249,5 @@ test_iozone() { } run_test iozone "iozone on cifs clients" -complete $SECONDS +complete_test $SECONDS exit_status diff --git a/lustre/tests/parallel-scale-nfs.sh b/lustre/tests/parallel-scale-nfs.sh index 9b4627e..a35e6ff 100755 --- a/lustre/tests/parallel-scale-nfs.sh +++ b/lustre/tests/parallel-scale-nfs.sh @@ -137,5 +137,5 @@ test_racer_on_nfs() { } run_test racer_on_nfs "racer on NFS client" -complete $SECONDS +complete_test $SECONDS exit_status diff --git a/lustre/tests/parallel-scale.sh b/lustre/tests/parallel-scale.sh index 28da3f2..f126748 100644 --- a/lustre/tests/parallel-scale.sh +++ b/lustre/tests/parallel-scale.sh @@ -183,6 +183,6 @@ run_test xdd "xdd" [ "$mds1_FSTYPE" = zfs -o "$ost1_FSTYPE" = zfs ] && SLOW=$ZFSSLOW -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/performance-sanity.sh b/lustre/tests/performance-sanity.sh index 55521cc..901c2a6 100644 --- a/lustre/tests/performance-sanity.sh +++ b/lustre/tests/performance-sanity.sh @@ -66,7 +66,7 @@ test_8() { } run_test 8 "getattr large files ======" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre [ -f "$LOG" ] && cat $LOG || true exit_status diff --git a/lustre/tests/pjdfstest.sh b/lustre/tests/pjdfstest.sh index 39b4c0f..b32550f 100644 --- a/lustre/tests/pjdfstest.sh +++ b/lustre/tests/pjdfstest.sh @@ -160,7 +160,7 @@ SUBTEST done cat << 'TAIL' -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status TAIL diff --git a/lustre/tests/posix.sh b/lustre/tests/posix.sh index 0b8ba61..42043a8 100755 --- a/lustre/tests/posix.sh +++ b/lustre/tests/posix.sh @@ -140,6 +140,6 @@ test_1() { } run_test 1 "install, build, run posix on $BASELINE_FS and lustre, then compare" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/racer.sh b/lustre/tests/racer.sh index 6ed1849..a0cd2e0 100644 --- a/lustre/tests/racer.sh +++ b/lustre/tests/racer.sh @@ -206,6 +206,6 @@ test_1() { } run_test 1 "racer on clients: ${CLIENTS:-$(hostname)} DURATION=$DURATION" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/recovery-double-scale.sh b/lustre/tests/recovery-double-scale.sh index 6f31c54..021431d 100644 --- a/lustre/tests/recovery-double-scale.sh +++ b/lustre/tests/recovery-double-scale.sh @@ -303,6 +303,6 @@ run_test pairwise_fail "pairwise combination of clients, MDS, and OST failures" zconf_mount $HOSTNAME $MOUNT || error "mount $MOUNT on $HOSTNAME failed" client_up || error "start client on $HOSTNAME failed" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/recovery-mds-scale.sh b/lustre/tests/recovery-mds-scale.sh index 5172891..fdda222 100644 --- a/lustre/tests/recovery-mds-scale.sh +++ b/lustre/tests/recovery-mds-scale.sh @@ -59,6 +59,6 @@ run_test failover_mds "failover MDS" zconf_mount $HOSTNAME $MOUNT || error "mount $MOUNT on $HOSTNAME failed" client_up || error "start client on $HOSTNAME failed" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/recovery-oss-scale.sh b/lustre/tests/recovery-oss-scale.sh index 896bf56..7a4c137 100644 --- a/lustre/tests/recovery-oss-scale.sh +++ b/lustre/tests/recovery-oss-scale.sh @@ -59,6 +59,6 @@ run_test failover_ost "failover OST" zconf_mount $HOSTNAME $MOUNT || error "mount $MOUNT on $HOSTNAME failed" client_up || error "start client on $HOSTNAME failed" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/recovery-random-scale.sh b/lustre/tests/recovery-random-scale.sh index 913e0a8..8bdd6d8 100644 --- a/lustre/tests/recovery-random-scale.sh +++ b/lustre/tests/recovery-random-scale.sh @@ -207,6 +207,6 @@ run_test fail_client_mds "fail client, then failover MDS" zconf_mount $HOSTNAME $MOUNT || error "mount $MOUNT on $HOSTNAME failed" client_up || error "start client on $HOSTNAME failed" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index 541b2c1..417eb3c 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -3480,6 +3480,6 @@ test_154() { } run_test 154 "corruption update llog can be skipped" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/replay-dual.sh b/lustre/tests/replay-dual.sh index a3c15d4..3202973 100755 --- a/lustre/tests/replay-dual.sh +++ b/lustre/tests/replay-dual.sh @@ -75,7 +75,7 @@ run_test 0a "expired recovery with lost client" if [ -f "$LU482_FAILED" ]; then log "Found check file $LU482_FAILED, aborting test script" rm -vf "$LU482_FAILED" - complete $SECONDS + complete_test $SECONDS do_nodes $CLIENTS umount -f $MOUNT2 || true do_nodes $CLIENTS umount -f $MOUNT || true # copied from stopall, but avoid the MDS recovery @@ -1286,7 +1286,7 @@ test_33() { # LU-15935 } run_test 33 "Check for OBD_INCOMPAT_MULTI_RPCS in last_rcvd after abort_recovery" -complete $SECONDS +complete_test $SECONDS SLEEP=$((SECONDS - $NOW)) [ $SLEEP -lt $TIMEOUT ] && sleep $SLEEP [ "$MOUNTED2" = yes ] && zconf_umount $HOSTNAME $MOUNT2 || true diff --git a/lustre/tests/replay-ost-single.sh b/lustre/tests/replay-ost-single.sh index 6d107f3..7bd3ca1 100755 --- a/lustre/tests/replay-ost-single.sh +++ b/lustre/tests/replay-ost-single.sh @@ -498,6 +498,6 @@ test_12b() { } run_test 12b "write after OST failover to a missing object" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/replay-single-lmv.sh b/lustre/tests/replay-single-lmv.sh index 3a97a21..8c9113a 100755 --- a/lustre/tests/replay-single-lmv.sh +++ b/lustre/tests/replay-single-lmv.sh @@ -102,6 +102,6 @@ test_3b() { } run_test 3b "mkdir cross-node dir (fail mds with inode)" -complete $SECONDS +complete_test $SECONDS $CLEANUP diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index 5f469ed..0c1bb11 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -5142,6 +5142,6 @@ test_200() { } run_test 200 "Dropping one OBD_PING should not cause disconnect" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/replay-vbr.sh b/lustre/tests/replay-vbr.sh index 85f92d5..7508f05 100755 --- a/lustre/tests/replay-vbr.sh +++ b/lustre/tests/replay-vbr.sh @@ -1207,6 +1207,6 @@ rm -f $cos_param_file [ "$CLIENTS" ] && zconf_mount_clients $CLIENTS $DIR -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/runtests b/lustre/tests/runtests index 8c9d7ab..3809d26 100755 --- a/lustre/tests/runtests +++ b/lustre/tests/runtests @@ -148,6 +148,6 @@ test_1() { } run_test 1 "All Runtests" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-benchmark.sh b/lustre/tests/sanity-benchmark.sh index 532576c..891c327 100644 --- a/lustre/tests/sanity-benchmark.sh +++ b/lustre/tests/sanity-benchmark.sh @@ -224,6 +224,6 @@ test_fsx_partial_punch() { } run_test fsx_partial_punch "Verify fsx with partial punch via fallocate" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-dom.sh b/lustre/tests/sanity-dom.sh index ad139f1..3666ef1 100644 --- a/lustre/tests/sanity-dom.sh +++ b/lustre/tests/sanity-dom.sh @@ -218,7 +218,7 @@ test_sanityn() } run_test sanityn "Run sanityn with Data-on-MDT files" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre declare -a logs=($ONLY) logs=("${logs[@]/#/$TMP/}") diff --git a/lustre/tests/sanity-flr.sh b/lustre/tests/sanity-flr.sh index 3595ad3..bf23908 100644 --- a/lustre/tests/sanity-flr.sh +++ b/lustre/tests/sanity-flr.sh @@ -4266,6 +4266,6 @@ test_208b() { } run_test 208b "mirror selection to prefer non-rotational devices for writes" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-hsm.sh b/lustre/tests/sanity-hsm.sh index 1d94f34..fd1b2e0 100755 --- a/lustre/tests/sanity-hsm.sh +++ b/lustre/tests/sanity-hsm.sh @@ -5778,6 +5778,6 @@ test_606() { } run_test 606 "llog_reader groks changelog fields" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-krb5.sh b/lustre/tests/sanity-krb5.sh index 2a941709..94b8fab 100755 --- a/lustre/tests/sanity-krb5.sh +++ b/lustre/tests/sanity-krb5.sh @@ -735,7 +735,7 @@ test_151() { } run_test 151 "secure mgs connection: server flavor control" -complete $SECONDS +complete_test $SECONDS set_flavor_all null cleanup_gss check_and_cleanup_lustre diff --git a/lustre/tests/sanity-lfsck.sh b/lustre/tests/sanity-lfsck.sh index ecdffae..4c1e25a 100644 --- a/lustre/tests/sanity-lfsck.sh +++ b/lustre/tests/sanity-lfsck.sh @@ -6194,6 +6194,6 @@ OSTCOUNT=${SAVED_OSTCOUNT} # cleanup the system at last REFORMAT="yes" cleanup_and_setup_lustre -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-lnet.sh b/lustre/tests/sanity-lnet.sh index cb3cad6..acaf44b 100755 --- a/lustre/tests/sanity-lnet.sh +++ b/lustre/tests/sanity-lnet.sh @@ -3718,7 +3718,6 @@ test_402() { } run_test 402 "Destination net rule should not panic" -complete $SECONDS - +complete_test $SECONDS cleanup_testsuite exit_status diff --git a/lustre/tests/sanity-lsnapshot.sh b/lustre/tests/sanity-lsnapshot.sh index 233c9aa..8aa21c1 100755 --- a/lustre/tests/sanity-lsnapshot.sh +++ b/lustre/tests/sanity-lsnapshot.sh @@ -375,6 +375,6 @@ run_test 4 "create/delete snapshot after MGS remount" lss_cleanup do_facet mgs $LCTL set_param debug=-snapshot do_nodes $(comma_list $(mdts_nodes)) $LCTL set_param debug=-snapshot -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-pcc.sh b/lustre/tests/sanity-pcc.sh index 6b9e74d..9db48e1 100644 --- a/lustre/tests/sanity-pcc.sh +++ b/lustre/tests/sanity-pcc.sh @@ -1656,6 +1656,6 @@ test_102() { } run_test 102 "PCC-RO should not hange for io_uring I/O engine" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-pfl.sh b/lustre/tests/sanity-pfl.sh index 9b2e1bd..fdfff0f 100644 --- a/lustre/tests/sanity-pfl.sh +++ b/lustre/tests/sanity-pfl.sh @@ -2539,6 +2539,6 @@ test_27() { } run_test 27 "overstriping with -C -1 in mdt_dump_lmm" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh index 9b36adb..874cc72 100755 --- a/lustre/tests/sanity-quota.sh +++ b/lustre/tests/sanity-quota.sh @@ -5960,7 +5960,7 @@ reset_quota_settings quota_fini cd $ORIG_PWD -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre export QUOTA_AUTO=$QUOTA_AUTO_OLD exit_status diff --git a/lustre/tests/sanity-scrub.sh b/lustre/tests/sanity-scrub.sh index b5f8f88..7702a16 100644 --- a/lustre/tests/sanity-scrub.sh +++ b/lustre/tests/sanity-scrub.sh @@ -1463,6 +1463,6 @@ OSTCOUNT=${SAVED_OSTCOUNT} # cleanup the system at last REFORMAT="yes" cleanup_and_setup_lustre -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-sec.sh b/lustre/tests/sanity-sec.sh index 062e5b7..eb41d3f 100755 --- a/lustre/tests/sanity-sec.sh +++ b/lustre/tests/sanity-sec.sh @@ -5845,6 +5845,6 @@ sec_unsetup() { } sec_unsetup -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-selinux.sh b/lustre/tests/sanity-selinux.sh index 34680ac..bf882f8 100755 --- a/lustre/tests/sanity-selinux.sh +++ b/lustre/tests/sanity-selinux.sh @@ -850,6 +850,6 @@ test_21b() { } run_test 21b "Send sepol for metadata ops" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index cbb0b6e..fc98d5a 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -30221,7 +30221,7 @@ test_906() { } run_test 906 "Simple test for io_uring I/O engine via fio" -complete $SECONDS +complete_test $SECONDS [ -f $EXT2_DEV ] && rm $EXT2_DEV || true check_and_cleanup_lustre if [ "$I_MOUNTED" != "yes" ]; then diff --git a/lustre/tests/sanityn.sh b/lustre/tests/sanityn.sh index e8f5841..71c3009 100755 --- a/lustre/tests/sanityn.sh +++ b/lustre/tests/sanityn.sh @@ -6285,7 +6285,7 @@ log "cleanup: ======================================================" [ "$(mount | grep $MOUNT2)" ] && wait_update $HOSTNAME "fuser -m $MOUNT2" "" || true -complete $SECONDS +complete_test $SECONDS rm -f $SAMPLE_FILE check_and_cleanup_lustre exit_status diff --git a/lustre/tests/scrub-performance.sh b/lustre/tests/scrub-performance.sh index 75f521c..7512f38 100644 --- a/lustre/tests/scrub-performance.sh +++ b/lustre/tests/scrub-performance.sh @@ -183,6 +183,6 @@ run_test 0 "OI scrub performance test" # cleanup the system at last scrub_cleanup -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sgpdd-survey.sh b/lustre/tests/sgpdd-survey.sh index 0cdc0ca..19c3e6b 100644 --- a/lustre/tests/sgpdd-survey.sh +++ b/lustre/tests/sgpdd-survey.sh @@ -76,5 +76,5 @@ test_2 () { } run_test 2 "sgpdd-survey, osts, scsidevs" -complete $SECONDS +complete_test $SECONDS exit_status diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 98f495b..a43370f 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -6893,12 +6893,12 @@ trace() { return 1 } -complete () { +complete_test() { local duration=$1 - banner test complete, duration $duration sec + banner "test complete, duration $duration sec" [ -f "$TESTSUITELOG" ] && egrep .FAIL $TESTSUITELOG || true - echo duration $duration >>$TESTSUITELOG + echo "duration $duration" >>$TESTSUITELOG } pass() { -- 1.8.3.1