linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com,
	mingo@kernel.org, jiangshanlai@gmail.com,
	akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
	josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org,
	rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com,
	fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org,
	"Paul E. McKenney" <paulmck@kernel.org>
Subject: [PATCH rcu 17/21] torture: Consistently name "qemu*" test output files
Date: Wed, 21 Jul 2021 14:01:36 -0700	[thread overview]
Message-ID: <20210721210140.787717-17-paulmck@kernel.org> (raw)
In-Reply-To: <20210721205511.GA786917@paulmck-ThinkPad-P17-Gen-1>

There is "qemu-affinity", "qemu-cmd", "qemu-retval", but also "qemu_pid".
This is hard to remember, not so good for bash tab completion, and just
plain inconsistent.  This commit therefore renames the "qemu_pid" file to
"qemu-pid".  A couple of the scripts must deal with old runs, and thus
must handle both "qemu_pid" and "qemu-pid", but new runs will produce
"qemu-pid".

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 .../selftests/rcutorture/bin/kvm-again.sh        |  2 +-
 .../selftests/rcutorture/bin/kvm-remote.sh       |  2 +-
 .../rcutorture/bin/kvm-test-1-run-qemu.sh        | 16 ++++++++--------
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm-again.sh b/tools/testing/selftests/rcutorture/bin/kvm-again.sh
index d8c8483c46f13..b7b8d6856d7ec 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-again.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-again.sh
@@ -142,7 +142,7 @@ then
 	echo "Cannot copy from $oldrun to $rundir."
 	usage
 fi
-rm -f "$rundir"/*/{console.log,console.log.diags,qemu_pid,qemu-retval,Warnings,kvm-test-1-run.sh.out,kvm-test-1-run-qemu.sh.out,vmlinux} "$rundir"/log
+rm -f "$rundir"/*/{console.log,console.log.diags,qemu_pid,qemu-pid,qemu-retval,Warnings,kvm-test-1-run.sh.out,kvm-test-1-run-qemu.sh.out,vmlinux} "$rundir"/log
 touch "$rundir/log"
 echo $scriptname $args | tee -a "$rundir/log"
 echo $oldrun > "$rundir/re-run"
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-remote.sh b/tools/testing/selftests/rcutorture/bin/kvm-remote.sh
index f52641fdd1fe7..19cadb1b2f2d3 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-remote.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-remote.sh
@@ -254,7 +254,7 @@ do
 		sleep 30
 	done
 	echo " ---" Collecting results from $i `date`
-	( cd "$oldrun"; ssh $i "cd $rundir; tar -czf - kvm-remote-*.sh.out */console.log */kvm-test-1-run*.sh.out */qemu_pid */qemu-retval; rm -rf $T > /dev/null 2>&1" | tar -xzf - )
+	( cd "$oldrun"; ssh $i "cd $rundir; tar -czf - kvm-remote-*.sh.out */console.log */kvm-test-1-run*.sh.out */qemu[_-]pid */qemu-retval; rm -rf $T > /dev/null 2>&1" | tar -xzf - )
 done
 
 ( kvm-end-run-stats.sh "$oldrun" "$starttime"; echo $? > $T/exitcode ) | tee -a "$oldrun/remote-log"
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run-qemu.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run-qemu.sh
index b9a0bb6f01154..d828a34b5b89f 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run-qemu.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run-qemu.sh
@@ -47,7 +47,7 @@ then
 fi
 sed -e 's/^[^#].*$/'"$taskset_command"'& 2>\&1 \&/' < $resdir/qemu-cmd > $T/qemu-cmd
 echo 'qemu_pid=$!' >> $T/qemu-cmd
-echo 'echo $qemu_pid > $resdir/qemu_pid' >> $T/qemu-cmd
+echo 'echo $qemu_pid > $resdir/qemu-pid' >> $T/qemu-cmd
 echo 'taskset -c -p $qemu_pid > $resdir/qemu-affinity' >> $T/qemu-cmd
 
 # In case qemu refuses to run...
@@ -55,14 +55,14 @@ 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 ) &
+( . $T/qemu-cmd; wait `cat  $resdir/qemu-pid`; echo $? > $resdir/qemu-retval ) &
 commandcompleted=0
 if test -z "$TORTURE_KCONFIG_GDB_ARG"
 then
 	sleep 10 # Give qemu's pid a chance to reach the file
-	if test -s "$resdir/qemu_pid"
+	if test -s "$resdir/qemu-pid"
 	then
-		qemu_pid=`cat "$resdir/qemu_pid"`
+		qemu_pid=`cat "$resdir/qemu-pid"`
 		echo Monitoring qemu job at pid $qemu_pid
 	else
 		qemu_pid=""
@@ -89,9 +89,9 @@ then
 fi
 while :
 do
-	if test -z "$qemu_pid" -a -s "$resdir/qemu_pid"
+	if test -z "$qemu_pid" -a -s "$resdir/qemu-pid"
 	then
-		qemu_pid=`cat "$resdir/qemu_pid"`
+		qemu_pid=`cat "$resdir/qemu-pid"`
 	fi
 	kruntime=`gawk 'BEGIN { print systime() - '"$kstarttime"' }' < /dev/null`
 	if test -z "$qemu_pid" || kill -0 "$qemu_pid" > /dev/null 2>&1
@@ -122,9 +122,9 @@ do
 		break
 	fi
 done
-if test -z "$qemu_pid" -a -s "$resdir/qemu_pid"
+if test -z "$qemu_pid" -a -s "$resdir/qemu-pid"
 then
-	qemu_pid=`cat "$resdir/qemu_pid"`
+	qemu_pid=`cat "$resdir/qemu-pid"`
 fi
 if test $commandcompleted -eq 0 -a -n "$qemu_pid"
 then
-- 
2.31.1.189.g2e36527f23


  parent reply	other threads:[~2021-07-21 21:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-21 20:55 [PATCH rcu 0/21] Torture-test scripting updates for v5.15 Paul E. McKenney
2021-07-21 21:01 ` [PATCH rcu 01/21] torture: Add clocksource-watchdog testing to torture.sh Paul E. McKenney
2021-07-21 21:01 ` [PATCH rcu 02/21] torture: Make torture.sh accept --do-all and --donone Paul E. McKenney
2021-07-21 21:01 ` [PATCH rcu 03/21] torture: Enable KCSAN summaries over groups of torture-test runs Paul E. McKenney
2021-07-21 21:01 ` [PATCH rcu 04/21] torture: Create KCSAN summaries for torture.sh runs Paul E. McKenney
2021-07-21 21:01 ` [PATCH rcu 05/21] torture: Make kvm-recheck-scf.sh tolerate qemu-cmd comments Paul E. McKenney
2021-07-21 21:01 ` [PATCH rcu 06/21] torture: Make kvm-recheck-lock.sh " Paul E. McKenney
2021-07-21 21:01 ` [PATCH rcu 07/21] torture: Log more kvm-remote.sh information Paul E. McKenney
2021-07-21 21:01 ` [PATCH rcu 08/21] torture: Protect kvm-remote.sh directory trees from /tmp reaping Paul E. McKenney
2021-07-21 21:01 ` [PATCH rcu 09/21] torture: Make kvm-recheck.sh skip kcsan.sum for build-only runs Paul E. McKenney
2021-07-21 21:01 ` [PATCH rcu 10/21] torture: Move parse-console.sh call to PATH-aware scripts Paul E. McKenney
2021-07-21 21:01 ` [PATCH rcu 11/21] torture: Put kvm.sh batch-creation awk script into a temp file Paul E. McKenney
2021-07-21 21:01 ` [PATCH rcu 12/21] torture: Make kvm.sh select per-scenario affinity masks Paul E. McKenney
2021-07-21 21:01 ` [PATCH rcu 13/21] torture: Don't redirect qemu-cmd comment lines Paul E. McKenney
2021-07-21 21:01 ` [PATCH rcu 14/21] torture: Make kvm-test-1-run-qemu.sh apply affinity Paul E. McKenney
2021-07-21 21:01 ` [PATCH rcu 15/21] rcutorture: Upgrade two-CPU scenarios to four CPUs Paul E. McKenney
2021-07-21 21:01 ` [PATCH rcu 16/21] torture: Use numeric taskset argument in jitter.sh Paul E. McKenney
2021-07-21 21:01 ` Paul E. McKenney [this message]
2021-07-21 21:01 ` [PATCH rcu 18/21] torture: Make kvm-test-1-run-batch.sh select per-scenario affinity masks Paul E. McKenney
2021-07-21 21:01 ` [PATCH rcu 19/21] torture: Don't use "test" command's "-a" argument Paul E. McKenney
2021-07-21 21:01 ` [PATCH rcu 20/21] torture: Add timestamps to kvm-test-1-run-qemu.sh output Paul E. McKenney
2021-07-21 21:01 ` [PATCH rcu 21/21] torture: Make kvm-test-1-run-qemu.sh check for reboot loops Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210721210140.787717-17-paulmck@kernel.org \
    --to=paulmck@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=edumazet@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).