qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tests/qemu-iotests/testrunner: Supply a test plan in TAP mode
@ 2022-02-23  9:58 Thomas Huth
  2022-03-21 16:22 ` Hanna Reitz
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Huth @ 2022-02-23  9:58 UTC (permalink / raw)
  To: qemu-block, Paolo Bonzini; +Cc: Kevin Wolf, Hanna Reitz, qemu-devel

Quoting the TAP specification: "The plan tells how many tests will be
run [...]. It’s a check that the test file hasn’t stopped prematurely."
That's a good idea of course, so let's support that in the iotest
testrunner, too.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/qemu-iotests/testrunner.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py
index 9a94273975..30ab829def 100644
--- a/tests/qemu-iotests/testrunner.py
+++ b/tests/qemu-iotests/testrunner.py
@@ -377,6 +377,7 @@ def run_tests(self, tests: List[str], jobs: int = 1) -> bool:
 
         if self.tap:
             self.env.print_env('# ')
+            print('1..%d' % len(tests))
         else:
             self.env.print_env()
 
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tests/qemu-iotests/testrunner: Supply a test plan in TAP mode
  2022-02-23  9:58 [PATCH] tests/qemu-iotests/testrunner: Supply a test plan in TAP mode Thomas Huth
@ 2022-03-21 16:22 ` Hanna Reitz
  0 siblings, 0 replies; 2+ messages in thread
From: Hanna Reitz @ 2022-03-21 16:22 UTC (permalink / raw)
  To: Thomas Huth, qemu-block, Paolo Bonzini; +Cc: Kevin Wolf, qemu-devel

On 23.02.22 10:58, Thomas Huth wrote:
> Quoting the TAP specification: "The plan tells how many tests will be
> run [...]. It’s a check that the test file hasn’t stopped prematurely."
> That's a good idea of course, so let's support that in the iotest
> testrunner, too.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   tests/qemu-iotests/testrunner.py | 1 +
>   1 file changed, 1 insertion(+)

Yep, that seems to work nicely.  Thanks!

Applied to my block branch (better late than never):

https://gitlab.com/hreitz/qemu/-/commits/block

Hanna



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-21 16:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-23  9:58 [PATCH] tests/qemu-iotests/testrunner: Supply a test plan in TAP mode Thomas Huth
2022-03-21 16:22 ` Hanna Reitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).