qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 2/5] iotests: fix remainining tests to work w


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v5 2/5] iotests: fix remainining tests to work with LUKS
Date: Wed, 31 May 2017 10:59:08 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

On 05/31/2017 10:33 AM, Max Reitz wrote:
> On 2017-05-09 19:33, Daniel P. Berrange wrote:
>> The tests 033, 140, 145 and 157 were all broken
>> when run with LUKS, since they did not correctly use
>> the required image opts args syntax to specify the
>> decryption secret. Further, the 120 test simply does
>> not make sense to run with luks, as the scenario
>> exercised is not relevant.
>>
>> The test 181 was broken when run with LUKS because
>> it didn't take account of fact that $TEST_IMG was
>> already in image opts syntax. The launch_qemu
>> helper also didn't register the secret object
>> providing the LUKS password.

>>  
>> +if test "$IMGOPTSSYNTAX" = "true"
>> +then
>> +    SYSEMU_DRIVE_ARG=if=none,media=cdrom,id=drv,$TEST_IMG
> 
> I would like to propose wrapping this (or at least $TEST_IMG) in quotes,

Makes no difference in assignment context (other than consistency that
it's an easier rule to always quote even when not necessary, than it is
to remember which contexts don't need quoting).

> but I'm aware of the fact that the whole test environment breaks if you
> have a TEST_DIR with whitespace in it, so I don't mind...
> 
> (But it is a bit weird to put $TEST_IMG into quotes below and then use
> $SYSEMU_DRIVE_ARG unquoted.)

Assigning to SYSEMU_DRIVE_ARG without quotes works even if TEST_IMG
contains spaces, but expanding SYSEMU_DRIVE_ARGS without quotes indeed
breaks (whether or not you assigned with quotes).

> 
>> +    SYSEMU_EXTRA_ARGS=""
>> +else
>> +    
>> SYSEMU_DRIVE_ARG=if=none,media=cdrom,id=drv,file="$TEST_IMG",driver=$IMGFMT
>> +    SYSEMU_EXTRA_ARGS=""
>> +fi
>> +
>>  keep_stderr=y \
>> -_launch_qemu -drive 
>> if=none,media=cdrom,id=drv,file="$TEST_IMG",format=$IMGFMT \
>> +_launch_qemu $SYSEMU_EXTRA_ARGS -drive $SYSEMU_DRIVE_ARG \

Yes, you want "$SYSEMU_DRIVE_ARG" here.


> Please use spaces instead of tabs.
> 
> (I know there are a lot of tabs in the test files already, but according
> to CODING_STYLE, that is just wrong.)

.dir-locals.el may need a tweak to be taught that files in qemu-iotests
should not prefer TABs.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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