[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] tests: Enable the drive_del test also on s39
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2] tests: Enable the drive_del test also on s390x |
Date: |
Fri, 1 Sep 2017 14:46:07 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 09/01/2017 05:39 AM, Thomas Huth wrote:
>>>> /* Start with a drive used by a device that unplugs instantaneously */
>>>> - qtest_start("-drive if=none,id=drive0,file=null-co://,format=raw"
>>>> - " -device virtio-scsi-pci"
>>>> - " -device scsi-hd,drive=drive0,id=dev0");
>>>> + args = g_strdup_printf("-drive
>>>> if=none,id=drive0,file=null-co://,format=raw"
>>>> + " -device virtio-scsi-%s"
>>>> + " -device scsi-hd,drive=drive0,id=dev0",
>>>
>>> Would look better with the spaces at the end of the previous line (so
>>> all "-device" are aligned), but just my taste.
>>
>> The -device *are* aligned, but I get what you mean.
>>
>> The advantage of leading rather than trailing space is that the
>> intention "this is still the same string" is locally obvious both at the
>> first part's end (no comma) and at the second part's beginning (leading
>> space).
>
> I don't mind either way, but in this case, I think I'd prefer to keep
> the original formatting with the space at the beginning, for the
> following two reasons:
>
> - The first line is already hitting the 80 columns limit, and I want to
> avoid complaints from checkpatch.pl
> - The original author formatted it that way.
As it is, I got annoyed by the fact that we had so much strdup() of args
to pass to qtest_init/qtest_start(), so my latest series reformats the
code yet another way:
https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg00308.html
Prone to cause some fun conflict resolution if my cleanups take too long
to get in the tree...
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature