runner: Fix use of newline on arguments
Currently there's no support for newlines on arguments passed to runner. However it's also a silent failure: # igt_runner --test-list '/tmp/test list2.txt' build/tests/ /tmp/results # head /tmp/results/metadata.txt disk_usage_limit : 0 test_list : /tmp/test list2.txt name : results ... # ./build/runner/igt_resume /tmp/results [9840425.334900] All tests already executed. resume failed at generating results Done. Embedding a newline like this is very dubious for test-list, but it's used for e.g. hooks. In future we will add the command line to the metadata and possibly migrate the hooks, so add support for escaping/unescaping the string on save/restore. The method chosen is slightly different than the one used for hooks: instead of adding a escape char and keeping the char escaped, this just prefers using an hex representation of the char with a \x<HEX>h sequence. This makes it easier when unescaping since the reader can continue reading one line per iteration. In future this can also be adopted by the hooks or even migrating the hooks to use metadata.txt. Another fix is that now we just skip null values on the serialization side. Previously it would serialize "(null)" and then load that string instead of NULL. Add code_coverage_script to the runner_test to cover that, which would previously fail. Reviewed-by:Gustavo Sousa <gustavo.sousa@intel.com> Tested-by:
Peter Senna Tschudin <peter.senna@linux.intel.com> Reviewed-by:
Peter Senna Tschudin <peter.senna@linux.intel.com> Link: https://lore.kernel.org/r/20250207231039.2883195-9-lucas.demarchi@intel.com Signed-off-by:
Lucas De Marchi <lucas.demarchi@intel.com>
Loading
Please register or sign in to comment