[Qemu-devel] [PATCH 0/3] iotests: Allow 147 to be run concurrently

Max Reitz posted 3 patches 6 years, 10 months ago
Test asan passed
Test docker-clang@ubuntu passed
Test docker-mingw@fedora passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20181221234750.23577-1-mreitz@redhat.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>
tests/qemu-iotests/147        | 98 ++++++++++++++++++++++++-----------
tests/qemu-iotests/iotests.py | 14 +++++
2 files changed, 82 insertions(+), 30 deletions(-)
[Qemu-devel] [PATCH 0/3] iotests: Allow 147 to be run concurrently
Posted by Max Reitz 6 years, 10 months ago
147 currently cannot be run concurrently for two reasons:

(1) It creates TCP/IP NBD servers on a fixed port.

(2) It uses a mix of "0.0.0.0", "localhost", and "::1" as host addresses
    to bind to.  As explained in the commit messages of patches 2 and 3,
    this results in it potentially actually being able to set up two
    servers on the same port at the same time -- but connecting to one
    will always lead to the IPv6 server (regardless of whether you use
    "localhost" or "::1").  Therefore, even if you get two servers
    running concurrently, one of the tests will still break because it
    connects to the wrong one.

This series fixes these issues.


Note that even if you do not care about concurrency, it still is a good
idea to make 147 not use a fixed port to create NBD servers on, as it
may always be already in use by a totally different application.


Max Reitz (3):
  iotests.py: Add qemu_nbd_pipe()
  iotests: Bind qemu-nbd to localhost in 147
  iotests: Allow 147 to be run concurrently

 tests/qemu-iotests/147        | 98 ++++++++++++++++++++++++-----------
 tests/qemu-iotests/iotests.py | 14 +++++
 2 files changed, 82 insertions(+), 30 deletions(-)

-- 
2.19.2


Re: [Qemu-devel] [PATCH 0/3] iotests: Allow 147 to be run concurrently
Posted by Max Reitz 6 years, 9 months ago
On 22.12.18 00:47, Max Reitz wrote:
> 147 currently cannot be run concurrently for two reasons:
> 
> (1) It creates TCP/IP NBD servers on a fixed port.
> 
> (2) It uses a mix of "0.0.0.0", "localhost", and "::1" as host addresses
>     to bind to.  As explained in the commit messages of patches 2 and 3,
>     this results in it potentially actually being able to set up two
>     servers on the same port at the same time -- but connecting to one
>     will always lead to the IPv6 server (regardless of whether you use
>     "localhost" or "::1").  Therefore, even if you get two servers
>     running concurrently, one of the tests will still break because it
>     connects to the wrong one.
> 
> This series fixes these issues.
> 
> 
> Note that even if you do not care about concurrency, it still is a good
> idea to make 147 not use a fixed port to create NBD servers on, as it
> may always be already in use by a totally different application.
> 
> 
> Max Reitz (3):
>   iotests.py: Add qemu_nbd_pipe()
>   iotests: Bind qemu-nbd to localhost in 147
>   iotests: Allow 147 to be run concurrently
> 
>  tests/qemu-iotests/147        | 98 ++++++++++++++++++++++++-----------
>  tests/qemu-iotests/iotests.py | 14 +++++
>  2 files changed, 82 insertions(+), 30 deletions(-)

Applied to my block branch.

Max