summaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-03-04 09:06:40 -0800
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-05-14 09:46:00 -0700
commitfff35c4e9fbb0982aef6230cbf713c2492925eca (patch)
treeed126f04aa86f32f8f64caf603ea5faa71945bdd /tools/testing
parent0d6821d5f70b7137974575758962bae61ed0fc63 (diff)
downloadlinux-fff35c4e9fbb0982aef6230cbf713c2492925eca.tar.gz
linux-fff35c4e9fbb0982aef6230cbf713c2492925eca.tar.bz2
linux-fff35c4e9fbb0982aef6230cbf713c2492925eca.zip
torture: Report diagnostics from qemu
The current script does record qemu diagnostics, but the user has to know where to look for them. This commit therefore puts them into the Warnings file so that kvm-recheck.sh will display them. This change is especially useful if you are in the habit of killing the qemu process when you realize that you messed something up, but then later on wonder why the process terminated early. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'tools/testing')
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh9
1 files changed, 8 insertions, 1 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 86e6ffe6df45..cfa97e1ad8dc 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
@@ -157,7 +157,7 @@ then
echo Build-only run specified, boot/test omitted.
exit 0
fi
-$QEMU $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append "$qemu_append $boot_args" &
+( $QEMU $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append "$qemu_append $boot_args"; echo $? > $resdir/qemu-retval ) &
qemu_pid=$!
commandcompleted=0
echo Monitoring qemu job at pid $qemu_pid
@@ -172,6 +172,13 @@ do
if test $kruntime -lt $seconds
then
echo Completed in $kruntime vs. $seconds >> $resdir/Warnings 2>&1
+ grep "^(qemu) qemu:" $resdir/kvm-test-1-run.sh.out >> $resdir/Warnings 2>&1
+ killpid="`sed -n "s/^(qemu) qemu: terminating on signal [0-9]* from pid \([0-9]*\).*$/\1/p" $resdir/Warnings`"
+ if test -n "$killpid"
+ then
+ echo "ps -fp $killpid" >> $resdir/Warnings 2>&1
+ ps -fp $killpid >> $resdir/Warnings 2>&1
+ fi
else
echo ' ---' `date`: Kernel done
fi