]> git.proxmox.com Git - mirror_qemu.git/commit
qemu-iotests: Support varargs syntax in FilePaths
authorNir Soffer <nirsof@gmail.com>
Fri, 28 Aug 2020 23:21:50 +0000 (02:21 +0300)
committerMax Reitz <mreitz@redhat.com>
Tue, 15 Sep 2020 09:05:12 +0000 (11:05 +0200)
commita242b19e80faa95fd5856fca2d4115e853d465b1
treeed2f7f4a0535e15efd84b1aae5c99177e605d6b8
parentf765af87c203723f77da37716a74f0eca99f192c
qemu-iotests: Support varargs syntax in FilePaths

Accept variable number of names instead of a sequence:

    with FilePaths("a", "b", "c") as (a, b, c):

The disadvantage is that base_dir must be used as kwarg:

    with FilePaths("a", "b", base_dir=soc_dir) as (sock1, sock2):

But this is more clear and calling optional argument as positional
arguments is bad idea anyway.

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200828232152.205833-4-nsoffer@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
tests/qemu-iotests/194
tests/qemu-iotests/257
tests/qemu-iotests/iotests.py