diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2021-02-11 10:39:28 -0800 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2021-03-08 14:23:01 -0800 |
commit | 37812c9429722824859788cf754dd3e33f546908 (patch) | |
tree | 86def6733267dee647f2022d7204f4d115ed2459 /tools/testing/selftests/rcutorture/bin/kvm.sh | |
parent | torture: Use file-based protocol to mark batch's runs complete (diff) | |
download | linux-dev-37812c9429722824859788cf754dd3e33f546908.tar.xz linux-dev-37812c9429722824859788cf754dd3e33f546908.zip |
torture: Use "jittering" file to control jitter.sh execution
Currently, jitter.sh execution is controlled by a time limit and by the
"kill" command. The former allowed jitter.sh to run uselessly past
the end of a set of runs that panicked during boot, and the latter is
vulnerable to PID reuse. This commit therefore introduces a "jittering"
file in the date-stamp directory within "res" that must be present for
the jitter.sh scripts to continue executing. The time limit is still
in place in order to avoid disturbing runs featuring large trace dumps,
but the removal of the "jittering" file handles the panic-during-boot
scenario without relying on PIDs.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/testing/selftests/rcutorture/bin/kvm.sh')
-rwxr-xr-x | tools/testing/selftests/rcutorture/bin/kvm.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 1f5f8720cacc..48da4cdb29d8 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -503,14 +503,17 @@ function dump(first, pastlast, batchnum) print "then" print "\techo ---- Starting kernels. `date` | tee -a " rd "log"; print "\techo > " rd "jitter_pids" + print "\ttouch " rd "jittering" for (j = 0; j < njitter; j++) { - print "\tjitter.sh " j " " dur " " ja[2] " " ja[3] "&" + print "\tjitter.sh " j " " dur " " rd "jittering " ja[2] " " ja[3] "&" print "\techo $! >> " rd "jitter_pids" } print "\twhile ls $runfiles > /dev/null 2>&1" print "\tdo" print "\t\t:" print "\tdone" + print "\trm -f " rd "jittering" + print "\twait" print "\techo ---- All kernel runs complete. `date` | tee -a " rd "log"; print "else" print "\twait" |