[PATCH i-g-t v2 6/7] runner/settings: Serialize command line
Kamil Konieczny
kamil.konieczny at linux.intel.com
Wed Jan 29 17:23:48 UTC 2025
Hi Lucas,
On 2025-01-28 at 13:34:24 -0600, Lucas De Marchi wrote:
> On Tue, Jan 28, 2025 at 07:37:44PM +0100, Kamil Konieczny wrote:
> > Hi Lucas,
> > On 2025-01-21 at 14:57:32 -0800, Lucas De Marchi wrote:
> > > 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
> >
> > Sorry for late reponse but imho it should be saved for debugging
> > purpose but not for reading this in metadata.txt, especially that
> > this option '-o' is 'override existing results folder', so it
> > should be used only once by igt_runner in setup phase but not for
> > igt_resume.
> >
> > From igt_runner --help:
> > -o, --overwrite If the results-path already exists, delete it
>
> if you are using -o it's just because you don't care about the previous
> results and want to completely overwrite it.
>
> igt_resume doesn't have any option - it doesn't have a -o and it
> basically does:
>
> "Load the settings from the state dir back into the settings struct"...
> igt_resume will read it back and create the settings object.
>
> The results.json as architected in igt_runner discards everything and
> is basically a conversion format from the state dir to a .json file at
> the end of the execution.
>
> >
> > imho we should save it into some different file and include it into
> > results.json
>
> not sure I follow... metadata.txt has the details of how we are running
> igt_runner and it's basically a dump of the settings object. I don't
> follow what's the relation with the -o option you mentioned above.
>
> End goal is to have the value in the results.json, but I see no reason
> why the intermediary state needs to be in a different file.
>
> Lucas De Marchi
Well, what I try to comment on a commit description:
> Serialize the command line to metadata.txt. [...]
imho this should be written in setup.txt and setup.txt should be
included in results.json There is no need for igt_runner options
in metadata.txt, as it is used by igt_resume in shard re-runs
after a reboot happens in a middle of testlist.
Regards,
Kamil
>
> >
> > Also +Cc Petri
> > Cc: Petri Latvala <adrinael at adrinael.net>
> >
> > Regards,
> > Kamil
> >
> > > cmdline.argv[2] : --test-list
> > > cmdline.argv[3] : /tmp/testlist.txt
> > > cmdline.argv[4] : build/tests/
> > > cmdline.argv[5] : /tmp/results
> > >
> > > Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
> > > ---
> > > runner/settings.c | 42 ++++++++++++++++++++++++++++++++++++++++++
> > > runner/settings.h | 5 +++++
> > > 2 files changed, 47 insertions(+)
...cut...
More information about the igt-dev
mailing list