[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/28] iotests/nbd-reconnect-on-open: Fix NBD socket path
From: |
Kevin Wolf |
Subject: |
[PULL 05/28] iotests/nbd-reconnect-on-open: Fix NBD socket path |
Date: |
Wed, 10 May 2023 14:20:48 +0200 |
Socket paths need to be short to avoid failures. This is why there is a
iotests.sock_dir (defaulting to /tmp) separate from the disk image base
directory.
Make use of it to fix failures in too deeply nested test directories.
Fixes: ab7f7e67a7e7b49964109501dfcde4ec29bae60e
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20230503165019.8867-1-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
tests/qemu-iotests/tests/nbd-reconnect-on-open | 3 ++-
tests/qemu-iotests/tests/nbd-reconnect-on-open.out | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/qemu-iotests/tests/nbd-reconnect-on-open
b/tests/qemu-iotests/tests/nbd-reconnect-on-open
index d0b401b060..3ce52021c3 100755
--- a/tests/qemu-iotests/tests/nbd-reconnect-on-open
+++ b/tests/qemu-iotests/tests/nbd-reconnect-on-open
@@ -26,7 +26,8 @@ from iotests import qemu_img_create, file_path,
qemu_io_popen, qemu_nbd, \
iotests.script_initialize(supported_fmts=['qcow2'])
-disk, nbd_sock = file_path('disk', 'nbd-sock')
+disk = file_path('disk')
+nbd_sock = file_path('nbd-sock', base_dir=iotests.sock_dir)
def create_args(open_timeout):
diff --git a/tests/qemu-iotests/tests/nbd-reconnect-on-open.out
b/tests/qemu-iotests/tests/nbd-reconnect-on-open.out
index a35ae30ea4..b3dd90f2a3 100644
--- a/tests/qemu-iotests/tests/nbd-reconnect-on-open.out
+++ b/tests/qemu-iotests/tests/nbd-reconnect-on-open.out
@@ -2,10 +2,10 @@ read 1048576/1048576 bytes at offset 0
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Check fail to connect with 0 seconds of timeout
-qemu-io: can't open: Failed to connect to 'TEST_DIR/PID-nbd-sock': No such
file or directory
+qemu-io: can't open: Failed to connect to 'SOCK_DIR/PID-nbd-sock': No such
file or directory
qemu_io finished in 0..0.2 seconds, OK
Check fail to connect with 1 seconds of timeout
-qemu-io: can't open: Failed to connect to 'TEST_DIR/PID-nbd-sock': No such
file or directory
+qemu-io: can't open: Failed to connect to 'SOCK_DIR/PID-nbd-sock': No such
file or directory
qemu_io finished in 1..1.2 seconds, OK
--
2.40.1
- [PULL 00/28] Block layer patches, Kevin Wolf, 2023/05/10
- [PULL 01/28] block: add configure options for excluding vmdk, vhdx and vpc, Kevin Wolf, 2023/05/10
- [PULL 02/28] block: add missing coroutine_fn annotations, Kevin Wolf, 2023/05/10
- [PULL 03/28] aio-wait: avoid AioContext lock in aio_wait_bh_oneshot(), Kevin Wolf, 2023/05/10
- [PULL 07/28] qcow2: Don't call bdrv_getlength() in coroutine_fns, Kevin Wolf, 2023/05/10
- [PULL 04/28] block: Fix use after free in blockdev_mark_auto_del(), Kevin Wolf, 2023/05/10
- [PULL 05/28] iotests/nbd-reconnect-on-open: Fix NBD socket path,
Kevin Wolf <=
- [PULL 06/28] migration: Attempt disk reactivation in more failure scenarios, Kevin Wolf, 2023/05/10
- [PULL 08/28] block: Consistently call bdrv_activate() outside coroutine, Kevin Wolf, 2023/05/10
- [PULL 12/28] test-bdrv-drain: Don't modify the graph in coroutines, Kevin Wolf, 2023/05/10
- [PULL 15/28] block: .bdrv_open is non-coroutine and unlocked, Kevin Wolf, 2023/05/10
- [PULL 10/28] block: Don't call no_coroutine_fns in qmp_block_resize(), Kevin Wolf, 2023/05/10
- [PULL 11/28] iotests: Test resizing image attached to an iothread, Kevin Wolf, 2023/05/10
- [PULL 14/28] graph-lock: Fix GRAPH_RDLOCK_GUARD*() to be reader lock, Kevin Wolf, 2023/05/10
- [PULL 13/28] graph-lock: Add GRAPH_UNLOCKED(_PTR), Kevin Wolf, 2023/05/10
- [PULL 16/28] nbd: Remove nbd_co_flush() wrapper function, Kevin Wolf, 2023/05/10
- [PULL 20/28] block: Mark bdrv_co_get_allocated_file_size() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/05/10