[PATCH i-g-t v2] runner/settings: set PRUNE_KEEP_ALL as default

Tahvanainen, Jari jari.tahvanainen at intel.com
Thu Aug 29 07:14:40 UTC 2024


Tested-by: Jari Tahvanainen <jari.tahvanainen at intel.com>

I executed few tests having dynamic subtests with this version of the runner providing results both for the dynamic subtests and their parent in results.json (as expected).
"ninja -C build test" also works without failures with accompanied change on runner_tests.c.

> -----Original Message-----
> From: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> Sent: Friday, August 23, 2024 7:14 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>; Musial, Ewelina
> <ewelina.musial at intel.com>; Helen Koike <helen.koike at collabora.com>;
> Tahvanainen, Jari <jari.tahvanainen at intel.com>; Petri Latvala
> <adrinael at adrinael.net>; Rob Clark <robdclark at gmail.com>
> Subject: [PATCH i-g-t v2] runner/settings: set PRUNE_KEEP_ALL as default
> 
> In testing drm-tip it is helpful to have reported all tests results, especially when
> one have many dynamic ones we want to get a parent result.
> 
> v2: fix for runner_tests (Jari)
> 
> Cc: Ewelina Musial <ewelina.musial at intel.com>
> Cc: Helen Koike <helen.koike at collabora.com>
> Cc: Jari Tahvanainen <jari.tahvanainen at intel.com>
> Cc: Petri Latvala <adrinael at adrinael.net>
> Cc: Rob Clark <robdclark at gmail.com>
> Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> ---
>  runner/runner_tests.c | 2 +-
>  runner/settings.c     | 8 ++++++--
>  2 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/runner/runner_tests.c b/runner/runner_tests.c index
> b806d45ad..a661722ac 100644
> --- a/runner/runner_tests.c
> +++ b/runner/runner_tests.c
> @@ -310,7 +310,7 @@ igt_main
>  		igt_assert_eq(settings->per_test_timeout, 0);
>  		igt_assert_eq(settings->overall_timeout, 0);
>  		igt_assert(!settings->use_watchdog);
> -		igt_assert_eq(settings->prune_mode, 0);
> +		igt_assert_eq(settings->prune_mode, PRUNE_KEEP_ALL);
>  		igt_assert(strstr(settings->test_root, "test-root-dir") != NULL);
>  		igt_assert(strstr(settings->results_path, "path-to-results") !=
> NULL);
> 
> diff --git a/runner/settings.c b/runner/settings.c index 94b3b9fe6..0d27e7af3
> 100644
> --- a/runner/settings.c
> +++ b/runner/settings.c
> @@ -279,11 +279,11 @@ static const char *usage_str =
>  	"                        results that are removed from the final results set.\n"
>  	"                        Possible options:\n"
>  	"                         keep-dynamic-subtests  - Remove subtests that have
> dynamic\n"
> -	"                                                  subtests. (default)\n"
> +	"                                                  subtests.\n"
>  	"                         keep-dynamic           - Alias for the above\n"
>  	"                         keep-subtests          - Remove dynamic subtests,\n"
>  	"                                                  leaving just the parent subtest.\n"
> -	"                         keep-all               - Don't remove anything\n"
> +	"                         keep-all               - Don't remove anything (default)\n"
>  	"                         keep-requested         - Remove reported results that
> are\n"
>  	"                                                  not in the requested test set.\n"
>  	"                                                  Useful when you have a hand-written\n"
> @@ -693,6 +693,7 @@ bool parse_options(int argc, char **argv,
>  	optind = 1;
> 
>  	settings->dmesg_warn_level = -1;
> +	settings->prune_mode = -1;
> 
>  	while ((c = getopt_long(argc, argv, "hn:dt:x:e:sl:omb:L",
>  				long_options, NULL)) != -1) {
> @@ -818,6 +819,9 @@ bool parse_options(int argc, char **argv,
>  	if (settings->dmesg_warn_level < 0)
>  		settings->dmesg_warn_level = 4; /* KERN_WARN */
> 
> +	if (settings->prune_mode < 0)
> +		settings->prune_mode = PRUNE_KEEP_ALL;
> +
>  	if (settings->list_all) { /* --list-all doesn't require results path */
>  		switch (argc - optind) {
>  		case 1:
> --
> 2.43.0



More information about the igt-dev mailing list