All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] Trivial fixup for KVM-based rcutorture test framework
@ 2017-11-03 10:17 SeongJae Park
  2017-11-03 10:17 ` [PATCH 1/9] rcutorture/configinit: Fix build directory error message SeongJae Park
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: SeongJae Park @ 2017-11-03 10:17 UTC (permalink / raw)
  To: paulmck, josh, rostedt
  Cc: shuah, linux-kernel, linux-kselftest, SeongJae Park

This patchset contains trivial fixup and enhancements for KVM-based rcutorture
test framework.

SeongJae Park (9):
  rcutorture/configinit: Fix build directory error message
  rcutorture: Remove unused script, config2frag.sh
  rcutorture/kvm.sh: Remove unused variable, `alldone`
  rcutorture/kvm.sh: Use consistent usage for --qemu-args
  rcutorture/kvm.sh: Support execution from any directory
  rcutorture/kvm-recheck-*: Improve result directory readability check
  rcutorture/kvm-build.sh: Skip build directory check
  rcutorture: Simplify logging
  rcutorture: Simplify functions.sh include path

 .../selftests/rcutorture/bin/config2frag.sh        | 25 -------------
 .../testing/selftests/rcutorture/bin/configinit.sh |  2 +-
 .../testing/selftests/rcutorture/bin/kvm-build.sh  |  5 ---
 .../selftests/rcutorture/bin/kvm-recheck-lock.sh   |  2 +-
 .../selftests/rcutorture/bin/kvm-recheck-rcu.sh    |  4 +--
 .../rcutorture/bin/kvm-recheck-rcuperf-ftrace.sh   |  2 +-
 .../rcutorture/bin/kvm-recheck-rcuperf.sh          |  4 +--
 .../selftests/rcutorture/bin/kvm-recheck.sh        |  2 +-
 .../selftests/rcutorture/bin/kvm-test-1-run.sh     |  6 ++--
 tools/testing/selftests/rcutorture/bin/kvm.sh      | 42 +++++++++-------------
 10 files changed, 26 insertions(+), 68 deletions(-)
 delete mode 100755 tools/testing/selftests/rcutorture/bin/config2frag.sh

-- 
2.13.0

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

* [PATCH 1/9] rcutorture/configinit: Fix build directory error message
  2017-11-03 10:17 [PATCH 0/9] Trivial fixup for KVM-based rcutorture test framework SeongJae Park
@ 2017-11-03 10:17 ` SeongJae Park
  2017-11-03 10:17 ` [PATCH 2/9] rcutorture: Remove unused script, config2frag.sh SeongJae Park
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: SeongJae Park @ 2017-11-03 10:17 UTC (permalink / raw)
  To: paulmck, josh, rostedt
  Cc: shuah, linux-kernel, linux-kselftest, SeongJae Park

'configinit.sh' checks format of optional argument for build directory
and print error message if the format is not valid.  However, the error
message is broken so that it just says user entered empty string as
build directory even though user entered wrong, but non-empty string as
the argument.  This commit fixes the message to show what user entered
for the argument.

Fixes: c87b9c601ac8 ("rcutorture: Add KVM-based test framework")

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
 tools/testing/selftests/rcutorture/bin/configinit.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/rcutorture/bin/configinit.sh b/tools/testing/selftests/rcutorture/bin/configinit.sh
index 3f81a1095206..50a6371b2b2e 100755
--- a/tools/testing/selftests/rcutorture/bin/configinit.sh
+++ b/tools/testing/selftests/rcutorture/bin/configinit.sh
@@ -51,7 +51,7 @@ then
 			mkdir $builddir
 		fi
 	else
-		echo Bad build directory: \"$builddir\"
+		echo Bad build directory: \"$buildloc\"
 		exit 2
 	fi
 fi
-- 
2.13.0

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

* [PATCH 2/9] rcutorture: Remove unused script, config2frag.sh
  2017-11-03 10:17 [PATCH 0/9] Trivial fixup for KVM-based rcutorture test framework SeongJae Park
  2017-11-03 10:17 ` [PATCH 1/9] rcutorture/configinit: Fix build directory error message SeongJae Park
@ 2017-11-03 10:17 ` SeongJae Park
  2017-11-03 10:17 ` [PATCH 3/9] rcutorture/kvm.sh: Remove unused variable, `alldone` SeongJae Park
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: SeongJae Park @ 2017-11-03 10:17 UTC (permalink / raw)
  To: paulmck, josh, rostedt
  Cc: shuah, linux-kernel, linux-kselftest, SeongJae Park

'config2frag.sh' is not used from anywhere.  Just remove it.

Fixes: c87b9c601ac8 ("rcutorture: Add KVM-based test framework")

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
 .../selftests/rcutorture/bin/config2frag.sh        | 25 ----------------------
 1 file changed, 25 deletions(-)
 delete mode 100755 tools/testing/selftests/rcutorture/bin/config2frag.sh

diff --git a/tools/testing/selftests/rcutorture/bin/config2frag.sh b/tools/testing/selftests/rcutorture/bin/config2frag.sh
deleted file mode 100755
index 56f51ae13d73..000000000000
--- a/tools/testing/selftests/rcutorture/bin/config2frag.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-# Usage: config2frag.sh < .config > configfrag
-#
-# Converts the "# CONFIG_XXX is not set" to "CONFIG_XXX=n" so that the
-# resulting file becomes a legitimate Kconfig fragment.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, you can access it online at
-# http://www.gnu.org/licenses/gpl-2.0.html.
-#
-# Copyright (C) IBM Corporation, 2013
-#
-# Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-
-LANG=C sed -e 's/^# CONFIG_\([a-zA-Z0-9_]*\) is not set$/CONFIG_\1=n/'
-- 
2.13.0

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

* [PATCH 3/9] rcutorture/kvm.sh: Remove unused variable, `alldone`
  2017-11-03 10:17 [PATCH 0/9] Trivial fixup for KVM-based rcutorture test framework SeongJae Park
  2017-11-03 10:17 ` [PATCH 1/9] rcutorture/configinit: Fix build directory error message SeongJae Park
  2017-11-03 10:17 ` [PATCH 2/9] rcutorture: Remove unused script, config2frag.sh SeongJae Park
@ 2017-11-03 10:17 ` SeongJae Park
  2017-11-03 10:17 ` [PATCH 4/9] rcutorture/kvm.sh: Use consistent usage for --qemu-args SeongJae Park
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: SeongJae Park @ 2017-11-03 10:17 UTC (permalink / raw)
  To: paulmck, josh, rostedt
  Cc: shuah, linux-kernel, linux-kselftest, SeongJae Park

Variable `alldone` is defined but not used within an awk script.  This
commit removes it.

Fixes:53954671033d ("rcutorture: Do better bin packing")

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
 tools/testing/selftests/rcutorture/bin/kvm.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index b55895fb10ed..0acdfa37c8ab 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -238,7 +238,6 @@ BEGIN {
 }
 
 END {
-	alldone = 0;
 	batch = 0;
 	nc = -1;
 
-- 
2.13.0

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

* [PATCH 4/9] rcutorture/kvm.sh: Use consistent usage for --qemu-args
  2017-11-03 10:17 [PATCH 0/9] Trivial fixup for KVM-based rcutorture test framework SeongJae Park
                   ` (2 preceding siblings ...)
  2017-11-03 10:17 ` [PATCH 3/9] rcutorture/kvm.sh: Remove unused variable, `alldone` SeongJae Park
@ 2017-11-03 10:17 ` SeongJae Park
  2017-11-03 10:17 ` [PATCH 5/9] rcutorture/kvm.sh: Support execution from any directory SeongJae Park
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: SeongJae Park @ 2017-11-03 10:17 UTC (permalink / raw)
  To: paulmck, josh, rostedt
  Cc: shuah, linux-kernel, linux-kselftest, SeongJae Park

'--qemu-args' option usage is wrongly copied from '--qemu-cmd' option
and it's argument type description message format is inconsistent with
other arguments.  This commit fixes the usage and type messages to be
consistent with others.

Fixes: e9ce640001c6 ("rcutorture: Add --qemu-args argument to kvm.sh")

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
 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 0acdfa37c8ab..36f7f499698f 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -70,7 +70,7 @@ usage () {
 	echo "       --kmake-arg kernel-make-arguments"
 	echo "       --mac nn:nn:nn:nn:nn:nn"
 	echo "       --no-initrd"
-	echo "       --qemu-args qemu-system-..."
+	echo "       --qemu-args qemu-arguments"
 	echo "       --qemu-cmd qemu-system-..."
 	echo "       --results absolute-pathname"
 	echo "       --torture rcu"
@@ -150,7 +150,7 @@ do
 		TORTURE_INITRD=""; export TORTURE_INITRD
 		;;
 	--qemu-args|--qemu-arg)
-		checkarg --qemu-args "-qemu args" $# "$2" '^-' '^error'
+		checkarg --qemu-args "(qemu arguments)" $# "$2" '^-' '^error'
 		TORTURE_QEMU_ARG="$2"
 		shift
 		;;
-- 
2.13.0

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

* [PATCH 5/9] rcutorture/kvm.sh: Support execution from any directory
  2017-11-03 10:17 [PATCH 0/9] Trivial fixup for KVM-based rcutorture test framework SeongJae Park
                   ` (3 preceding siblings ...)
  2017-11-03 10:17 ` [PATCH 4/9] rcutorture/kvm.sh: Use consistent usage for --qemu-args SeongJae Park
@ 2017-11-03 10:17 ` SeongJae Park
  2017-11-03 10:17 ` [PATCH 6/9] rcutorture/kvm-recheck-*: Improve result directory readability check SeongJae Park
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: SeongJae Park @ 2017-11-03 10:17 UTC (permalink / raw)
  To: paulmck, josh, rostedt
  Cc: shuah, linux-kernel, linux-kselftest, SeongJae Park

'kvm.sh' for rcutorture is restricting user to execute it from top of
linux source tree.  It is just a subtle restriction, but users using it
for the first time could forget the restriction and be confused.
Moreover, it makes commands a little longer and the long commands could
frustrate debugging people.  This commit let users to call the script
from any location.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
 tools/testing/selftests/rcutorture/bin/kvm.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index 36f7f499698f..cd62933e33d7 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -1,8 +1,7 @@
 #!/bin/bash
 #
 # Run a series of 14 tests under KVM.  These are not particularly
-# well-selected or well-tuned, but are the current set.  Run from the
-# top level of the source tree.
+# well-selected or well-tuned, but are the current set.
 #
 # Edit the definitions below to set the locations of the various directories,
 # as well as the test duration.
@@ -34,6 +33,8 @@ T=/tmp/kvm.sh.$$
 trap 'rm -rf $T' 0
 mkdir $T
 
+cd `dirname $scriptname`/../../../../../
+
 dur=$((30*60))
 dryrun=""
 KVM="`pwd`/tools/testing/selftests/rcutorture"; export KVM
-- 
2.13.0

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

* [PATCH 6/9] rcutorture/kvm-recheck-*: Improve result directory readability check
  2017-11-03 10:17 [PATCH 0/9] Trivial fixup for KVM-based rcutorture test framework SeongJae Park
                   ` (4 preceding siblings ...)
  2017-11-03 10:17 ` [PATCH 5/9] rcutorture/kvm.sh: Support execution from any directory SeongJae Park
@ 2017-11-03 10:17 ` SeongJae Park
  2017-11-03 10:17 ` [PATCH 7/9] rcutorture/kvm-build.sh: Skip build directory check SeongJae Park
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: SeongJae Park @ 2017-11-03 10:17 UTC (permalink / raw)
  To: paulmck, josh, rostedt
  Cc: shuah, linux-kernel, linux-kselftest, SeongJae Park

kvm-recheck-(lock|rcu|rcuperf).sh is checking whether user specified
result directory exists or not.  If not, it prints out error message
that says the specified directory is not readable directory.  To make
the message more precise, this commit adds readability check of the
directory.

Fixes: 2193e1604eac ("rcutorture: Abstract kvm-recheck.sh")

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
 tools/testing/selftests/rcutorture/bin/kvm-recheck-lock.sh    | 2 +-
 tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh     | 2 +-
 tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf.sh | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck-lock.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck-lock.sh
index 43f764098e50..2de92f43ee8c 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-recheck-lock.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck-lock.sh
@@ -23,7 +23,7 @@
 # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
 
 i="$1"
-if test -d $i
+if test -d "$i" -a -r "$i"
 then
 	:
 else
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh
index 559e01ac86be..9e34656bf659 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh
@@ -23,7 +23,7 @@
 # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
 
 i="$1"
-if test -d $i
+if test -d "$i" -a -r "$i"
 then
 	:
 else
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf.sh
index 8f3121afc716..6138fd94abfe 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf.sh
@@ -23,7 +23,7 @@
 # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
 
 i="$1"
-if test -d $i
+if test -d "$i" -a -r "$i"
 then
 	:
 else
-- 
2.13.0

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

* [PATCH 7/9] rcutorture/kvm-build.sh: Skip build directory check
  2017-11-03 10:17 [PATCH 0/9] Trivial fixup for KVM-based rcutorture test framework SeongJae Park
                   ` (5 preceding siblings ...)
  2017-11-03 10:17 ` [PATCH 6/9] rcutorture/kvm-recheck-*: Improve result directory readability check SeongJae Park
@ 2017-11-03 10:17 ` SeongJae Park
  2017-11-03 10:17 ` [PATCH 8/9] rcutorture: Simplify logging SeongJae Park
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: SeongJae Park @ 2017-11-03 10:17 UTC (permalink / raw)
  To: paulmck, josh, rostedt
  Cc: shuah, linux-kernel, linux-kselftest, SeongJae Park

Check of existence and write permisison for build directory exists in
'kvm-test-1-run.sh' an 'kvm-build.sh'.  Because the 'kvm-build.sh' is
dependent to 'kvm-test-1-run.sh' ('kvm-build.sh' uses variables that
defined from its caller.), it is an unnecessary duplicate.  This commit
removes, thus, the duplicated check in 'kvm-build.sh' script.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
 tools/testing/selftests/rcutorture/bin/kvm-build.sh | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm-build.sh b/tools/testing/selftests/rcutorture/bin/kvm-build.sh
index 46752c164676..df1c9bb40337 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-build.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-build.sh
@@ -29,11 +29,6 @@ then
 	exit 1
 fi
 builddir=${2}
-if test -z "$builddir" -o ! -d "$builddir" -o ! -w "$builddir"
-then
-	echo "kvm-build.sh :$builddir: Not a writable directory, cannot build into it"
-	exit 1
-fi
 
 T=/tmp/test-linux.sh.$$
 trap 'rm -rf $T' 0
-- 
2.13.0

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

* [PATCH 8/9] rcutorture: Simplify logging
  2017-11-03 10:17 [PATCH 0/9] Trivial fixup for KVM-based rcutorture test framework SeongJae Park
                   ` (6 preceding siblings ...)
  2017-11-03 10:17 ` [PATCH 7/9] rcutorture/kvm-build.sh: Skip build directory check SeongJae Park
@ 2017-11-03 10:17 ` SeongJae Park
  2017-11-03 10:17 ` [PATCH 9/9] rcutorture: Simplify functions.sh include path SeongJae Park
  2017-11-03 17:59 ` [PATCH 0/9] Trivial fixup for KVM-based rcutorture test framework Paul E. McKenney
  9 siblings, 0 replies; 12+ messages in thread
From: SeongJae Park @ 2017-11-03 10:17 UTC (permalink / raw)
  To: paulmck, josh, rostedt
  Cc: shuah, linux-kernel, linux-kselftest, SeongJae Park

'kvm.sh' and 'kvm-test-1-run.sh' log messages by printing the message to
'stdout' then writing it into the log file.  Generation of the message
occurs twice once for 'stdout', and once for log file.  It is redundant.
Moreover, many of the messages are containing 'date' output inside the
messages.  Because the 'date' calculation also be called twice (once for
stdout print, once for log file write), the date information in stdout
and log file can be different.  It could confuse some sensitive mind
people.

This commit simplifies the logging procedure by using 'tee'.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
 .../selftests/rcutorture/bin/kvm-test-1-run.sh     |  4 +--
 tools/testing/selftests/rcutorture/bin/kvm.sh      | 32 ++++++++--------------
 2 files changed, 12 insertions(+), 24 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 0af36a721b9c..2678a9d0733d 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
@@ -154,9 +154,7 @@ cpu_count=`configfrag_boot_cpus "$boot_args" "$config_template" "$cpu_count"`
 vcpus=`identify_qemu_vcpus`
 if test $cpu_count -gt $vcpus
 then
-	echo CPU count limited from $cpu_count to $vcpus
-	touch $resdir/Warnings
-	echo CPU count limited from $cpu_count to $vcpus >> $resdir/Warnings
+	echo CPU count limited from $cpu_count to $vcpus | tee -a $resdir/Warnings
 	cpu_count=$vcpus
 fi
 qemu_args="`specify_qemu_cpus "$QEMU" "$qemu_args" "$cpu_count"`"
diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index cd62933e33d7..a7bbe2dc8791 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -331,8 +331,7 @@ awk < $T/cfgcpu.pack \
 # Dump out the scripting required to run one test batch.
 function dump(first, pastlast, batchnum)
 {
-	print "echo ----Start batch " batchnum ": `date`";
-	print "echo ----Start batch " batchnum ": `date` >> " rd "/log";
+	print "echo ----Start batch " batchnum ": `date` | tee -a " rd "log";
 	print "needqemurun="
 	jn=1
 	for (j = first; j < pastlast; j++) {
@@ -349,21 +348,18 @@ function dump(first, pastlast, batchnum)
 			ovf = "-ovf";
 		else
 			ovf = "";
-		print "echo ", cfr[jn], cpusr[jn] ovf ": Starting build. `date`";
-		print "echo ", cfr[jn], cpusr[jn] ovf ": Starting build. `date` >> " rd "/log";
+		print "echo ", cfr[jn], cpusr[jn] ovf ": Starting build. `date` | tee -a " rd "log";
 		print "rm -f " builddir ".*";
 		print "touch " builddir ".wait";
 		print "mkdir " builddir " > /dev/null 2>&1 || :";
 		print "mkdir " rd cfr[jn] " || :";
 		print "kvm-test-1-run.sh " CONFIGDIR cf[j], builddir, rd cfr[jn], dur " \"" TORTURE_QEMU_ARG "\" \"" TORTURE_BOOTARGS "\" > " rd cfr[jn]  "/kvm-test-1-run.sh.out 2>&1 &"
-		print "echo ", cfr[jn], cpusr[jn] ovf ": Waiting for build to complete. `date`";
-		print "echo ", cfr[jn], cpusr[jn] ovf ": Waiting for build to complete. `date` >> " rd "/log";
+		print "echo ", cfr[jn], cpusr[jn] ovf ": Waiting for build to complete. `date` | tee -a " rd "log";
 		print "while test -f " builddir ".wait"
 		print "do"
 		print "\tsleep 1"
 		print "done"
-		print "echo ", cfr[jn], cpusr[jn] ovf ": Build complete. `date`";
-		print "echo ", cfr[jn], cpusr[jn] ovf ": Build complete. `date` >> " rd "/log";
+		print "echo ", cfr[jn], cpusr[jn] ovf ": Build complete. `date` | tee -a " rd "log";
 		jn++;
 	}
 	for (j = 1; j < jn; j++) {
@@ -371,8 +367,7 @@ function dump(first, pastlast, batchnum)
 		print "rm -f " builddir ".ready"
 		print "if test -f \"" rd cfr[j] "/builtkernel\""
 		print "then"
-		print "\techo ----", cfr[j], cpusr[j] ovf ": Kernel present. `date`";
-		print "\techo ----", cfr[j], cpusr[j] ovf ": Kernel present. `date` >> " rd "/log";
+		print "\techo ----", cfr[j], cpusr[j] ovf ": Kernel present. `date` | tee -a " rd "log";
 		print "\tneedqemurun=1"
 		print "fi"
 	}
@@ -386,31 +381,26 @@ function dump(first, pastlast, batchnum)
 		njitter = ja[1];
 	if (TORTURE_BUILDONLY && njitter != 0) {
 		njitter = 0;
-		print "echo Build-only run, so suppressing jitter >> " rd "/log"
+		print "echo Build-only run, so suppressing jitter | tee -a " rd "log"
 	}
 	if (TORTURE_BUILDONLY) {
 		print "needqemurun="
 	}
 	print "if test -n \"$needqemurun\""
 	print "then"
-	print "\techo ---- Starting kernels. `date`";
-	print "\techo ---- Starting kernels. `date` >> " rd "/log";
+	print "\techo ---- Starting kernels. `date` | tee -a " rd "log";
 	for (j = 0; j < njitter; j++)
 		print "\tjitter.sh " j " " dur " " ja[2] " " ja[3] "&"
 	print "\twait"
-	print "\techo ---- All kernel runs complete. `date`";
-	print "\techo ---- All kernel runs complete. `date` >> " rd "/log";
+	print "\techo ---- All kernel runs complete. `date` | tee -a " rd "log";
 	print "else"
 	print "\twait"
-	print "\techo ---- No kernel runs. `date`";
-	print "\techo ---- No kernel runs. `date` >> " rd "/log";
+	print "\techo ---- No kernel runs. `date` | tee -a " rd "log";
 	print "fi"
 	for (j = 1; j < jn; j++) {
 		builddir=KVM "/b" j
-		print "echo ----", cfr[j], cpusr[j] ovf ": Build/run results:";
-		print "echo ----", cfr[j], cpusr[j] ovf ": Build/run results: >> " rd "/log";
-		print "cat " rd cfr[j]  "/kvm-test-1-run.sh.out";
-		print "cat " rd cfr[j]  "/kvm-test-1-run.sh.out >> " rd "/log";
+		print "echo ----", cfr[j], cpusr[j] ovf ": Build/run results: | tee -a " rd "log";
+		print "cat " rd cfr[j]  "/kvm-test-1-run.sh.out | tee -a " rd "log";
 	}
 }
 
-- 
2.13.0

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

* [PATCH 9/9] rcutorture: Simplify functions.sh include path
  2017-11-03 10:17 [PATCH 0/9] Trivial fixup for KVM-based rcutorture test framework SeongJae Park
                   ` (7 preceding siblings ...)
  2017-11-03 10:17 ` [PATCH 8/9] rcutorture: Simplify logging SeongJae Park
@ 2017-11-03 10:17 ` SeongJae Park
  2017-11-03 17:59 ` [PATCH 0/9] Trivial fixup for KVM-based rcutorture test framework Paul E. McKenney
  9 siblings, 0 replies; 12+ messages in thread
From: SeongJae Park @ 2017-11-03 10:17 UTC (permalink / raw)
  To: paulmck, josh, rostedt
  Cc: shuah, linux-kernel, linux-kselftest, SeongJae Park

Inclusions of 'functions.sh' from 'kvm-test-1-run.sh' and
'kvm-recheck*.sh' are using its absolute path.  Because directory for
'functions.sh' is already in PATH, however, it could be included without
the full path.  This commit simplifies the inclusions to use simple,
short relative path.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
 tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh            | 2 +-
 tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf-ftrace.sh | 2 +-
 tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf.sh        | 2 +-
 tools/testing/selftests/rcutorture/bin/kvm-recheck.sh                | 2 +-
 tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh             | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh
index 9e34656bf659..c2e1bb6d0cba 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh
@@ -30,7 +30,7 @@ else
 	echo Unreadable results directory: $i
 	exit 1
 fi
-. tools/testing/selftests/rcutorture/bin/functions.sh
+. functions.sh
 
 configfile=`echo $i | sed -e 's/^.*\///'`
 ngps=`grep ver: $i/console.log 2> /dev/null | tail -1 | sed -e 's/^.* ver: //' -e 's/ .*$//'`
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf-ftrace.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf-ftrace.sh
index f79b0e9e84fc..963f71289d22 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf-ftrace.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf-ftrace.sh
@@ -26,7 +26,7 @@
 # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
 
 i="$1"
-. tools/testing/selftests/rcutorture/bin/functions.sh
+. functions.sh
 
 if test "`grep -c 'rcu_exp_grace_period.*start' < $i/console.log`" -lt 100
 then
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf.sh
index 6138fd94abfe..ccebf772fa1e 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcuperf.sh
@@ -31,7 +31,7 @@ else
 	exit 1
 fi
 PATH=`pwd`/tools/testing/selftests/rcutorture/bin:$PATH; export PATH
-. tools/testing/selftests/rcutorture/bin/functions.sh
+. functions.sh
 
 if kvm-recheck-rcuperf-ftrace.sh $i
 then
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
index f659346d3358..f7e988f369dd 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
@@ -25,7 +25,7 @@
 # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
 
 PATH=`pwd`/tools/testing/selftests/rcutorture/bin:$PATH; export PATH
-. tools/testing/selftests/rcutorture/bin/functions.sh
+. functions.sh
 for rd in "$@"
 do
 	firsttime=1
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 2678a9d0733d..afdd4630ff88 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
@@ -42,7 +42,7 @@ T=/tmp/kvm-test-1-run.sh.$$
 trap 'rm -rf $T' 0
 mkdir $T
 
-. $KVM/bin/functions.sh
+. functions.sh
 . $CONFIGFRAG/ver_functions.sh
 
 config_template=${1}
-- 
2.13.0

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

* Re: [PATCH 0/9] Trivial fixup for KVM-based rcutorture test framework
  2017-11-03 10:17 [PATCH 0/9] Trivial fixup for KVM-based rcutorture test framework SeongJae Park
                   ` (8 preceding siblings ...)
  2017-11-03 10:17 ` [PATCH 9/9] rcutorture: Simplify functions.sh include path SeongJae Park
@ 2017-11-03 17:59 ` Paul E. McKenney
  2017-11-03 18:43   ` SeongJae Park
  9 siblings, 1 reply; 12+ messages in thread
From: Paul E. McKenney @ 2017-11-03 17:59 UTC (permalink / raw)
  To: SeongJae Park; +Cc: josh, rostedt, shuah, linux-kernel, linux-kselftest

On Fri, Nov 03, 2017 at 07:17:19PM +0900, SeongJae Park wrote:
> This patchset contains trivial fixup and enhancements for KVM-based rcutorture
> test framework.

Nice updates!  These survived some rcutorture testing, so I have queued
them for further testing and review.  I did update the commit logs,
and had to hand-apply one patch, so could you please double-check my
-rcu tree to make sure that I didn't mess anything up?

							Thanx, Paul

> SeongJae Park (9):
>   rcutorture/configinit: Fix build directory error message
>   rcutorture: Remove unused script, config2frag.sh
>   rcutorture/kvm.sh: Remove unused variable, `alldone`
>   rcutorture/kvm.sh: Use consistent usage for --qemu-args
>   rcutorture/kvm.sh: Support execution from any directory
>   rcutorture/kvm-recheck-*: Improve result directory readability check
>   rcutorture/kvm-build.sh: Skip build directory check
>   rcutorture: Simplify logging
>   rcutorture: Simplify functions.sh include path
> 
>  .../selftests/rcutorture/bin/config2frag.sh        | 25 -------------
>  .../testing/selftests/rcutorture/bin/configinit.sh |  2 +-
>  .../testing/selftests/rcutorture/bin/kvm-build.sh  |  5 ---
>  .../selftests/rcutorture/bin/kvm-recheck-lock.sh   |  2 +-
>  .../selftests/rcutorture/bin/kvm-recheck-rcu.sh    |  4 +--
>  .../rcutorture/bin/kvm-recheck-rcuperf-ftrace.sh   |  2 +-
>  .../rcutorture/bin/kvm-recheck-rcuperf.sh          |  4 +--
>  .../selftests/rcutorture/bin/kvm-recheck.sh        |  2 +-
>  .../selftests/rcutorture/bin/kvm-test-1-run.sh     |  6 ++--
>  tools/testing/selftests/rcutorture/bin/kvm.sh      | 42 +++++++++-------------
>  10 files changed, 26 insertions(+), 68 deletions(-)
>  delete mode 100755 tools/testing/selftests/rcutorture/bin/config2frag.sh
> 
> -- 
> 2.13.0
> 

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

* Re: [PATCH 0/9] Trivial fixup for KVM-based rcutorture test framework
  2017-11-03 17:59 ` [PATCH 0/9] Trivial fixup for KVM-based rcutorture test framework Paul E. McKenney
@ 2017-11-03 18:43   ` SeongJae Park
  0 siblings, 0 replies; 12+ messages in thread
From: SeongJae Park @ 2017-11-03 18:43 UTC (permalink / raw)
  To: Paul McKenney; +Cc: josh, rostedt, Shuah Khan, linux-kernel, linux-kselftest

On Sat, Nov 4, 2017 at 2:59 AM, Paul E. McKenney
<paulmck@linux.vnet.ibm.com> wrote:
> On Fri, Nov 03, 2017 at 07:17:19PM +0900, SeongJae Park wrote:
>> This patchset contains trivial fixup and enhancements for KVM-based rcutorture
>> test framework.
>
> Nice updates!  These survived some rcutorture testing, so I have queued
> them for further testing and review.  I did update the commit logs,
> and had to hand-apply one patch, so could you please double-check my
> -rcu tree to make sure that I didn't mess anything up?
>
>                                                         Thanx, Paul

Hello Paul,


I checked out the 'rcu/dev' branch of your '-rcu' tree.  It looks like the
commit logs are improved very well (thank you!) and the changes are applied
completely as I intended.


Thanks,
SeongJae Park

>
>> SeongJae Park (9):
>>   rcutorture/configinit: Fix build directory error message
>>   rcutorture: Remove unused script, config2frag.sh
>>   rcutorture/kvm.sh: Remove unused variable, `alldone`
>>   rcutorture/kvm.sh: Use consistent usage for --qemu-args
>>   rcutorture/kvm.sh: Support execution from any directory
>>   rcutorture/kvm-recheck-*: Improve result directory readability check
>>   rcutorture/kvm-build.sh: Skip build directory check
>>   rcutorture: Simplify logging
>>   rcutorture: Simplify functions.sh include path
>>
>>  .../selftests/rcutorture/bin/config2frag.sh        | 25 -------------
>>  .../testing/selftests/rcutorture/bin/configinit.sh |  2 +-
>>  .../testing/selftests/rcutorture/bin/kvm-build.sh  |  5 ---
>>  .../selftests/rcutorture/bin/kvm-recheck-lock.sh   |  2 +-
>>  .../selftests/rcutorture/bin/kvm-recheck-rcu.sh    |  4 +--
>>  .../rcutorture/bin/kvm-recheck-rcuperf-ftrace.sh   |  2 +-
>>  .../rcutorture/bin/kvm-recheck-rcuperf.sh          |  4 +--
>>  .../selftests/rcutorture/bin/kvm-recheck.sh        |  2 +-
>>  .../selftests/rcutorture/bin/kvm-test-1-run.sh     |  6 ++--
>>  tools/testing/selftests/rcutorture/bin/kvm.sh      | 42 +++++++++-------------
>>  10 files changed, 26 insertions(+), 68 deletions(-)
>>  delete mode 100755 tools/testing/selftests/rcutorture/bin/config2frag.sh
>>
>> --
>> 2.13.0
>>
>

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

end of thread, other threads:[~2017-11-03 18:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-03 10:17 [PATCH 0/9] Trivial fixup for KVM-based rcutorture test framework SeongJae Park
2017-11-03 10:17 ` [PATCH 1/9] rcutorture/configinit: Fix build directory error message SeongJae Park
2017-11-03 10:17 ` [PATCH 2/9] rcutorture: Remove unused script, config2frag.sh SeongJae Park
2017-11-03 10:17 ` [PATCH 3/9] rcutorture/kvm.sh: Remove unused variable, `alldone` SeongJae Park
2017-11-03 10:17 ` [PATCH 4/9] rcutorture/kvm.sh: Use consistent usage for --qemu-args SeongJae Park
2017-11-03 10:17 ` [PATCH 5/9] rcutorture/kvm.sh: Support execution from any directory SeongJae Park
2017-11-03 10:17 ` [PATCH 6/9] rcutorture/kvm-recheck-*: Improve result directory readability check SeongJae Park
2017-11-03 10:17 ` [PATCH 7/9] rcutorture/kvm-build.sh: Skip build directory check SeongJae Park
2017-11-03 10:17 ` [PATCH 8/9] rcutorture: Simplify logging SeongJae Park
2017-11-03 10:17 ` [PATCH 9/9] rcutorture: Simplify functions.sh include path SeongJae Park
2017-11-03 17:59 ` [PATCH 0/9] Trivial fixup for KVM-based rcutorture test framework Paul E. McKenney
2017-11-03 18:43   ` SeongJae Park

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.