[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] iotests: Fix unsupported_imgopts for refcount_bits

From: Max Reitz
Subject: Re: [PATCH] iotests: Fix unsupported_imgopts for refcount_bits
Date: Wed, 10 Feb 2021 09:48:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

On 09.02.21 19:49, Eric Blake wrote:
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

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).



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?

A bit of a hack, but one that indeed works, yes.  Thanks!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]