[PATCH i-g-t v2 6/7] runner/settings: Serialize command line

Peter Senna Tschudin peter.senna at linux.intel.com
Wed Jan 22 18:53:43 UTC 2025



On 22.01.2025 19:26, Gustavo Sousa wrote:
> Quoting Peter Senna Tschudin (2025-01-22 15:16:59-03:00)
>>
>>
>> On 22.01.2025 13:40, Gustavo Sousa wrote:
>>> Quoting Lucas De Marchi (2025-01-21 19:57:32-03:00)
>>>> Serialize the command line to metadata.txt. The expected format in the
>>>> metadata.txt is like below:
>>>>
>>>>        cmdline.argc : 6
>>>>        cmdline.argv[0] : ./build/runner/igt_runner
>>>>        cmdline.argv[1] : -o
>>>>        cmdline.argv[2] : --test-list
>>>>        cmdline.argv[3] : /tmp/testlist.txt
>>>>        cmdline.argv[4] : build/tests/
>>>>        cmdline.argv[5] : /tmp/results
>>>
>>> One limitation here is that we would run into problems if one of the
>>> arguments contains a newline character. We need to have a proper way of
>>> handling that.
>>
>> I tested this by adding -t '(?m)\b\w*exec\w*\b\n', is that what you mean?
> 
> If you are using bash, I'm afraid '\n' in '(?m)\b\w*exec\w*\b\n' is not
> turned into a real newline character. Something like $'foo\nbar'
> would.
> 
> Example:
> 
>   $ echo 'foo\nbar'
>   foo\nbar
> 
>   $ echo $'foo\nbar'
>   foo
>   bar

Passing -t $'(?m)\b\w*exec\w*\b\n' makes igt_runner crash with and without
the patch series. So no regression was introduced by this series...





More information about the igt-dev mailing list