iotests: Stop NBD server in test 162 before starting the next one
PATCH 1/1 iotests: Stop NBD server in test 162 before starting the next one
Test 162 recently started failing for me for no obvious reasons (I did not spot any suspicious commits in this area), but looking in the 162.out.bad log file, there was a suspicious message at the end:
qemu-nbd: Cannot lock pid file: Resource temporarily unavailable
And indeed, the test starts the NBD server two times, without stopping the first server before running the second one, so the second one can indeed fail to lock the PID file. Thus let's make sure to stop the first server before the test continues with the second one. With this change, the test works fine for me again.
--- tests/qemu-iotests/162 | 1 + 1 file changed, 1 insertion(+)
tests/qemu-iotests/162 +1 -0
@@ -65,6 +65,7 @@ done $QEMU_IMG info "json:{'driver': 'nbd', 'host': 'localhost', 'port': $port}" \ | grep '^image' | sed -e "s/$port/PORT/" +_stop_nbd_server # This is a test for NBD's bdrv_refresh_filename() implementation: It expects # either host or path to be set, but it must not assume that they are set to
Signature · 1 line
2.48.1
Quoted 22 lines · Thomas Huth
Test 162 recently started failing for me for no obvious reasons (I did not spot any suspicious commits in this area), but looking in the 162.out.bad log file, there was a suspicious message at the end:
qemu-nbd: Cannot lock pid file: Resource temporarily unavailable
And indeed, the test starts the NBD server two times, without stopping the first server before running the second one, so the second one can indeed fail to lock the PID file. Thus let's make sure to stop the first server before the test continues with the second one. With this change, the test works fine for me again.
Signed-off-by Thomas Huth <[email protected]>--- tests/qemu-iotests/162 | 1 + 1 file changed, 1 insertion(+)tests/qemu-iotests/162 +0
-0
tests/qemu-iotests/162 done · line 71
Quoted 7 lines
tests/qemu-iotests/162 +1
-0@@ -65,6 +65,7 @@ done $QEMU_IMG info "json:{'driver': 'nbd', 'host': 'localhost', 'port': $port}" \ | grep '^image' | sed -e "s/$port/PORT/" +_stop_nbd_server # This is a test for NBD's bdrv_refresh_filename() implementation: It expects # either host or path to be set, but it must not assume that they are set to
By the way, this problem also seems to be caused by running configure with --enable-trace-backends=simple ... but I think stopping the previous server before running the next one is still a good idea.
Thomas
Quoted 12 lines · Thomas Huth
Test 162 recently started failing for me for no obvious reasons (I did not spot any suspicious commits in this area), but looking in the 162.out.bad log file, there was a suspicious message at the end:
qemu-nbd: Cannot lock pid file: Resource temporarily unavailable
And indeed, the test starts the NBD server two times, without stopping the first server before running the second one, so the second one can indeed fail to lock the PID file. Thus let's make sure to stop the first server before the test continues with the second one. With this change, the test works fine for me again.
Quoted 4 lines
Signed-off-by Thomas Huth <[email protected]>--- tests/qemu-iotests/162 | 1 + 1 file changed, 1 insertion(+)
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org
Quoted 13 lines · Eric Blake
Quoted 12 lines · Thomas Huth
Test 162 recently started failing for me for no obvious reasons (I did not spot any suspicious commits in this area), but looking in the 162.out.bad log file, there was a suspicious message at the end:
qemu-nbd: Cannot lock pid file: Resource temporarily unavailable
And indeed, the test starts the NBD server two times, without stopping the first server before running the second one, so the second one can indeed fail to lock the PID file. Thus let's make sure to stop the first server before the test continues with the second one. With this change, the test works fine for me again.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Thomas Huth <[email protected]>--- tests/qemu-iotests/162 | 1 + 1 file changed, 1 insertion(+)Reviewed-by Eric Blake <[email protected]>
Added to my NBD queue.
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org