aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.ibm.com>2019-04-24 04:39:10 -0700
committerPaul E. McKenney <paulmck@linux.ibm.com>2019-05-28 09:06:09 -0700
commit7dedfd4335f7b795d12191d03626212ff71e52aa (patch)
tree0678e52ebd41aab1a0a72cd4b6e22d389a31d916 /tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
parenta6fda6dab93c2c06ef4b8cb4b9258df6674d2438 (diff)
torture: Capture qemu output
Currently qemu output appears on standard output, but is inaccessible later on. This commit therefore captures this output and causes kvm-recheck.sh to output this output if QEMU gave a non-zero non-137 exit code. (And exit code of 137 indicates that QEMU was killed, in which case we want to know about the hang rather than the fact that QEMU was killed.) Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
Diffstat (limited to 'tools/testing/selftests/rcutorture/bin/kvm-recheck.sh')
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm-recheck.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
index 2297ddc2d4c5..e5edd5198725 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
@@ -30,8 +30,16 @@ do
TORTURE_SUITE="`cat $i/../TORTURE_SUITE`"
rm -f $i/console.log.*.diags
kvm-recheck-${TORTURE_SUITE}.sh $i
- if test -f "$i/console.log"
+ if test -f "$i/qemu-retval" && test "`cat $i/qemu-retval`" -ne 0 && test "`cat $i/qemu-retval`" -ne 137
then
+ echo QEMU error, output:
+ cat $i/qemu-output
+ elif test -f "$i/console.log"
+ then
+ if test -f "$i/qemu-retval" && test "`cat $i/qemu-retval`" -eq 137
+ then
+ echo QEMU killed
+ fi
configcheck.sh $i/.config $i/ConfigFragment
if test -r $i/Make.oldconfig.err
then