From: Paul E. McKenney Date: Thu, 11 Feb 2021 19:54:43 +0000 (-0800) Subject: torture: Reverse jittering and duration parameters for jitter.sh X-Git-Tag: accepted/tizen/unified/20230118.172025~7363^2^2^10~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4cd54518c3d8afadd11ebd6ad4f03b00859f5e85;p=platform%2Fkernel%2Flinux-rpi.git torture: Reverse jittering and duration parameters for jitter.sh Remote rcutorture testing requires that jitter.sh continue to be invoked from the generated script for local runs, but that it instead be invoked on the remote system for distributed runs. This argues for common jitterstart and jitterstop scripts. But it would be good for jitterstart and jitterstop to control the name and location of the "jittering" file, while continuing to have the duration controlled by the caller of these new scripts. This commit therefore reverses the order of the jittering and duration parameters for jitter.sh, so that the jittering parameter precedes the duration parameter. Signed-off-by: Paul E. McKenney --- diff --git a/tools/testing/selftests/rcutorture/bin/jitter.sh b/tools/testing/selftests/rcutorture/bin/jitter.sh index ed0ea86..ff1d3e4 100755 --- a/tools/testing/selftests/rcutorture/bin/jitter.sh +++ b/tools/testing/selftests/rcutorture/bin/jitter.sh @@ -5,7 +5,7 @@ # of this script is to inflict random OS jitter on a concurrently running # test. # -# Usage: jitter.sh me duration jittering-path [ sleepmax [ spinmax ] ] +# Usage: jitter.sh me jittering-path duration [ sleepmax [ spinmax ] ] # # me: Random-number-generator seed salt. # duration: Time to run in seconds. @@ -18,8 +18,8 @@ # Authors: Paul E. McKenney me=$(($1 * 1000)) -duration=$2 -jittering=$3 +jittering=$2 +duration=$3 sleepmax=${4-1000000} spinmax=${5-1000} diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index de93802..a2ee3f2 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -504,7 +504,7 @@ function dump(first, pastlast, batchnum) print "\techo ---- Starting kernels. `date` | tee -a " rd "log"; print "\ttouch " rd "jittering" for (j = 0; j < njitter; j++) - print "\tjitter.sh " j " " dur " " rd "jittering " ja[2] " " ja[3] "&" + print "\tjitter.sh " j " " rd "jittering " dur " " ja[2] " " ja[3] "&" print "\twhile ls $runfiles > /dev/null 2>&1" print "\tdo" print "\t\t:"