Skip to contentSkip to conversation

tests/guest-debug: catch hanging guests

PATCH New Alex Bennée 2 participants 2 messages May 12, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/guest-debug: catch hanging guests

If gdb never actually connected with the guest we need to catch that and clean-up after ourselves.

---
 tests/guest-debug/run-test.py | 6 ++++++
 1 file changed, 6 insertions(+)
tests/guest-debug/run-test.py +6 -0
index d9af9573b9e..71c55690546 100755
@@ -80,4 +80,10 @@ if __name__ == '__main__':
         print("GDB crashed? SKIPPING")
         exit(0)
 
+    try:
+        inferior.wait(2)
+    except subprocess.TimeoutExpired:
+        print("GDB never connected? Killed guest")
+        inferior.kill()
+
     exit(result)
Signature · 1 line
2.20.1
#1 lore raw
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
make docker-image-centos7 V=1 NETWORK=1
time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1 === TEST SCRIPT END ===

tmp/qemu-test/build/tests/qemu-iotests/040.out.bad 2020-05-12 14:01:05.112613934 +0000 renamed from tmp/qemu-test/src/tests/qemu-iotests/040.out 2020-05-12 10:35:28.000000000 +0000 +2 -0
@@ -1,3 +1,5 @@
+WARNING:qemu.machine:qemu received signal 9: /tmp/qemu-test/build/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64 -display none -vga none -chardev socket,id=mon,path=/tmp/tmp.kGYjUdMZjJ/qemu-20614-monitor.sock -mon chardev=mon,mode=control -qtest unix:path=/tmp/tmp.kGYjUdMZjJ/qemu-20614-qtest.sock -accel qtest -nodefaults -display none -accel qtest -drive if=none,id=drive0,file=/tmp/qemu-test/test.img,format=qcow2,cache=writeback,aio=threads,node-name=top,backing.node-name=mid,backing.backing.node-name=base -device virtio-scsi-pci -device scsi-hd,id=scsi0,drive=drive0
+WARNING:qemu.machine:qemu received signal 9: /tmp/qemu-test/build/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64 -display none -vga none -chardev socket,id=mon,path=/tmp/tmp.kGYjUdMZjJ/qemu-20614-monitor.sock -mon chardev=mon,mode=control -qtest unix:path=/tmp/tmp.kGYjUdMZjJ/qemu-20614-qtest.sock -accel qtest -nodefaults -display none -accel qtest -drive if=none,id=drive0,file=/tmp/qemu-test/test.img,format=qcow2,cache=writeback,aio=threads,node-name=top,backing.node-name=mid,backing.backing.node-name=base -device virtio-scsi-pci -device scsi-hd,id=scsi0,drive=drive0
 ...........................................................
 ----------------------------------------------------------------------
 Ran 59 tests

---
Not run: 259
Failures: 040
Failed 1 of 118 iotests
make: *** [check-tests/check-block.sh] Error 1
make: *** Waiting for unfinished jobs....
TEST check-qtest-aarch64: tests/qtest/qos-test
Traceback (most recent call last):
---
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=0496a79493b8434e9b53f83f4526a303', '-u', '1001', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-co5vn9rv/src/docker-src.2020-05-12-09.55.06.19477:/var/tmp/qemu:z,ro', 'qemu:centos7', '/var/tmp/qemu/run', 'test-quick']' returned non-zero exit status 2. filter=--filter=label=com.qemu.instance.uuid=0496a79493b8434e9b53f83f4526a303
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-co5vn9rv/src'
make: *** [docker-run-test-quick@centos7] Error 2

real 14m6.043s
user 0m8.832s

The full log is available at
http://patchew.org/logs/[email protected]/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]