[PATCH v2 10/13] tests: skip I/O test 128 on GitLab due to broken dmsetup

Daniel P. Berrangé posted 13 patches 3 weeks, 6 days ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
There is a newer version of this series
[PATCH v2 10/13] tests: skip I/O test 128 on GitLab due to broken dmsetup
Posted by Daniel P. Berrangé 3 weeks, 6 days ago
The I/O test 128 uses 'dmsetup create' to create a device, optionally
using sudo to elevate privileges.

This works in GitLab CI, however, the resulting device never appears
in /dev leading the test to fail:

  1..1
  # running raw 128
  not ok raw 128
  ----------------------------------- stderr -----------------------------------
  --- /builds/berrange/qemu/tests/qemu-iotests/128.out
  +++ /builds/berrange/qemu/build/scratch/raw-file-128/128.out.bad
  @@ -1,5 +1,5 @@
   QA output created by 128

   == reading from error device ==
  -read failed: Input/output error
  +qemu-io: can't open device /dev/mapper/eiodev16546: Could not open '/dev/mapper/eiodev16546': No such file or directory
   *** done

  (test program exited with status code 1)

Most likely the container environment the tests are being run under
has a hand-populated /dev such that newly created devices from device
mapper won't automatically appear.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/qemu-iotests/128 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/qemu-iotests/128 b/tests/qemu-iotests/128
index d0e00d24b1..b32e03beee 100755
--- a/tests/qemu-iotests/128
+++ b/tests/qemu-iotests/128
@@ -73,6 +73,8 @@ _supported_fmt raw
 _supported_proto file
 _supported_os Linux
 
+test -n "$GITLAB_CI" && _notrun "dmsetup not functional on GitLab CI runners"
+
 _setup_eiodev
 
 TEST_IMG="/dev/mapper/$devname"
-- 
2.52.0


Re: [PATCH v2 10/13] tests: skip I/O test 128 on GitLab due to broken dmsetup
Posted by Thomas Huth 3 weeks, 5 days ago
On 12/01/2026 21.40, Daniel P. Berrangé wrote:
> The I/O test 128 uses 'dmsetup create' to create a device, optionally
> using sudo to elevate privileges.
> 
> This works in GitLab CI, however, the resulting device never appears
> in /dev leading the test to fail:
> 
>    1..1
>    # running raw 128
>    not ok raw 128
>    ----------------------------------- stderr -----------------------------------
>    --- /builds/berrange/qemu/tests/qemu-iotests/128.out
>    +++ /builds/berrange/qemu/build/scratch/raw-file-128/128.out.bad
>    @@ -1,5 +1,5 @@
>     QA output created by 128
> 
>     == reading from error device ==
>    -read failed: Input/output error
>    +qemu-io: can't open device /dev/mapper/eiodev16546: Could not open '/dev/mapper/eiodev16546': No such file or directory
>     *** done
> 
>    (test program exited with status code 1)
> 
> Most likely the container environment the tests are being run under
> has a hand-populated /dev such that newly created devices from device
> mapper won't automatically appear.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>   tests/qemu-iotests/128 | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/tests/qemu-iotests/128 b/tests/qemu-iotests/128
> index d0e00d24b1..b32e03beee 100755
> --- a/tests/qemu-iotests/128
> +++ b/tests/qemu-iotests/128
> @@ -73,6 +73,8 @@ _supported_fmt raw
>   _supported_proto file
>   _supported_os Linux
>   
> +test -n "$GITLAB_CI" && _notrun "dmsetup not functional on GitLab CI runners"
> +
>   _setup_eiodev
>   
>   TEST_IMG="/dev/mapper/$devname"

Could we maybe better check for the existance of $TEST_IMG for deciding 
whether to skip the test? ... so that this is also properly skipped in other 
container environments where /dev might not be populated right?

  Thomas