[libvirt] [PATCH v5 0/3] vsh: Introduce new API for printing tables

Ján Tomko jtomko at redhat.com
Tue Aug 28 13:52:56 UTC 2018


On Tue, Aug 28, 2018 at 02:46:08PM +0100, Daniel P. Berrangé wrote:
>On Tue, Aug 28, 2018 at 03:41:26PM +0200, Ján Tomko wrote:
>> On Tue, Aug 28, 2018 at 02:24:19PM +0100, Daniel P. Berrangé wrote:
>> > On Tue, Aug 28, 2018 at 02:24:42PM +0200, Ján Tomko wrote:
>> > > On Tue, Aug 28, 2018 at 02:10:55PM +0200, Erik Skultety wrote:
>> > > > > So how about storing 2 sets of expected data for this test case.
>> > > > >
>> > >
>> > > Two is not enough. My clang 5.0.1 produces a test that displays the
>> > > monkeys correctly, but does not count their width properly:
>> >
>> > Is this a different bug though ? The issue with iswprint() is varying
>> > according to glibc version, not compiler version.
>> >
>>
>> The broken setup is:
>> sys-libs/glibc-2.25-r9
>> sys-devel/clang-5.0.1
>>
>> It works on:
>> sys-libs/glibc-2.26-r7
>> with either of:
>> sys-devel/clang-5.0.1
>> sys-devel/clang-6.0.1
>>
>> So yes, it is a glibc bug.
>> Depending on the version, either just wcwidth returns incorrect values
>> for the monkeys (my case) or iswprint considers them non-printable.
>
>It sounds like in your case we're genuinely broken in the virsh
>code, not merely tests broken.
>
>I wonder if we need extra logic in the virsh code to handle escaping
>for the cases where wcwidth is returning wrong data, so we still get
>column layout correct ?
>

I don't think so.

1) wouldn't that involve reimplementing the wcwidth function?
2) users crazy enough to use new unicode characters are welcome to
   upgrade to new glibc, or suffer through misaligned virsh tables.

Jano

>> > So I wonder if the clang problem you mention is something that can be
>> > fixed in some way ?
>> >
>>
>> Nope, red herring. My maint point was that there are more than 2
>> possible results.
>
>
>Regards,
>Daniel
>-- 
>|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
>|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
>|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180828/6ecaefeb/attachment-0001.sig>


More information about the libvir-list mailing list