Browse Source

torture: Prevent jitter from delaying build-only runs

Currently, if the --jitter flag specifies jitter for a --build-only
run, the system will obediently build a kernel, refuse to launch it,
launch the requested number of jitter processes, and wait for the
specified kernel run time, which defaults to 30 minutes.  This is
of course quite pointless.

This commit therefore disables jitter on build-only runs.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Paul E. McKenney 8 years ago
parent
commit
1f32ee6586
1 changed files with 5 additions and 0 deletions
  1. 5 0
      tools/testing/selftests/rcutorture/bin/kvm.sh

+ 5 - 0
tools/testing/selftests/rcutorture/bin/kvm.sh

@@ -303,6 +303,7 @@ then
 fi
 fi
 ___EOF___
 ___EOF___
 awk < $T/cfgcpu.pack \
 awk < $T/cfgcpu.pack \
+	-v TORTURE_BUILDONLY="$TORTURE_BUILDONLY" \
 	-v CONFIGDIR="$CONFIGFRAG/" \
 	-v CONFIGDIR="$CONFIGFRAG/" \
 	-v KVM="$KVM" \
 	-v KVM="$KVM" \
 	-v ncpus=$cpus \
 	-v ncpus=$cpus \
@@ -375,6 +376,10 @@ function dump(first, pastlast, batchnum)
 		njitter = ncpus;
 		njitter = ncpus;
 	else
 	else
 		njitter = ja[1];
 		njitter = ja[1];
+	if (TORTURE_BUILDONLY && njitter != 0) {
+		njitter = 0;
+		print "echo Build-only run, so suppressing jitter >> " rd "/log"
+	}
 	for (j = 0; j < njitter; j++)
 	for (j = 0; j < njitter; j++)
 		print "jitter.sh " j " " dur " " ja[2] " " ja[3] "&"
 		print "jitter.sh " j " " dur " " ja[2] " " ja[3] "&"
 	print "wait"
 	print "wait"