Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
3
-
9223372036854775807
Description
All those tests launch a command in the background and want to check whether or not the command completes, they do so like this:
test_3*() { ... md5sum $f > /dev/null & local pid=$! ... local rc=$(wait $pid) [[ $rc -eq 0 ]] || error "..." }
Putting aside the fact that launching wait in a subshell like this will not work (pid 12345 is not a child of this shell), local rc=$(command) is not the way to check a return code in bash.
This code should be replaced with:
test_3*() { ... md5sum $f > /dev/null & local pid=$! ... wait $pid || error "..." }
John L. Hammond (john.hammond@intel.com) merged in patch https://review.whamcloud.com/30208/
Subject:
LU-10234tests: use wait correctly in sanity-hsm test_3[4-6]Project: fs/lustre-release
Branch: b2_10
Current Patch Set:
Commit: ef3252dc74e962dd7c81e09ca6b4b49273275b59