qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v9 34/34] iotests: Add tests for qcow2 images with extended L


From: Max Reitz
Subject: Re: [PATCH v9 34/34] iotests: Add tests for qcow2 images with extended L2 entries
Date: Fri, 3 Jul 2020 15:47:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

On 03.07.20 15:06, Alberto Garcia wrote:
> On Fri 03 Jul 2020 11:49:14 AM CEST, Max Reitz wrote:

[...]

>>> +    expected_bitmap=0
>>> +    for bit in $expected_alloc; do
>>> +        expected_bitmap=$(($expected_bitmap | (1 << $bit)))
>>> +    done
>>> +    for bit in $expected_zero; do
>>> +        expected_bitmap=$(($expected_bitmap | (1 << (32 + $bit))))
>>> +    done
>>> +    printf -v expected_bitmap "%llu" $expected_bitmap # Convert to unsigned
>>
>> Does the length modifier “ll” actually do anything?
>>
>>> +
>>> +    printf "L2 entry #%d: 0x%016lx %016lx\n" "$entry_no" "$entry" "$bitmap"
>>
>> Or the “l” here?
> 
> Actually they don't (I just tested in i386 and x86_64), I assumed that
> it would require the length modifiers like in C.
> 
> I'm tempted to leave them for clarity (using 'll' in both cases),
> opinions?

I don’t mind, although at least zsh’s printf doesn’t seem to support
them all:

$ printf %lli 42
printf: %ll: invalid directive

So it doesn’t seem portable to me.  But then again I think we run all of
our tests in bash, and in any case, Eric’s the expert on shell
compatibility. :)

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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