[PATCH 1/4] tests: print reason when I/O test is skipped in TAP mode

Daniel P. Berrangé posted 4 patches 1 month, 1 week ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
[PATCH 1/4] tests: print reason when I/O test is skipped in TAP mode
Posted by Daniel P. Berrangé 1 month, 1 week ago
The TAP output on a skipped test:

  ok raw 181 # SKIP

is not informative.

The test program included a reason, and that should be displayed
in TAP mode (it is already shown in non-TAP mode):

  ok raw 181 # SKIP Postcopy is not supported

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

diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py
index 14cc8492f9..c4ce3e29e9 100644
--- a/tests/qemu-iotests/testrunner.py
+++ b/tests/qemu-iotests/testrunner.py
@@ -174,7 +174,7 @@ def test_print_one_line(self, test: str,
             elif status == 'fail':
                 print(f'not ok {self.env.imgfmt} {test}')
             elif status == 'not run':
-                print(f'ok {self.env.imgfmt} {test} # SKIP')
+                print(f'ok {self.env.imgfmt} {test} # SKIP {description}')
             return
 
         if lasttime:
-- 
2.50.1


Re: [PATCH 1/4] tests: print reason when I/O test is skipped in TAP mode
Posted by Thomas Huth 1 month, 1 week ago
On 08/10/2025 13.35, Daniel P. Berrangé wrote:
> The TAP output on a skipped test:
> 
>    ok raw 181 # SKIP
> 
> is not informative.
> 
> The test program included a reason, and that should be displayed
> in TAP mode (it is already shown in non-TAP mode):
> 
>    ok raw 181 # SKIP Postcopy is not supported
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>   tests/qemu-iotests/testrunner.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py
> index 14cc8492f9..c4ce3e29e9 100644
> --- a/tests/qemu-iotests/testrunner.py
> +++ b/tests/qemu-iotests/testrunner.py
> @@ -174,7 +174,7 @@ def test_print_one_line(self, test: str,
>               elif status == 'fail':
>                   print(f'not ok {self.env.imgfmt} {test}')
>               elif status == 'not run':
> -                print(f'ok {self.env.imgfmt} {test} # SKIP')
> +                print(f'ok {self.env.imgfmt} {test} # SKIP {description}')
>               return
>   
>           if lasttime:

Reviewed-by: Thomas Huth <thuth@redhat.com>