Skip to content

Commit

Permalink
iotests/264: Use iotests.sock_dir for socket creation
Browse files Browse the repository at this point in the history
If socket path is too long (longer than 108 bytes), socket can't be
opened.  This might lead to failure when test dir path is long enough.
Make sure socket is created in iotests.sock_dir to avoid such a case.

This commit basically aligns iotests/264 with the rest of iotests.

Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Message-ID: <20240125135237.189493-1-andrey.drobyshev@virtuozzo.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
Andrey Drobyshev authored and kevmw committed Jan 26, 2024
1 parent a26d018 commit 85d5d2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/qemu-iotests/264
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ import os
import iotests
from iotests import qemu_img_create, file_path, qemu_nbd_popen

disk_a, disk_b, nbd_sock = file_path('disk_a', 'disk_b', 'nbd-sock')
disk_a, disk_b = file_path('disk_a', 'disk_b')
nbd_sock = file_path('nbd-sock', base_dir=iotests.sock_dir)
nbd_uri = 'nbd+unix:///?socket=' + nbd_sock
wait_limit = 3.0
wait_step = 0.2
Expand Down

0 comments on commit 85d5d2b

Please sign in to comment.