From: Eric Blake <eblake@redhat.com>
To: Max Reitz <mreitz@redhat.com>, qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH] iotests: Fix unsupported_imgopts for refcount_bits
Date: Tue, 9 Feb 2021 12:49:18 -0600 [thread overview]
Message-ID: <e1bdf41c-eddb-214f-1f4a-9fbfc477b73f@redhat.com> (raw)
In-Reply-To: <20210209182745.501662-1-mreitz@redhat.com>
On 2/9/21 12:27 PM, Max Reitz wrote:
> Many _unsupported_imgopts lines for refcount_bits values use something
> like "refcount_bits=1[^0-9]" to forbid everything but "refcount_bits=1"
> (e.g. "refcount_bits=16" is allowed).
>
> That does not work when $IMGOPTS does not have any entry past the
> refcount_bits option, which now became apparent with the "check" script
> rewrite.
>
> Use \b instead of [^0-9] to check for a word boundary, which is what we
> really want.
\b is a Linux-ism (that is, glibc supports it, but BSD libc does not).
https://mail-index.netbsd.org/tech-userlevel/2012/12/02/msg006954.html
>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> Reproducible with:
> $ ./check -qcow2 -o refcount_bits=1
> (The tests touched here should be skipped)
>
> I don't know whether \b is portable. I hope it is.
> (This is why I CC-ed you, Eric.)
No, it's not portable. \> and [[:>:]] are other spellings for the same
task, equally non-portable.
>
> Then again, it appears that nobody ever runs the iotests with
> refcount_bits=1 but me, and I do that on Linux. So even if it isn't
> portable, it shouldn't be an issue in practice... O:)
What exactly is failing? Is it merely a case of our python script
running the regex against "${unsupported_imgopts}" instead of
"${unsupported_imgsopts} " with an added trailing space to guarantee
that we have something to match against?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2021-02-09 18:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-09 18:27 [PATCH] iotests: Fix unsupported_imgopts for refcount_bits Max Reitz
2021-02-09 18:49 ` Eric Blake [this message]
2021-02-10 8:48 ` 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=e1bdf41c-eddb-214f-1f4a-9fbfc477b73f@redhat.com \
--to=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@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).