[libvirt] [PATCH] tests: redo test argv file line wrapping

Eric Blake eblake at redhat.com
Fri Nov 6 16:23:20 UTC 2015


On 11/06/2015 09:16 AM, Daniel P. Berrange wrote:

>>>
>>> What if we fix the syntax-check instead and allow longer than 80
>>> character lines in case they have no space in it, or exactly one space
>>> (to allow --parameter option,option,option,...)?  That would make even
>>> corner cases easier to review, e.g. when you remove or add a parameter
>>> into the long list of parameters.
>>

> 
> So if we *never* line wrap within a '-arg value' parameter
> then we would have a fair number of lines longer than 80
> characters.
> 

>    314 qemuxml2argv-graphics-spice.args
> 
> I didn't realize it was quite so huge with these. With spice
> reaching 314 characters for a single parameter value, I feel
> we really have to artificially split the value strings.
> 314 is just too long for a single line.

Indeed - it makes hunting for the diff within that line difficult when
reading email where the lines are wrapped anyways by the mail client
display.

314 is not as bad as the 998 byte limit where git send-email was choking
and not even sending patches, but it is still too long for comfort, so
I'm okay with making the automatic wrapper pick strategic ',' points to
wrap at on long lines. But we can also compromise, such as perhaps
making the cutoff for mid-word wrapping be at 100 bytes instead of 80 to
touch fewer files.

At any rate, the idea of having 'syntax-check' validate that
auto-wrapping doesn't modify any files seems like a good one.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20151106/b642b4f4/attachment-0001.sig>


More information about the libvir-list mailing list