On 10/06/20 15:55, Paulo de Rezende Pinatti wrote:
>> + { " arg3\" escaped=val2\"",
"arg3\"
>> escaped", "val2", "" },
>
> ^Is this even valid for the kernel itself? Looking at [1], they
> clearly don't
> allow escaped \" in the arg/value.
>
> [1]
>
https://github.com/torvalds/linux/blob/db54615e21419c3cb4d699a0b0aa16cc44...
>
>
I guess the word "escaped" in this test is a bit misleading; it's
actually escaping the blank space, not the quote itself. This is valid
for the kernel. In order to assure our parsing results would match those
of the kernel I executed the code in cmdline.c in a standalone file to
generate the reference values for the test.
I'll change "arg3\" escaped" to "arg3\" with spaces" to
clearly state
the intention here.
I forgot to mention that while double checking the reference values I
had to add a missing trailing double quote to the expected result value
in order to match what the kernel produces for this case. So this is
actually "val2\"".
--
Best regards,
Paulo de Rezende Pinatti