[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: Eric Blake
Subject: Re: [PATCH] iotests: Fix unsupported_imgopts for refcount_bits
Date: Tue, 9 Feb 2021 12:49:18 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

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


> 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

reply via email to

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