linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12
@ 2021-01-06 17:25 Paul E. McKenney
  2021-01-06 17:25 ` [PATCH tip/core/rcu 01/20] torture: Make --kcsan specify lockdep paulmck
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: Paul E. McKenney @ 2021-01-06 17:25 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel

Hello!

This series contains torture-test updates for the rcutorture scripting in
tools/testing/selftests/rcutorture.

1.	Make --kcsan specify lockdep.

2.	Make kvm.sh "--dryrun sched" summarize number of batches.

3.	Make kvm.sh "--dryrun sched" summarize number of builds.

4.	Allow kvm.sh --datestamp to specify subdirectories.

5.	Prepare for splitting qemu execution from kvm-test-1-run.sh.

6.	Add config2csv.sh script to compare torture scenarios.

7.	Make identify_qemu_vcpus() independent of local language,
	courtesy of Frederic Weisbecker.

8.	Make kvm.sh "Test Summary" date be end of test.

9.	Make kvm.sh arguments accumulate.

10.	Print run duration at end of kvm.sh execution.

11.	Make kvm.sh return failure upon build failure.

12.	Make kvm.sh include --kconfig arguments in CPU calculation.

13.	Add kvm.sh test summary to end of log file.

14.	Stop hanging on panic.

15.	Add --dryrun batches to help schedule a distributed run.

16.	s/STOP/STOP.1/ to avoid scenario collision.

17.	Simplify exit-code plumbing for kvm-recheck.sh and
	kvm-find-errors.sh.

18.	Remove "Failed to add ttynull console" false positive.

19.	Allow standalone kvm-recheck.sh run detect --trust-make.

20.	Do Kconfig analysis only once per scenario.

						Thanx, Paul

------------------------------------------------------------------------

 config2csv.sh      |   67 +++++++++++++++++++++++++++++++++
 console-badness.sh |    1 
 functions.sh       |   36 +++++++++++++++++
 kvm-find-errors.sh |    9 +++-
 kvm-recheck.sh     |    3 -
 kvm-test-1-run.sh  |   12 +++--
 kvm.sh             |  107 +++++++++++++++++++++++++++++++++++++----------------
 parse-build.sh     |    2 
 parse-console.sh   |    2 
 9 files changed, 197 insertions(+), 42 deletions(-)

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 01/20] torture: Make --kcsan specify lockdep
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
@ 2021-01-06 17:25 ` paulmck
  2021-01-06 17:25 ` [PATCH tip/core/rcu 02/20] torture: Make kvm.sh "--dryrun sched" summarize number of batches paulmck
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:25 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@kernel.org>

The --kcsan argument to kvm.sh adds CONFIG_KCSAN_VERBOSE=y in order to
get more detail from the KCSAN reports.  However, this Kconfig option
requires lockdep to be enabled.  This commit therefore causes --kcsan
to also enable lockdep.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/kvm.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index 45d07b7..bd07df7 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -169,7 +169,7 @@ do
 		TORTURE_KCONFIG_KASAN_ARG="CONFIG_DEBUG_INFO=y CONFIG_KASAN=y"; export TORTURE_KCONFIG_KASAN_ARG
 		;;
 	--kcsan)
-		TORTURE_KCONFIG_KCSAN_ARG="CONFIG_DEBUG_INFO=y CONFIG_KCSAN=y CONFIG_KCSAN_ASSUME_PLAIN_WRITES_ATOMIC=n CONFIG_KCSAN_REPORT_VALUE_CHANGE_ONLY=n CONFIG_KCSAN_REPORT_ONCE_IN_MS=100000 CONFIG_KCSAN_VERBOSE=y CONFIG_KCSAN_INTERRUPT_WATCHER=y"; export TORTURE_KCONFIG_KCSAN_ARG
+		TORTURE_KCONFIG_KCSAN_ARG="CONFIG_DEBUG_INFO=y CONFIG_KCSAN=y CONFIG_KCSAN_ASSUME_PLAIN_WRITES_ATOMIC=n CONFIG_KCSAN_REPORT_VALUE_CHANGE_ONLY=n CONFIG_KCSAN_REPORT_ONCE_IN_MS=100000 CONFIG_KCSAN_INTERRUPT_WATCHER=y CONFIG_KCSAN_VERBOSE=y CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_PROVE_LOCKING=y"; export TORTURE_KCONFIG_KCSAN_ARG
 		;;
 	--kmake-arg|--kmake-args)
 		checkarg --kmake-arg "(kernel make arguments)" $# "$2" '.*' '^error$'
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 02/20] torture: Make kvm.sh "--dryrun sched" summarize number of batches
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
  2021-01-06 17:25 ` [PATCH tip/core/rcu 01/20] torture: Make --kcsan specify lockdep paulmck
@ 2021-01-06 17:25 ` paulmck
  2021-01-06 17:25 ` [PATCH tip/core/rcu 03/20] torture: Make kvm.sh "--dryrun sched" summarize number of builds paulmck
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:25 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@kernel.org>

Knowing the number of batches that kvm.sh will split a run into allows
estimation of the duration of a test, give or take the number of builds.
This commit therefore adds a line of output to "--dryrun sched" that
gives the number of batches that will be run.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/kvm.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index bd07df7..1078be1 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -536,6 +536,8 @@ then
 	egrep 'Start batch|Starting build\.' $T/script |
 		grep -v ">>" |
 		sed -e 's/:.*$//' -e 's/^echo //'
+	nbatches="`grep 'Start batch' $T/script | grep -v ">>" | wc -l`"
+	echo Total number of batches: $nbatches
 	exit 0
 else
 	# Not a dryrun, so run the script.
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 03/20] torture: Make kvm.sh "--dryrun sched" summarize number of builds
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
  2021-01-06 17:25 ` [PATCH tip/core/rcu 01/20] torture: Make --kcsan specify lockdep paulmck
  2021-01-06 17:25 ` [PATCH tip/core/rcu 02/20] torture: Make kvm.sh "--dryrun sched" summarize number of batches paulmck
@ 2021-01-06 17:25 ` paulmck
  2021-01-06 17:25 ` [PATCH tip/core/rcu 04/20] torture: Allow kvm.sh --datestamp to specify subdirectories paulmck
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:25 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@kernel.org>

Knowing the number of builds that kvm.sh will split a run into allows
estimation of the duration of a test, give or take build duration.
This commit therefore adds a line of output to "--dryrun sched" that
gives the number of builds that will be run.  This excludes "builds"
for repeated scenarios that reuse an earlier build.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/kvm.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index 1078be1..55a18a9 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -536,6 +536,10 @@ then
 	egrep 'Start batch|Starting build\.' $T/script |
 		grep -v ">>" |
 		sed -e 's/:.*$//' -e 's/^echo //'
+	nbuilds="`grep 'Starting build\.' $T/script |
+		  grep -v ">>" | sed -e 's/:.*$//' -e 's/^echo //' |
+		  awk '{ print $1 }' | grep -v '\.' | wc -l`"
+	echo Total number of builds: $nbuilds
 	nbatches="`grep 'Start batch' $T/script | grep -v ">>" | wc -l`"
 	echo Total number of batches: $nbatches
 	exit 0
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 04/20] torture: Allow kvm.sh --datestamp to specify subdirectories
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
                   ` (2 preceding siblings ...)
  2021-01-06 17:25 ` [PATCH tip/core/rcu 03/20] torture: Make kvm.sh "--dryrun sched" summarize number of builds paulmck
@ 2021-01-06 17:25 ` paulmck
  2021-01-06 17:25 ` [PATCH tip/core/rcu 05/20] torture: Prepare for splitting qemu execution from kvm-test-1-run.sh paulmck
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:25 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@kernel.org>

Scripts like kvm-check-branches.sh group runs under a single directory
in resdir in order to allow easier retrospective analysis.  However, they
do this by letting kvm.sh create a directory as usual and then moving it
after the run.  This can be very confusing when looking at the results
while kvm-check-branches.sh is running.  This commit therefore enables
--datestamp to hand subdirectories to kvm.sh.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/kvm.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index 55a18a9..0a9211a 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -113,7 +113,7 @@ do
 		shift
 		;;
 	--datestamp)
-		checkarg --datestamp "(relative pathname)" "$#" "$2" '^[^/]*$' '^--'
+		checkarg --datestamp "(relative pathname)" "$#" "$2" '^[a-zA-Z0-9._-/]*$' '^--'
 		ds=$2
 		shift
 		;;
@@ -375,7 +375,7 @@ if ! test -e $resdir
 then
 	mkdir -p "$resdir" || :
 fi
-mkdir $resdir/$ds
+mkdir -p $resdir/$ds
 TORTURE_RESDIR="$resdir/$ds"; export TORTURE_RESDIR
 TORTURE_STOPFILE="$resdir/$ds/STOP"; export TORTURE_STOPFILE
 echo Results directory: $resdir/$ds
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 05/20] torture: Prepare for splitting qemu execution from kvm-test-1-run.sh
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
                   ` (3 preceding siblings ...)
  2021-01-06 17:25 ` [PATCH tip/core/rcu 04/20] torture: Allow kvm.sh --datestamp to specify subdirectories paulmck
@ 2021-01-06 17:25 ` paulmck
  2021-01-06 17:25 ` [PATCH tip/core/rcu 06/20] torture: Add config2csv.sh script to compare torture scenarios paulmck
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:25 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@kernel.org>

Distributed execution of rcutorture is eased if the qemu execution can
be split from the building of the kernel, as this allows target systems
to be used that are not set up to build kernels.  It also avoids issues
with toolchain version skew across the cluster, aside of course from
qemu and KVM version skew.

This commit therefore records needed data as comments in the qemu-cmd file
and moves recording of the starting time to just before qemu is launched.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
index 3cd03d0..4bc0e62 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
@@ -125,7 +125,6 @@ seconds=$4
 qemu_args=$5
 boot_args=$6
 
-kstarttime=`gawk 'BEGIN { print systime() }' < /dev/null`
 if test -z "$TORTURE_BUILDONLY"
 then
 	echo ' ---' `date`: Starting kernel
@@ -158,6 +157,8 @@ then
 	boot_args="$boot_args $TORTURE_BOOT_GDB_ARG"
 fi
 echo $QEMU $qemu_args -m $TORTURE_QEMU_MEM -kernel $KERNEL -append \"$qemu_append $boot_args\" $TORTURE_QEMU_GDB_ARG > $resdir/qemu-cmd
+echo "# TORTURE_SHUTDOWN_GRACE=$TORTURE_SHUTDOWN_GRACE" >> $resdir/qemu-cmd
+echo "# seconds=$seconds" >> $resdir/qemu-cmd
 
 if test -n "$TORTURE_BUILDONLY"
 then
@@ -174,6 +175,7 @@ echo 'echo $! > $resdir/qemu_pid' >> $T/qemu-cmd
 echo "NOTE: $QEMU either did not run or was interactive" > $resdir/console.log
 
 # Attempt to run qemu
+kstarttime=`gawk 'BEGIN { print systime() }' < /dev/null`
 ( . $T/qemu-cmd; wait `cat  $resdir/qemu_pid`; echo $? > $resdir/qemu-retval ) &
 commandcompleted=0
 if test -z "$TORTURE_KCONFIG_GDB_ARG"
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 06/20] torture: Add config2csv.sh script to compare torture scenarios
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
                   ` (4 preceding siblings ...)
  2021-01-06 17:25 ` [PATCH tip/core/rcu 05/20] torture: Prepare for splitting qemu execution from kvm-test-1-run.sh paulmck
@ 2021-01-06 17:25 ` paulmck
  2021-01-06 17:25 ` [PATCH tip/core/rcu 07/20] tools/rcutorture: Make identify_qemu_vcpus() independent of local language paulmck
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:25 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@kernel.org>

This commit adds a config2csv.sh script that converts the specified
torture-test scenarios' Kconfig options and kernel-boot parameters to
.csv format.  This allows easier comparison of scenarios when one fails
and another does not.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 .../testing/selftests/rcutorture/bin/config2csv.sh | 67 ++++++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100755 tools/testing/selftests/rcutorture/bin/config2csv.sh

diff --git a/tools/testing/selftests/rcutorture/bin/config2csv.sh b/tools/testing/selftests/rcutorture/bin/config2csv.sh
new file mode 100755
index 0000000..d5a1663
--- /dev/null
+++ b/tools/testing/selftests/rcutorture/bin/config2csv.sh
@@ -0,0 +1,67 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Create a spreadsheet from torture-test Kconfig options and kernel boot
+# parameters.  Run this in the directory containing the scenario files.
+#
+# Usage: config2csv path.csv [ "scenario1 scenario2 ..." ]
+#
+# By default, this script will take the list of scenarios from the CFLIST
+# file in that directory, otherwise it will consider only the scenarios
+# specified on the command line.  It will examine each scenario's file
+# and also its .boot file, if present, and create a column in the .csv
+# output file.  Note that "CFLIST" is a synonym for all the scenarios in the
+# CFLIST file, which allows easy comparison of those scenarios with selected
+# scenarios such as BUSTED that are normally omitted from CFLIST files.
+
+csvout=${1}
+if test -z "$csvout"
+then
+	echo "Need .csv output file as first argument."
+	exit 1
+fi
+shift
+defaultconfigs="`tr '\012' ' ' < CFLIST`"
+if test "$#" -eq 0
+then
+	scenariosarg=$defaultconfigs
+else
+	scenariosarg=$*
+fi
+scenarios="`echo $scenariosarg | sed -e "s/\<CFLIST\>/$defaultconfigs/g"`"
+
+T=/tmp/config2latex.sh.$$
+trap 'rm -rf $T' 0
+mkdir $T
+
+cat << '---EOF---' >> $T/p.awk
+END	{
+---EOF---
+for i in $scenarios
+do
+	echo '	s["'$i'"] = 1;' >> $T/p.awk
+	grep -v '^#' < $i | grep -v '^ *$' > $T/p
+	if test -r $i.boot
+	then
+		tr -s ' ' '\012' < $i.boot | grep -v '^#' >> $T/p
+	fi
+	sed -e 's/^[^=]*$/&=?/' < $T/p |
+	sed -e 's/^\([^=]*\)=\(.*\)$/\tp["\1:'"$i"'"] = "\2";\n\tc["\1"] = 1;/' >> $T/p.awk
+done
+cat << '---EOF---' >> $T/p.awk
+	ns = asorti(s, ss);
+	nc = asorti(c, cs);
+	for (j = 1; j <= ns; j++)
+		printf ",\"%s\"", ss[j];
+	printf "\n";
+	for (i = 1; i <= nc; i++) {
+		printf "\"%s\"", cs[i];
+		for (j = 1; j <= ns; j++) {
+			printf ",\"%s\"", p[cs[i] ":" ss[j]];
+		}
+		printf "\n";
+	}
+}
+---EOF---
+awk -f $T/p.awk < /dev/null > $T/p.csv
+cp $T/p.csv $csvout
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 07/20] tools/rcutorture: Make identify_qemu_vcpus() independent of local language
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
                   ` (5 preceding siblings ...)
  2021-01-06 17:25 ` [PATCH tip/core/rcu 06/20] torture: Add config2csv.sh script to compare torture scenarios paulmck
@ 2021-01-06 17:25 ` paulmck
  2021-01-06 17:25 ` [PATCH tip/core/rcu 08/20] torture: Make kvm.sh "Test Summary" date be end of test paulmck
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:25 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Frederic Weisbecker,
	Paul E . McKenney

From: Frederic Weisbecker <frederic@kernel.org>

The rcutorture scripts' identify_qemu_vcpus() function expects `lscpu`
to have a "CPU: " line, for example:

	CPU(s):		8

But different local language settings can give different results:

	Processeur(s) :		8

As a result, identify_qemu_vcpus() may return an empty string, resulting
in the following warning (with the same local language settings):

	kvm-test-1-run.sh: ligne 138 : test:  : nombre entier attendu comme expression

This commit therefore changes identify_qemu_vcpus() to use getconf,
which produces local-language-independend output.

Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: rcu@vger.kernel.org
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh
index 8266349..fef8b4b 100644
--- a/tools/testing/selftests/rcutorture/bin/functions.sh
+++ b/tools/testing/selftests/rcutorture/bin/functions.sh
@@ -232,7 +232,7 @@ identify_qemu_args () {
 # Returns the number of virtual CPUs available to the aggregate of the
 # guest OSes.
 identify_qemu_vcpus () {
-	lscpu | grep '^CPU(s):' | sed -e 's/CPU(s)://' -e 's/[ 	]*//g'
+	getconf _NPROCESSORS_ONLN
 }
 
 # print_bug
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 08/20] torture: Make kvm.sh "Test Summary" date be end of test
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
                   ` (6 preceding siblings ...)
  2021-01-06 17:25 ` [PATCH tip/core/rcu 07/20] tools/rcutorture: Make identify_qemu_vcpus() independent of local language paulmck
@ 2021-01-06 17:25 ` paulmck
  2021-01-06 17:25 ` [PATCH tip/core/rcu 09/20] torture: Make kvm.sh arguments accumulate paulmck
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:25 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@kernel.org>

Currently, the "date" command producing the output on the kvm.sh "Test
Summary" line is executed at the beginning of the test, which produces a
date that is less than helpful to someone wanting to know the duration
of the test.  This commit therefore defers this command's execution to
the end of the test.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/kvm.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index 0a9211a..c8356d5 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -517,10 +517,12 @@ END {
 		dump(first, i, batchnum);
 }' >> $T/script
 
-cat << ___EOF___ >> $T/script
+cat << '___EOF___' >> $T/script
 echo
 echo
 echo " --- `date` Test summary:"
+___EOF___
+cat << ___EOF___ >> $T/script
 echo Results directory: $resdir/$ds
 kcsan-collapse.sh $resdir/$ds
 kvm-recheck.sh $resdir/$ds
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 09/20] torture: Make kvm.sh arguments accumulate
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
                   ` (7 preceding siblings ...)
  2021-01-06 17:25 ` [PATCH tip/core/rcu 08/20] torture: Make kvm.sh "Test Summary" date be end of test paulmck
@ 2021-01-06 17:25 ` paulmck
  2021-01-06 17:25 ` [PATCH tip/core/rcu 10/20] torture: Print run duration at end of kvm.sh execution paulmck
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:25 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@kernel.org>

Given that kvm.sh in invoked from scripts, it is only natural for
different levels of scripting to provide their own Kconfig option values,
for example.  Unfortunately, right now, the last such argument on the
command line wins.

This commit therefore makes the --bootargs, --configs, --kconfigs,
--kmake-args, and --qemu-args argument values accumulate.  For example,
where "--configs TREE01 --configs TREE02" would previously have run only
scenario TREE02, now it will run both scenarios.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/kvm.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index c8356d5..6fd7ef7 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -85,7 +85,7 @@ do
 		;;
 	--bootargs|--bootarg)
 		checkarg --bootargs "(list of kernel boot arguments)" "$#" "$2" '.*' '^--'
-		TORTURE_BOOTARGS="$2"
+		TORTURE_BOOTARGS="$TORTURE_BOOTARGS $2"
 		shift
 		;;
 	--bootimage)
@@ -97,8 +97,8 @@ do
 		TORTURE_BUILDONLY=1
 		;;
 	--configs|--config)
-		checkarg --configs "(list of config files)" "$#" "$2" '^[^/]*$' '^--'
-		configs="$2"
+		checkarg --configs "(list of config files)" "$#" "$2" '^[^/]\+$' '^--'
+		configs="$configs $2"
 		shift
 		;;
 	--cpus)
@@ -162,7 +162,7 @@ do
 		;;
 	--kconfig|--kconfigs)
 		checkarg --kconfig "(Kconfig options)" $# "$2" '^CONFIG_[A-Z0-9_]\+=\([ynm]\|[0-9]\+\)\( CONFIG_[A-Z0-9_]\+=\([ynm]\|[0-9]\+\)\)*$' '^error$'
-		TORTURE_KCONFIG_ARG="$2"
+		TORTURE_KCONFIG_ARG="`echo "$TORTURE_KCONFIG_ARG $2" | sed -e 's/^ *//' -e 's/ *$//'`"
 		shift
 		;;
 	--kasan)
@@ -173,7 +173,7 @@ do
 		;;
 	--kmake-arg|--kmake-args)
 		checkarg --kmake-arg "(kernel make arguments)" $# "$2" '.*' '^error$'
-		TORTURE_KMAKE_ARG="$2"
+		TORTURE_KMAKE_ARG="`echo "$TORTURE_KMAKE_ARG $2" | sed -e 's/^ *//' -e 's/ *$//'`"
 		shift
 		;;
 	--mac)
@@ -191,7 +191,7 @@ do
 		;;
 	--qemu-args|--qemu-arg)
 		checkarg --qemu-args "(qemu arguments)" $# "$2" '^-' '^error'
-		TORTURE_QEMU_ARG="$2"
+		TORTURE_QEMU_ARG="`echo "$TORTURE_QEMU_ARG $2" | sed -e 's/^ *//' -e 's/ *$//'`"
 		shift
 		;;
 	--qemu-cmd)
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 10/20] torture: Print run duration at end of kvm.sh execution
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
                   ` (8 preceding siblings ...)
  2021-01-06 17:25 ` [PATCH tip/core/rcu 09/20] torture: Make kvm.sh arguments accumulate paulmck
@ 2021-01-06 17:25 ` paulmck
  2021-01-06 17:25 ` [PATCH tip/core/rcu 11/20] torture: Make kvm.sh return failure upon build failure paulmck
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:25 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@kernel.org>

Yes, you can mentally subtract the timestamps, but this commit makes
the computer do this work.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 .../testing/selftests/rcutorture/bin/functions.sh  | 33 ++++++++++++++++++++++
 tools/testing/selftests/rcutorture/bin/kvm.sh      |  6 ++++
 2 files changed, 39 insertions(+)

diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh
index fef8b4b..97c3a17 100644
--- a/tools/testing/selftests/rcutorture/bin/functions.sh
+++ b/tools/testing/selftests/rcutorture/bin/functions.sh
@@ -108,6 +108,39 @@ configfrag_hotplug_cpu () {
 	grep -q '^CONFIG_HOTPLUG_CPU=y$' "$1"
 }
 
+# get_starttime
+#
+# Returns a cookie identifying the current time.
+get_starttime () {
+	awk 'BEGIN { print systime() }' < /dev/null
+}
+
+# get_starttime_duration starttime
+#
+# Given the return value from get_starttime, compute a human-readable
+# string denoting the time since get_starttime.
+get_starttime_duration () {
+	awk -v starttime=$1 '
+	BEGIN {
+		ts = systime() - starttime; 
+		tm = int(ts / 60);
+		th = int(ts / 3600);
+		td = int(ts / 86400);
+		d = td;
+		h = th - td * 24;
+		m = tm - th * 60;
+		s = ts - tm * 60;
+		if (d >= 1)
+			printf "%dd %d:%02d:%02d\n", d, h, m, s
+		else if (h >= 1)
+			printf "%d:%02d:%02d\n", h, m, s
+		else if (m >= 1)
+			printf "%d:%02d.0\n", m, s
+		else
+			print s " seconds"
+	}' < /dev/null
+}
+
 # identify_boot_image qemu-cmd
 #
 # Returns the relative path to the kernel build image.  This will be
diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index 6fd7ef7..6f21268 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -47,6 +47,9 @@ cpus=0
 ds=`date +%Y.%m.%d-%H.%M.%S`
 jitter="-1"
 
+startdate="`date`"
+starttime="`get_starttime`"
+
 usage () {
 	echo "Usage: $scriptname optional arguments:"
 	echo "       --allcpus"
@@ -548,6 +551,9 @@ then
 else
 	# Not a dryrun, so run the script.
 	sh $T/script
+	ret=$?
+	echo " --- Done at `date` (`get_starttime_duration $starttime`)"
+	exit $ret
 fi
 
 # Tracing: trace_event=rcu:rcu_grace_period,rcu:rcu_future_grace_period,rcu:rcu_grace_period_init,rcu:rcu_nocb_wake,rcu:rcu_preempt_task,rcu:rcu_unlock_preempted_task,rcu:rcu_quiescent_state_report,rcu:rcu_fqs,rcu:rcu_callback,rcu:rcu_kfree_callback,rcu:rcu_batch_start,rcu:rcu_invoke_callback,rcu:rcu_invoke_kfree_callback,rcu:rcu_batch_end,rcu:rcu_torture_read,rcu:rcu_barrier
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 11/20] torture: Make kvm.sh return failure upon build failure
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
                   ` (9 preceding siblings ...)
  2021-01-06 17:25 ` [PATCH tip/core/rcu 10/20] torture: Print run duration at end of kvm.sh execution paulmck
@ 2021-01-06 17:25 ` paulmck
  2021-01-06 17:25 ` [PATCH tip/core/rcu 12/20] torture: Make kvm.sh include --kconfig arguments in CPU calculation paulmck
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:25 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@kernel.org>

The kvm.sh script uses kvm-find-errors.sh to evaluate whether or not
a build failed.  Unfortunately, kvm-find-errors.sh returns success if
there are no failed runs (including when there are no runs at all) even if
there are build failures.  This commit therefore makes kvm-find-errors.sh
return failure in response to build failures.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh b/tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh
index 6f50722..be26598 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh
@@ -39,6 +39,7 @@ done
 if test -n "$files"
 then
 	$editor $files
+	editorret=1
 else
 	echo No build errors.
 fi
@@ -62,5 +63,10 @@ then
 	exit 1
 else
 	echo No errors in console logs.
-	exit 0
+	if test -n "$editorret"
+	then
+		exit $editorret
+	else
+		exit 0
+	fi
 fi
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 12/20] torture: Make kvm.sh include --kconfig arguments in CPU calculation
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
                   ` (10 preceding siblings ...)
  2021-01-06 17:25 ` [PATCH tip/core/rcu 11/20] torture: Make kvm.sh return failure upon build failure paulmck
@ 2021-01-06 17:25 ` paulmck
  2021-01-06 17:26 ` [PATCH tip/core/rcu 13/20] torture: Add kvm.sh test summary to end of log file paulmck
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:25 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@kernel.org>

Currently, passing something like "--kconfig CONFIG_NR_CPUS=2" to kvm.sh
has no effect on scenario scheduling.  For scenarios that do not specify
the number of CPUs, this can result in kvm.sh wastefully scheduling only
one scenario at a time even when the --kconfig argument would allow
a number to be run concurrently.  This commit therefore makes kvm.sh
consider the --kconfig arguments when scheduling scenarios across the
available CPUs.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/kvm.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index 6f21268..472929c 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -290,7 +290,13 @@ for CF1 in $configs_derep
 do
 	if test -f "$CONFIGFRAG/$CF1"
 	then
-		cpu_count=`configNR_CPUS.sh $CONFIGFRAG/$CF1`
+		if echo "$TORTURE_KCONFIG_ARG" | grep -q '\<CONFIG_NR_CPUS='
+		then
+			echo "$TORTURE_KCONFIG_ARG" | tr -s ' ' | tr ' ' '\012' > $T/KCONFIG_ARG
+			cpu_count=`configNR_CPUS.sh $T/KCONFIG_ARG`
+		else
+			cpu_count=`configNR_CPUS.sh $CONFIGFRAG/$CF1`
+		fi
 		cpu_count=`configfrag_boot_cpus "$TORTURE_BOOTARGS" "$CONFIGFRAG/$CF1" "$cpu_count"`
 		cpu_count=`configfrag_boot_maxcpus "$TORTURE_BOOTARGS" "$CONFIGFRAG/$CF1" "$cpu_count"`
 		echo $CF1 $cpu_count >> $T/cfgcpu
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 13/20] torture: Add kvm.sh test summary to end of log file
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
                   ` (11 preceding siblings ...)
  2021-01-06 17:25 ` [PATCH tip/core/rcu 12/20] torture: Make kvm.sh include --kconfig arguments in CPU calculation paulmck
@ 2021-01-06 17:26 ` paulmck
  2021-01-06 17:26 ` [PATCH tip/core/rcu 14/20] torture: Stop hanging on panic paulmck
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:26 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@kernel.org>

This commit adds the test summary to the end of the log in the top-level
directory containing the kvm.sh test artifacts.  While in the area, it adds
the kvm.sh exit code to this test summary.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/kvm.sh | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index 472929c..667896f 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -527,15 +527,18 @@ END {
 }' >> $T/script
 
 cat << '___EOF___' >> $T/script
-echo
-echo
-echo " --- `date` Test summary:"
+echo | tee -a $TORTURE_RESDIR/log
+echo | tee -a $TORTURE_RESDIR/log
+echo " --- `date` Test summary:" | tee -a $TORTURE_RESDIR/log
 ___EOF___
 cat << ___EOF___ >> $T/script
-echo Results directory: $resdir/$ds
-kcsan-collapse.sh $resdir/$ds
-kvm-recheck.sh $resdir/$ds
+echo Results directory: $resdir/$ds | tee -a $resdir/$ds/log
+kcsan-collapse.sh $resdir/$ds | tee -a $resdir/$ds/log
+kvm-recheck.sh $resdir/$ds > $T/kvm-recheck.sh.out 2>&1
 ___EOF___
+echo 'ret=$?' >> $T/script
+echo "cat $T/kvm-recheck.sh.out | tee -a $resdir/$ds/log" >> $T/script
+echo 'exit $ret' >> $T/script
 
 if test "$dryrun" = script
 then
@@ -556,9 +559,9 @@ then
 	exit 0
 else
 	# Not a dryrun, so run the script.
-	sh $T/script
+	bash $T/script
 	ret=$?
-	echo " --- Done at `date` (`get_starttime_duration $starttime`)"
+	echo " --- Done at `date` (`get_starttime_duration $starttime`) exitcode $ret" | tee -a $resdir/$ds/log
 	exit $ret
 fi
 
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 14/20] torture: Stop hanging on panic
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
                   ` (12 preceding siblings ...)
  2021-01-06 17:26 ` [PATCH tip/core/rcu 13/20] torture: Add kvm.sh test summary to end of log file paulmck
@ 2021-01-06 17:26 ` paulmck
  2021-01-06 17:26 ` [PATCH tip/core/rcu 15/20] torture: Add --dryrun batches to help schedule a distributed run paulmck
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:26 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@kernel.org>

By default, the "panic" kernel parameter is zero, which causes the kernel
to loop indefinitely after a panic().  The rcutorture scripting will
eventually kill the corresponding qemu process, but only after waiting
for the full run duration plus a few minutes.  This works, but delays
notifying the developer of the failure.

This commit therefore causes the rcutorture scripting to pass the
"panic=-1" kernel parameter, which caused the kernel to instead
unceremoniously shut down immediately.  This in turn causes qemu to
terminate, so that if all of the runs in a given batch panic(), the
rcutorture scripting can immediately proceed to the next batch.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/functions.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh
index 97c3a17..c35ba24 100644
--- a/tools/testing/selftests/rcutorture/bin/functions.sh
+++ b/tools/testing/selftests/rcutorture/bin/functions.sh
@@ -203,6 +203,7 @@ identify_qemu () {
 # and the TORTURE_QEMU_INTERACTIVE environment variable.
 identify_qemu_append () {
 	echo debug_boot_weak_hash
+	echo panic=-1
 	local console=ttyS0
 	case "$1" in
 	qemu-system-x86_64|qemu-system-i386)
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 15/20] torture: Add --dryrun batches to help schedule a distributed run
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
                   ` (13 preceding siblings ...)
  2021-01-06 17:26 ` [PATCH tip/core/rcu 14/20] torture: Stop hanging on panic paulmck
@ 2021-01-06 17:26 ` paulmck
  2021-01-06 17:26 ` [PATCH tip/core/rcu 16/20] torture: s/STOP/STOP.1/ to avoid scenario collision paulmck
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:26 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@kernel.org>

When all of the remote systems have the same number of CPUs, one
approach is to use one "--buildonly" run and one "--dryrun sched" run,
and then distributing the batches out one per remote system.  However,
the output of "--dryrun sched" is not made for parsing, so this commit
adds a "--dryrun batches" that provides the same information in easily
parsed form.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/kvm.sh | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index 667896f..6b900360 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -60,7 +60,7 @@ usage () {
 	echo "       --cpus N"
 	echo "       --datestamp string"
 	echo "       --defconfig string"
-	echo "       --dryrun sched|script"
+	echo "       --dryrun batches|sched|script"
 	echo "       --duration minutes | <seconds>s | <hours>h | <days>d"
 	echo "       --gdb"
 	echo "       --help"
@@ -126,7 +126,7 @@ do
 		shift
 		;;
 	--dryrun)
-		checkarg --dryrun "sched|script" $# "$2" 'sched\|script' '^--'
+		checkarg --dryrun "batches|sched|script" $# "$2" 'batches\|sched\|script' '^--'
 		dryrun=$2
 		shift
 		;;
@@ -235,7 +235,7 @@ do
 	shift
 done
 
-if test -z "$TORTURE_INITRD" || tools/testing/selftests/rcutorture/bin/mkinitrd.sh
+if test -n "$dryrun" || test -z "$TORTURE_INITRD" || tools/testing/selftests/rcutorture/bin/mkinitrd.sh
 then
 	:
 else
@@ -547,8 +547,7 @@ then
 elif test "$dryrun" = sched
 then
 	# Extract the test run schedule from the script.
-	egrep 'Start batch|Starting build\.' $T/script |
-		grep -v ">>" |
+	egrep 'Start batch|Starting build\.' $T/script | grep -v ">>" |
 		sed -e 's/:.*$//' -e 's/^echo //'
 	nbuilds="`grep 'Starting build\.' $T/script |
 		  grep -v ">>" | sed -e 's/:.*$//' -e 's/^echo //' |
@@ -557,6 +556,19 @@ then
 	nbatches="`grep 'Start batch' $T/script | grep -v ">>" | wc -l`"
 	echo Total number of batches: $nbatches
 	exit 0
+elif test "$dryrun" = batches
+then
+	# Extract the tests and their batches from the script.
+	egrep 'Start batch|Starting build\.' $T/script | grep -v ">>" |
+		sed -e 's/:.*$//' -e 's/^echo //' -e 's/-ovf//' |
+		awk '
+		/^----Start/ {
+			batchno = $3;
+			next;
+		}
+		{
+			print batchno, $1, $2
+		}'
 else
 	# Not a dryrun, so run the script.
 	bash $T/script
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 16/20] torture: s/STOP/STOP.1/ to avoid scenario collision
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
                   ` (14 preceding siblings ...)
  2021-01-06 17:26 ` [PATCH tip/core/rcu 15/20] torture: Add --dryrun batches to help schedule a distributed run paulmck
@ 2021-01-06 17:26 ` paulmck
  2021-01-06 17:26 ` [PATCH tip/core/rcu 17/20] torture: Simplify exit-code plumbing for kvm-recheck.sh and kvm-find-errors.sh paulmck
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:26 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@kernel.org>

This commit changes the "STOP" file that is used to cleanly halt a running
rcutorture run to "STOP.1" because no scenario directory will ever end
with ".1".  If there really was a scenario named "STOP", its directories
would instead be named "STOP", "STOP.2", "STOP.3", and so on.  While in
the area, the commit also changes the kernel-run-time checks for this
file to look directly in the directory above $resdir, thus avoiding the
need to pass the TORTURE_STOPFILE environment variable to remote systems.

While in the area, move the STOP.1 file to the top-level directory
covering all of the scenarios.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 8 ++++----
 tools/testing/selftests/rcutorture/bin/kvm.sh            | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
index 4bc0e62..536d103 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
@@ -211,7 +211,7 @@ do
 		if test -n "$TORTURE_KCONFIG_GDB_ARG"
 		then
 			:
-		elif test $kruntime -ge $seconds || test -f "$TORTURE_STOPFILE"
+		elif test $kruntime -ge $seconds || test -f "$resdir/../STOP.1"
 		then
 			break;
 		fi
@@ -254,16 +254,16 @@ then
 fi
 if test $commandcompleted -eq 0 -a -n "$qemu_pid"
 then
-	if ! test -f "$TORTURE_STOPFILE"
+	if ! test -f "$resdir/../STOP.1"
 	then
 		echo Grace period for qemu job at pid $qemu_pid
 	fi
 	oldline="`tail $resdir/console.log`"
 	while :
 	do
-		if test -f "$TORTURE_STOPFILE"
+		if test -f "$resdir/../STOP.1"
 		then
-			echo "PID $qemu_pid killed due to run STOP request" >> $resdir/Warnings 2>&1
+			echo "PID $qemu_pid killed due to run STOP.1 request" >> $resdir/Warnings 2>&1
 			kill -KILL $qemu_pid
 			break
 		fi
diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index 6b900360..6051868 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -386,7 +386,7 @@ then
 fi
 mkdir -p $resdir/$ds
 TORTURE_RESDIR="$resdir/$ds"; export TORTURE_RESDIR
-TORTURE_STOPFILE="$resdir/$ds/STOP"; export TORTURE_STOPFILE
+TORTURE_STOPFILE="$resdir/$ds/STOP.1"; export TORTURE_STOPFILE
 echo Results directory: $resdir/$ds
 echo $scriptname $args
 touch $resdir/$ds/log
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 17/20] torture: Simplify exit-code plumbing for kvm-recheck.sh and kvm-find-errors.sh
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
                   ` (15 preceding siblings ...)
  2021-01-06 17:26 ` [PATCH tip/core/rcu 16/20] torture: s/STOP/STOP.1/ to avoid scenario collision paulmck
@ 2021-01-06 17:26 ` paulmck
  2021-01-06 17:26 ` [PATCH tip/core/rcu 18/20] torture: Remove "Failed to add ttynull console" false positive paulmck
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:26 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@kernel.org>

This commit simplifies exit-code plumbing.  It makes kvm-recheck.sh return
the value 1 for a build error and 2 for a runtime error.  It also makes
kvm-find-errors.sh avoid checking runtime files for --build-only runs.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh | 1 +
 tools/testing/selftests/rcutorture/bin/kvm-recheck.sh     | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh b/tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh
index be26598..0670841 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh
@@ -46,6 +46,7 @@ fi
 if grep -q -e "--buildonly" < ${rundir}/log
 then
 	echo Build-only run, no console logs to check.
+	exit $editorret
 fi
 
 # Find console logs with errors
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
index 840a467..47cf4db 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
@@ -87,15 +87,16 @@ do
 	fi
 done
 EDITOR=echo kvm-find-errors.sh "${@: -1}" > $T 2>&1
-ret=$?
 builderrors="`tr ' ' '\012' < $T | grep -c '/Make.out.diags'`"
 if test "$builderrors" -gt 0
 then
 	echo $builderrors runs with build errors.
+	ret=1
 fi
 runerrors="`tr ' ' '\012' < $T | grep -c '/console.log.diags'`"
 if test "$runerrors" -gt 0
 then
 	echo $runerrors runs with runtime errors.
+	ret=2
 fi
 exit $ret
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 18/20] torture: Remove "Failed to add ttynull console" false positive
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
                   ` (16 preceding siblings ...)
  2021-01-06 17:26 ` [PATCH tip/core/rcu 17/20] torture: Simplify exit-code plumbing for kvm-recheck.sh and kvm-find-errors.sh paulmck
@ 2021-01-06 17:26 ` paulmck
  2021-01-06 17:26 ` [PATCH tip/core/rcu 19/20] torture: Allow standalone kvm-recheck.sh run detect --trust-make paulmck
  2021-01-06 17:26 ` [PATCH tip/core/rcu 20/20] torture: Do Kconfig analysis only once per scenario paulmck
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:26 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@kernel.org>

Commit 757055ae8ded ("init/console: Use ttynull as a fallback when
there is no console") results in the string "Warning: Failed to add
ttynull console. No stdin, stdout, and stderr for the init process!"
appearing on the console, which the rcutorture scripting interprets as
a warning, which causes every rcutorture run to be flagged.  However,
the rcutorture init process never attempts to do any I/O, and thus does
not care that it has no stdin, stdout, or stderr.

This commit therefore causes the rcutorture scripting to ignore this
message.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/console-badness.sh | 1 +
 tools/testing/selftests/rcutorture/bin/parse-console.sh   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/rcutorture/bin/console-badness.sh b/tools/testing/selftests/rcutorture/bin/console-badness.sh
index 80ae7f0..e6a132d 100755
--- a/tools/testing/selftests/rcutorture/bin/console-badness.sh
+++ b/tools/testing/selftests/rcutorture/bin/console-badness.sh
@@ -14,4 +14,5 @@ egrep 'Badness|WARNING:|Warn|BUG|===========|Call Trace:|Oops:|detected stalls o
 grep -v 'ODEBUG: ' |
 grep -v 'This means that this is a DEBUG kernel and it is' |
 grep -v 'Warning: unable to open an initial console' |
+grep -v 'Warning: Failed to add ttynull console. No stdin, stdout, and stderr.*the init process!' |
 grep -v 'NOHZ tick-stop error: Non-RCU local softirq work is pending, handler'
diff --git a/tools/testing/selftests/rcutorture/bin/parse-console.sh b/tools/testing/selftests/rcutorture/bin/parse-console.sh
index 263b1be..9f624bd 100755
--- a/tools/testing/selftests/rcutorture/bin/parse-console.sh
+++ b/tools/testing/selftests/rcutorture/bin/parse-console.sh
@@ -128,7 +128,7 @@ then
 	then
 		summary="$summary  Badness: $n_badness"
 	fi
-	n_warn=`grep -v 'Warning: unable to open an initial console' $file | egrep -c 'WARNING:|Warn'`
+	n_warn=`grep -v 'Warning: unable to open an initial console' $file | grep -v 'Warning: Failed to add ttynull console. No stdin, stdout, and stderr for the init process' | egrep -c 'WARNING:|Warn'`
 	if test "$n_warn" -ne 0
 	then
 		summary="$summary  Warnings: $n_warn"
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 19/20] torture: Allow standalone kvm-recheck.sh run detect --trust-make
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
                   ` (17 preceding siblings ...)
  2021-01-06 17:26 ` [PATCH tip/core/rcu 18/20] torture: Remove "Failed to add ttynull console" false positive paulmck
@ 2021-01-06 17:26 ` paulmck
  2021-01-06 17:26 ` [PATCH tip/core/rcu 20/20] torture: Do Kconfig analysis only once per scenario paulmck
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:26 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@kernel.org>

Normally, kvm-recheck.sh is run from kvm.sh, which provides the
TORTURE_TRUST_MAKE environment variable that, if a non-empty string,
indicates that the --trust-make command-line parameter has been passed
to kvm.sh.  If there was no --trust-make, kvm-recheck.sh insists
that the Make.out file contain at least one "CC" command.  Thus, when
kvm-recheck.sh is run standalone to evaluate a prior --trust-make run,
it will incorrectly insist that a proper kernel build did not happen.

This commit therefore causes kvm-recheck.sh to also search the "log"
file in the top-level results directory for the string "--trust-make".

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/parse-build.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/rcutorture/bin/parse-build.sh b/tools/testing/selftests/rcutorture/bin/parse-build.sh
index 09155c1..9313e50 100755
--- a/tools/testing/selftests/rcutorture/bin/parse-build.sh
+++ b/tools/testing/selftests/rcutorture/bin/parse-build.sh
@@ -21,7 +21,7 @@ mkdir $T
 
 . functions.sh
 
-if grep -q CC < $F || test -n "$TORTURE_TRUST_MAKE"
+if grep -q CC < $F || test -n "$TORTURE_TRUST_MAKE" || grep -qe --trust-make < `dirname $F`/../log
 then
 	:
 else
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH tip/core/rcu 20/20] torture: Do Kconfig analysis only once per scenario
  2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
                   ` (18 preceding siblings ...)
  2021-01-06 17:26 ` [PATCH tip/core/rcu 19/20] torture: Allow standalone kvm-recheck.sh run detect --trust-make paulmck
@ 2021-01-06 17:26 ` paulmck
  19 siblings, 0 replies; 21+ messages in thread
From: paulmck @ 2021-01-06 17:26 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

From: "Paul E. McKenney" <paulmck@kernel.org>

Currently, if a scenario is repeated as in "--configs '4*TREE01'",
the Kconfig analysis is performed for each occurrance (four times in
this example) and each analysis places the exact same data into the
exact same files.  This is not really an issue in this repetition-four
example, but it can needlessly consume tens of seconds of wallclock time
for something like "--config '128*TINY01'".

This commit therefore does Kconfig analysis only once per set of
repeats of a given scenario, courtesy of the "sort -u" command and an
automatically generated awk script.

While in the area, this commit also wordsmiths a comment.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/kvm.sh | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index 6051868..52a3c35 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -286,7 +286,8 @@ then
 		exit 1
 	fi
 fi
-for CF1 in $configs_derep
+echo 'BEGIN {' > $T/cfgcpu.awk
+for CF1 in `echo $configs_derep | tr -s ' ' '\012' | sort -u`
 do
 	if test -f "$CONFIGFRAG/$CF1"
 	then
@@ -299,12 +300,20 @@ do
 		fi
 		cpu_count=`configfrag_boot_cpus "$TORTURE_BOOTARGS" "$CONFIGFRAG/$CF1" "$cpu_count"`
 		cpu_count=`configfrag_boot_maxcpus "$TORTURE_BOOTARGS" "$CONFIGFRAG/$CF1" "$cpu_count"`
-		echo $CF1 $cpu_count >> $T/cfgcpu
+		echo 'scenariocpu['"$CF1"'] = '"$cpu_count"';' >> $T/cfgcpu.awk
 	else
 		echo "The --configs file $CF1 does not exist, terminating."
 		exit 1
 	fi
 done
+cat << '___EOF___' >> $T/cfgcpu.awk
+}
+{
+	for (i = 1; i <= NF; i++)
+		print $i, scenariocpu[$i];
+}
+___EOF___
+echo $configs_derep | awk -f $T/cfgcpu.awk > $T/cfgcpu
 sort -k2nr $T/cfgcpu -T="$T" > $T/cfgcpu.sort
 
 # Use a greedy bin-packing algorithm, sorting the list accordingly.
@@ -324,11 +333,10 @@ END {
 	batch = 0;
 	nc = -1;
 
-	# Each pass through the following loop creates on test batch
-	# that can be executed concurrently given ncpus.  Note that a
-	# given test that requires more than the available CPUs will run in
-	# their own batch.  Such tests just have to make do with what
-	# is available.
+	# Each pass through the following loop creates on test batch that
+	# can be executed concurrently given ncpus.  Note that a given test
+	# that requires more than the available CPUs will run in its own
+	# batch.  Such tests just have to make do with what is available.
 	while (nc != ncpus) {
 		batch++;
 		nc = ncpus;
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2021-01-06 17:28 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-06 17:25 [PATCH tip/core/rcu 0/20] Torture scripting updates for v5.12 Paul E. McKenney
2021-01-06 17:25 ` [PATCH tip/core/rcu 01/20] torture: Make --kcsan specify lockdep paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 02/20] torture: Make kvm.sh "--dryrun sched" summarize number of batches paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 03/20] torture: Make kvm.sh "--dryrun sched" summarize number of builds paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 04/20] torture: Allow kvm.sh --datestamp to specify subdirectories paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 05/20] torture: Prepare for splitting qemu execution from kvm-test-1-run.sh paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 06/20] torture: Add config2csv.sh script to compare torture scenarios paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 07/20] tools/rcutorture: Make identify_qemu_vcpus() independent of local language paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 08/20] torture: Make kvm.sh "Test Summary" date be end of test paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 09/20] torture: Make kvm.sh arguments accumulate paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 10/20] torture: Print run duration at end of kvm.sh execution paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 11/20] torture: Make kvm.sh return failure upon build failure paulmck
2021-01-06 17:25 ` [PATCH tip/core/rcu 12/20] torture: Make kvm.sh include --kconfig arguments in CPU calculation paulmck
2021-01-06 17:26 ` [PATCH tip/core/rcu 13/20] torture: Add kvm.sh test summary to end of log file paulmck
2021-01-06 17:26 ` [PATCH tip/core/rcu 14/20] torture: Stop hanging on panic paulmck
2021-01-06 17:26 ` [PATCH tip/core/rcu 15/20] torture: Add --dryrun batches to help schedule a distributed run paulmck
2021-01-06 17:26 ` [PATCH tip/core/rcu 16/20] torture: s/STOP/STOP.1/ to avoid scenario collision paulmck
2021-01-06 17:26 ` [PATCH tip/core/rcu 17/20] torture: Simplify exit-code plumbing for kvm-recheck.sh and kvm-find-errors.sh paulmck
2021-01-06 17:26 ` [PATCH tip/core/rcu 18/20] torture: Remove "Failed to add ttynull console" false positive paulmck
2021-01-06 17:26 ` [PATCH tip/core/rcu 19/20] torture: Allow standalone kvm-recheck.sh run detect --trust-make paulmck
2021-01-06 17:26 ` [PATCH tip/core/rcu 20/20] torture: Do Kconfig analysis only once per scenario paulmck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).