qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [PATCH 0/5] iotests: Some fixes for rarely run cases
Date: Wed, 17 Jun 2020 16:11:12 +0200	[thread overview]
Message-ID: <f8192770-0fe1-95e6-9560-47571a1ebc59@redhat.com> (raw)
In-Reply-To: <20200617125238.GC5166@linux.fritz.box>


[-- Attachment #1.1.1: Type: text/plain, Size: 978 bytes --]

On 17.06.20 14:52, Kevin Wolf wrote:
> Am 17.06.2020 um 12:48 hat Max Reitz geschrieben:
>> Hi,
>>
>> Thomas’s report
>> (https://lists.nongnu.org/archive/html/qemu-block/2020-06/msg00791.html)
>> has given me a nice excuse to write this series.
>>
>> There are some iotests that have recently start to fail in rarely
>> exercised test environments (qed, qcow2 with data_file, qcow2 v2), and
>> this series fixes what I found.
> 
> Thanks, applied to the block branch.

Sorry, I didn’t run iotest 297 before sending this series...

The problems arise in patch 1:

iotests.py:1113:0: C0301: Line too long (80/79) (line-too-long)
iotests.py:1106: error: Function is missing a return type annotation

(So there’s a line with 80 characters, when 79 is the maximum (*shrug*),
and I failed to specify skip_for_format’s return type.)

I think patch 1 needs the attached diff squashed in.  Are you willing to
do that or should I just send a v2?

Max

[-- Attachment #1.1.2: patch1.diff --]
[-- Type: text/x-patch, Size: 1180 bytes --]

diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 92c08b9dc6..5ea4c4df8b 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -1103,14 +1103,17 @@ def skip_if_unsupported(required_formats=(), read_only=False):
         return func_wrapper
     return skip_test_decorator
 
-def skip_for_formats(formats: Sequence[str] = ()):
+def skip_for_formats(formats: Sequence[str] = ()) \
+    -> Callable[[Callable[[QMPTestCase, List[Any], Dict[str, Any]], None]],
+                Callable[[QMPTestCase, List[Any], Dict[str, Any]], None]]:
     '''Skip Test Decorator
        Skips the test for the given formats'''
     def skip_test_decorator(func):
         def func_wrapper(test_case: QMPTestCase, *args: List[Any],
                          **kwargs: Dict[str, Any]) -> None:
             if imgfmt in formats:
-                test_case.case_skip(f'{test_case}: Skipped for format {imgfmt}')
+                msg = f'{test_case}: Skipped for format {imgfmt}'
+                test_case.case_skip(msg)
             else:
                 func(test_case, *args, **kwargs)
         return func_wrapper

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-06-17 14:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-17 10:48 [PATCH 0/5] iotests: Some fixes for rarely run cases Max Reitz
2020-06-17 10:48 ` [PATCH 1/5] iotests.py: Add skip_for_formats() decorator Max Reitz
2020-06-17 11:37   ` Thomas Huth
2020-06-17 10:48 ` [PATCH 2/5] iotests/041: Skip test_small_target for qed Max Reitz
2020-06-17 11:39   ` Thomas Huth
2020-06-17 10:48 ` [PATCH 3/5] iotests/292: data_file is unsupported Max Reitz
2020-06-17 10:48 ` [PATCH 4/5] iotests/229: " Max Reitz
2020-06-17 10:48 ` [PATCH 5/5] iotests/{190,291}: compat=0.10 " Max Reitz
2020-06-17 12:27 ` [PATCH 0/5] iotests: Some fixes for rarely run cases no-reply
2020-06-17 12:52 ` Kevin Wolf
2020-06-17 14:11   ` Max Reitz [this message]
2020-06-17 14:19     ` Kevin Wolf
2020-06-17 14:21       ` Max Reitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f8192770-0fe1-95e6-9560-47571a1ebc59@redhat.com \
    --to=mreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).