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 <adilger@whamcloud.com>
Change-Id: Ic72d8d5cc4a65feec6bfb2a76ac5f9b9d78e3f75
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51383
Tested-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
OSTSIZE=$STORED_OSTSIZE
reformat
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
cleanup_running_directories || error "unlink running directories"
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
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
}
run_test 14 "Fourteen Failure Mode: OST0,OST1/CLIENTS/MDS0,MDS1 `date`"
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
}
run_test 4 "run llverfs on lustre filesystem"
-complete $SECONDS
+complete_test $SECONDS
$LARGE_LUN_RESTORE_MOUNT && setupall
check_and_cleanup_lustre
exit_status
run_test 3a "recovery time, $CLIENTCOUNT clients"
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
# cleanup the system at last
lfsck_cleanup
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
}
run_test smoke "lst regression test"
-complete $SECONDS
+complete_test $SECONDS
_restore_mount
check_and_cleanup_lustre
exit_status
run_test 9 "Replicate recursive directory removal"
cd $ORIG_PWD
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
fi
-complete $SECONDS
+complete_test $SECONDS
cleanup_testsuite
# remount the clients
restore_mount $MOUNT
-complete $SECONDS
+complete_test $SECONDS
cleanup_echo_devs
check_and_cleanup_lustre
exit_status
fi
fi
-complete $SECONDS
+complete_test $SECONDS
restore_lustre_params < $p
rmdir $BASEDIR || true
rm -f $MACHINEFILE
fi
fi
-complete $SECONDS
+complete_test $SECONDS
restore_lustre_params < $p
mdsrate_cleanup_all
rmdir $BASEDIR || true
fi
fi
-complete $SECONDS
+complete_test $SECONDS
restore_lustre_params < $p
mdsrate_cleanup $NUM_CLIENTS $MACHINEFILE $NUM_FILES $TESTDIR 'f%%d'
rmdir $BASEDIR || true
fi
-complete $SECONDS
+complete_test $SECONDS
restore_lustre_params < $p
mdsrate_cleanup $NUM_CLIENTS $MACHINEFILE $NUM_FILES $TESTDIR 'f%%d'
rmdir $BASEDIR || true
fi
fi
-complete $SECONDS
+complete_test $SECONDS
restore_lustre_params < $p
mdsrate_cleanup $NUM_CLIENTS $MACHINEFILE $NUM_FILES $TESTDIR 'f%%d'
rmdir $BASEDIR || true
mmp_fini
FAIL_ON_ERROR=$SAVED_FAIL_ON_ERROR
-complete $SECONDS
+complete_test $SECONDS
$MMP_RESTORE_MOUNT && setupall
check_and_cleanup_lustre
exit_status
}
run_test 3a "Network survey"
-complete $SECONDS
+complete_test $SECONDS
cleanup_echo_devs
check_and_cleanup_lustre
exit_status
cd $ORIG_PWD
-complete $SECONDS
+complete_test $SECONDS
destroy_test_pools $FSNAME
if ! combined_mgs_mds; then
zconf_umount $mgs_HOST $MOUNT
}
run_test iozone "iozone on cifs clients"
-complete $SECONDS
+complete_test $SECONDS
exit_status
}
run_test racer_on_nfs "racer on NFS client"
-complete $SECONDS
+complete_test $SECONDS
exit_status
[ "$mds1_FSTYPE" = zfs -o "$ost1_FSTYPE" = zfs ] &&
SLOW=$ZFSSLOW
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
}
run_test 8 "getattr large files ======"
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
[ -f "$LOG" ] && cat $LOG || true
exit_status
done
cat << 'TAIL'
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
TAIL
}
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
}
run_test 1 "racer on clients: ${CLIENTS:-$(hostname)} DURATION=$DURATION"
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
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
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
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
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
}
run_test 154 "corruption update llog can be skipped"
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
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
}
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
}
run_test 12b "write after OST failover to a missing object"
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
}
run_test 3b "mkdir cross-node dir (fail mds with inode)"
-complete $SECONDS
+complete_test $SECONDS
$CLEANUP
}
run_test 200 "Dropping one OBD_PING should not cause disconnect"
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
[ "$CLIENTS" ] && zconf_mount_clients $CLIENTS $DIR
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
}
run_test 1 "All Runtests"
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
}
run_test fsx_partial_punch "Verify fsx with partial punch via fallocate"
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
}
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/}")
}
run_test 208b "mirror selection to prefer non-rotational devices for writes"
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
}
run_test 606 "llog_reader groks changelog fields"
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
}
run_test 151 "secure mgs connection: server flavor control"
-complete $SECONDS
+complete_test $SECONDS
set_flavor_all null
cleanup_gss
check_and_cleanup_lustre
# cleanup the system at last
REFORMAT="yes" cleanup_and_setup_lustre
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
}
run_test 402 "Destination net rule should not panic"
-complete $SECONDS
-
+complete_test $SECONDS
cleanup_testsuite
exit_status
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
}
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
}
run_test 27 "overstriping with -C -1 in mdt_dump_lmm"
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
quota_fini
cd $ORIG_PWD
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
export QUOTA_AUTO=$QUOTA_AUTO_OLD
exit_status
# cleanup the system at last
REFORMAT="yes" cleanup_and_setup_lustre
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
}
sec_unsetup
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
}
run_test 21b "Send sepol for metadata ops"
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
}
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
[ "$(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
# cleanup the system at last
scrub_cleanup
-complete $SECONDS
+complete_test $SECONDS
check_and_cleanup_lustre
exit_status
}
run_test 2 "sgpdd-survey, osts, scsidevs"
-complete $SECONDS
+complete_test $SECONDS
exit_status
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() {