Re: [PATCH] esx: Handle name escaping properly

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

 



2010/10/14 Daniel Veillard <veillard@xxxxxxxxxx>:
> On Wed, Oct 13, 2010 at 10:47:57PM +0200, Matthias Bolte wrote:
>> 2010/10/13 Daniel Veillard <veillard@xxxxxxxxxx>:
>> > On Wed, Oct 13, 2010 at 11:06:44AM +0200, Matthias Bolte wrote:
>> >> VMware uses a mix of percent-, pipe- and base64-encoding in
>> >> different combinations in different places.
>> >>
>> >> Add a testcase for this.
>> >> ---
>> >> Âsrc/esx/README Â Â Â Â Â Â Â Â Â Â Â Â Â | Â 25 ++++
>> >> Âsrc/esx/esx_driver.c           |  72 ++++++-----
>> >> Âsrc/esx/esx_storage_driver.c       |  42 ++++++-
>> >> Âsrc/esx/esx_util.c            | Â198 ++++++++++++++++++++++++++++++
>> >> Âsrc/esx/esx_util.h            |  18 +++
>> >> Âsrc/esx/esx_vi.c             |  Â6 +
>> >> Âsrc/esx/esx_vmx.c            Â|  88 +++++---------
>> >> Âtests/esxutilstest.c           |  51 ++++++++
>> >> Âtests/xml2vmxdata/xml2vmx-annotation.vmx | Â Â2 +-
>> >> Â9 files changed, 405 insertions(+), 97 deletions(-)
>> >
>> > ÂThat sounds vaguely familiar, I think I reviewed such a patch last
>> > Âmonth, right ?
>>
>> I've sworn about this on IRC last week, so that's probably why it
>> sounds familiar to you :)
>
> Âhum, maybe I got confused then ...
>
>
>> +static struct testDatastoreItem datastoreItems[] = {
>> + Â Â{ "normal", "normal" },
>> + Â Â{ /* "AÃ1Ã2Ã3Ã4#5~6!7Â8/9%Z" */
>> + Â Â Â"A\303\2441\303\2662\303\2743\303\2374#5~6!7\302\2478/9%Z",
>> + Â Â Â"A+w6Q-1+w7Y-2+w7w-3+w58-4+Iw-5+fg-6+IQ-7+wqc-8+JQ-2f9+JQ-25Z" },
>> + Â Â{ /* "Z~6!7Â8/9%0#1\"2'3`4&A" */ "Z~6!7\302\2478/9%0#1\"2'3`4&A",
>> + Â Â Â"Z+fg-6+IQ-7+wqc-8+JQ-2f9+JQ-250+Iw-1_2'3+YA-4+Jg-A" },
>> + Â Â{ /* "ææè" */ "\346\250\231\346\272\226\350\252\236", "+5qiZ5rqW6Kqe" },
>> + Â Â{ "!\"#$%&'()*+,-./0123456789:;<=>?",
>> + Â Â Â"+IQ-_+IyQl-25+Jg-'()_+Kw-,-.+JQ-2f0123456789_+Ow-_+PQ-__" },
>> + Â Â{ "A Z[\\]^_B", "A Z+WyU-5c+XV4-_B" },
>> + Â Â{ "A`B@{|}~DEL", "A+YA-B+QHs-_+fX4-DEL" },
>> + Â Â{ /* "hÃÃÃÃÃÃH" */ "h\303\200\303\201\303\202\303\203\303\204\303\205H",
>> + Â Â Â"h+w4DDgcOCw4PDhMOF-H" },
>> + Â Â{ /* "AìZ" */ "A\354\277\200Z", "A+7L+A-Z" },
>> + Â Â{ /* "!ìA" */ "!\354\277\200A", "+Iey,gA-A" },
>> + Â Â{ "~~~", "+fn5+" },
>> + Â Â{ "~~~A", "+fn5+-A" },
>> + Â Â{ "K%U/H\\Z", "K+JQ-25U+JQ-2fH+JQ-5cZ" },
>> + Â Â{ "vvv<A\"B\"C>zzz", "vvv_A_B_C_zzz" },
>> +};
>
> ÂI assume in comments it's harmless, so ACK :-)
>
> Â thanks !
>
> Daniel
>

Well, the encoding problem will still affect the comments but that
should be no problem for the compiler or the result of the test case.

This is how gnulib does this in its test cases. Eric linked me an
example for the gnulib codebase and I just followed that example.

I pushed this now.

Matthias

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]