From: Andreas Dilger Date: Tue, 22 Jan 2019 07:53:44 +0000 (-0700) Subject: LU-11878 tests: don't fork-bomb sanity test_103b X-Git-Tag: 2.12.52~98 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=42c5c9c2ca3e44cb1c3e8ecb144bdd20fb35cddb LU-11878 tests: don't fork-bomb sanity test_103b Running sanity test_103b may start up to 512 parallel threads for running the test, each of which starts two bash processes and lfs or rm processes. For the VMs running in our testbed (esp. ARM with 64KB PAGE_SIZE) this can trigger the OOM killer and cause the test to fail if bash is killed. Limit the number of started bash processes to avoid this. Fixes: 543f1fbe260 ("LU-10830 utils: fix create mode for lfs") Test-Parameters: trivial clientarch=aarch64 Signed-off-by: Andreas Dilger Change-Id: I82c322013da91d717924e2c664fa57ad4e3ebbe5 Reviewed-on: https://review.whamcloud.com/34082 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Patrick Farrell Reviewed-by: Elena Gryaznova Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index a17303e..d95a43d 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -8598,6 +8598,7 @@ test_103a() { run_test 103a "acl test" test_103b() { + declare -a pids local U for U in {0..511}; do @@ -8622,6 +8623,12 @@ test_103b() { error "lfs setstripe -N2 $DIR/$tfile.m$O '$S' != '$O'" rm -f $DIR/$tfile.[smp]$0 } & + local pid=$! + + # limit the concurrently running threads to 64. LU-11878 + local idx=$((U % 64)) + [ -z "${pids[idx]}" ] || wait ${pids[idx]} + pids[idx]=$pid done wait }