diff mbox series

[14/23] iotests/194: Create sockets in $SOCK_DIR

Message ID 20191010152457.17713-15-mreitz@redhat.com (mailing list archive)
State New, archived
Headers show
Series iotests: Add and use $SOCK_DIR | expand

Commit Message

Max Reitz Oct. 10, 2019, 3:24 p.m. UTC
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 tests/qemu-iotests/194 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Eric Blake Oct. 10, 2019, 7:32 p.m. UTC | #1
On 10/10/19 10:24 AM, Max Reitz wrote:
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>   tests/qemu-iotests/194 | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

> diff --git a/tests/qemu-iotests/194 b/tests/qemu-iotests/194
> index d746ab1e21..72e47e8833 100755
> --- a/tests/qemu-iotests/194
> +++ b/tests/qemu-iotests/194
> @@ -26,8 +26,8 @@ iotests.verify_platform(['linux'])
>   
>   with iotests.FilePath('source.img') as source_img_path, \
>        iotests.FilePath('dest.img') as dest_img_path, \
> -     iotests.FilePath('migration.sock') as migration_sock_path, \
> -     iotests.FilePath('nbd.sock') as nbd_sock_path, \
> +     iotests.FilePaths(['migration.sock', 'nbd.sock'], iotests.sock_dir) as \
> +         [migration_sock_path, nbd_sock_path], \
>        iotests.VM('source') as source_vm, \
>        iotests.VM('dest') as dest_vm:
>   
>
Eric Blake Oct. 10, 2019, 7:43 p.m. UTC | #2
On 10/10/19 10:24 AM, Max Reitz wrote:
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>   tests/qemu-iotests/194 | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/qemu-iotests/194 b/tests/qemu-iotests/194
> index d746ab1e21..72e47e8833 100755
> --- a/tests/qemu-iotests/194
> +++ b/tests/qemu-iotests/194
> @@ -26,8 +26,8 @@ iotests.verify_platform(['linux'])
>   
>   with iotests.FilePath('source.img') as source_img_path, \
>        iotests.FilePath('dest.img') as dest_img_path, \

Any reason these are still two iotests.FilePath(),

> -     iotests.FilePath('migration.sock') as migration_sock_path, \
> -     iotests.FilePath('nbd.sock') as nbd_sock_path, \
> +     iotests.FilePaths(['migration.sock', 'nbd.sock'], iotests.sock_dir) as \
> +         [migration_sock_path, nbd_sock_path], \

while you joined this into one iotests.FilePaths()?  Doesn't affect 
correctness, but does raise a consistency issue (I noticed it again in 
the untouched part of patch 17).

>        iotests.VM('source') as source_vm, \
>        iotests.VM('dest') as dest_vm:
>   
>
Max Reitz Oct. 11, 2019, 7:55 a.m. UTC | #3
On 10.10.19 21:43, Eric Blake wrote:
> On 10/10/19 10:24 AM, Max Reitz wrote:
>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>> ---
>>   tests/qemu-iotests/194 | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/qemu-iotests/194 b/tests/qemu-iotests/194
>> index d746ab1e21..72e47e8833 100755
>> --- a/tests/qemu-iotests/194
>> +++ b/tests/qemu-iotests/194
>> @@ -26,8 +26,8 @@ iotests.verify_platform(['linux'])
>>     with iotests.FilePath('source.img') as source_img_path, \
>>        iotests.FilePath('dest.img') as dest_img_path, \
> 
> Any reason these are still two iotests.FilePath(),
> 
>> -     iotests.FilePath('migration.sock') as migration_sock_path, \
>> -     iotests.FilePath('nbd.sock') as nbd_sock_path, \
>> +     iotests.FilePaths(['migration.sock', 'nbd.sock'],
>> iotests.sock_dir) as \
>> +         [migration_sock_path, nbd_sock_path], \
> 
> while you joined this into one iotests.FilePaths()?  Doesn't affect
> correctness, but does raise a consistency issue (I noticed it again in
> the untouched part of patch 17).

The migration.sock FilePath line would have exceeded 80 characters, so I
would’ve had to wrap it.  Thus I decided I might as well make it a
FilePaths.

I didn’t dare touch the surrounding code, because that would have
required me to explain myself in the commit message. O:-)

Max

>>        iotests.VM('source') as source_vm, \
>>        iotests.VM('dest') as dest_vm:
>>  
>
diff mbox series

Patch

diff --git a/tests/qemu-iotests/194 b/tests/qemu-iotests/194
index d746ab1e21..72e47e8833 100755
--- a/tests/qemu-iotests/194
+++ b/tests/qemu-iotests/194
@@ -26,8 +26,8 @@  iotests.verify_platform(['linux'])
 
 with iotests.FilePath('source.img') as source_img_path, \
      iotests.FilePath('dest.img') as dest_img_path, \
-     iotests.FilePath('migration.sock') as migration_sock_path, \
-     iotests.FilePath('nbd.sock') as nbd_sock_path, \
+     iotests.FilePaths(['migration.sock', 'nbd.sock'], iotests.sock_dir) as \
+         [migration_sock_path, nbd_sock_path], \
      iotests.VM('source') as source_vm, \
      iotests.VM('dest') as dest_vm: