* [PATCH] iotests/nbd-reconnect-on-open: Fix NBD socket path
@ 2023-05-03 16:50 Kevin Wolf
2023-05-03 19:04 ` Eric Blake
2023-05-03 19:06 ` Vladimir Sementsov-Ogievskiy
0 siblings, 2 replies; 3+ messages in thread
From: Kevin Wolf @ 2023-05-03 16:50 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, hreitz, vsementsov, nikita.lapshin, qemu-devel
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>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iotests/nbd-reconnect-on-open: Fix NBD socket path
2023-05-03 16:50 [PATCH] iotests/nbd-reconnect-on-open: Fix NBD socket path Kevin Wolf
@ 2023-05-03 19:04 ` Eric Blake
2023-05-03 19:06 ` Vladimir Sementsov-Ogievskiy
1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2023-05-03 19:04 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-block, hreitz, vsementsov, nikita.lapshin, qemu-devel
On Wed, May 03, 2023 at 06:50:19PM +0200, Kevin Wolf wrote:
> 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>
> ---
> 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(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
Just barely missed today's NBD pull request; I'll queue it for my next
one, or it can go in through your block tree if you beat me to it.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iotests/nbd-reconnect-on-open: Fix NBD socket path
2023-05-03 16:50 [PATCH] iotests/nbd-reconnect-on-open: Fix NBD socket path Kevin Wolf
2023-05-03 19:04 ` Eric Blake
@ 2023-05-03 19:06 ` Vladimir Sementsov-Ogievskiy
1 sibling, 0 replies; 3+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2023-05-03 19:06 UTC (permalink / raw)
To: Kevin Wolf, qemu-block; +Cc: hreitz, vsementsov, nikita.lapshin, qemu-devel
On 03.05.23 19:50, Kevin Wolf wrote:
> 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>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
--
Best regards,
Vladimir
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-03 19:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-03 16:50 [PATCH] iotests/nbd-reconnect-on-open: Fix NBD socket path Kevin Wolf
2023-05-03 19:04 ` Eric Blake
2023-05-03 19:06 ` Vladimir Sementsov-Ogievskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).