From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 1/2] runner/settings: add dump-gpu-on-timeout option
Date: Tue, 19 Sep 2023 09:20:30 +0200 [thread overview]
Message-ID: <20230919092030.3b2bcec1@maurocar-mobl2> (raw)
In-Reply-To: <20230714153946.36448-2-kamil.konieczny@linux.intel.com>
On Fri, 14 Jul 2023 17:39:45 +0200
Kamil Konieczny <kamil.konieczny@linux.intel.com> wrote:
> Add new option --dump-gpu-on-timeout for dumping error state
> of GPU in case of inactivity or per-test timeout occurs. This
> will help in faster problem diagnose from CI runs.
>
> Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
The change itself LGTM. I'm wondering if it makes sense in this case
to have an unit test to check it.
For the patch:
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> ---
> runner/settings.c | 12 +++++++++++-
> runner/settings.h | 1 +
> 2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/runner/settings.c b/runner/settings.c
> index 23aa82963..880aefbd6 100644
> --- a/runner/settings.c
> +++ b/runner/settings.c
> @@ -28,6 +28,7 @@ enum {
> OPT_CODE_COV_SCRIPT,
> OPT_ENABLE_CODE_COVERAGE,
> OPT_COV_RESULTS_PER_TEST,
> + OPT_DUMP_GPU_ON_TIMEOUT,
> OPT_VERSION,
> OPT_PRUNE_MODE,
> OPT_HELP = 'h',
> @@ -297,6 +298,10 @@ static const char *usage_str =
> " Requires --collect-script FILENAME\n"
> " --collect-script FILENAME\n"
> " Use FILENAME as script to collect code coverage data.\n"
> + " --dump-gpu-on-timeout FILENAME\n"
> + " Use /sys/class/drm/card*/error (default) or (if default is empty)\n"
> + " /sys/kernel/debug/dri/*/FILENAME for reading GPU error state\n"
> + " in case of inactivity/per-test timeout occurs.\n"
> "\n"
> " [test_root] Directory that contains the IGT tests. The environment\n"
> " variable IGT_TEST_ROOT will be used if set, overriding\n"
> @@ -654,6 +659,7 @@ bool parse_options(int argc, char **argv,
> {"collect-code-cov", no_argument, NULL, OPT_ENABLE_CODE_COVERAGE},
> {"coverage-per-test", no_argument, NULL, OPT_COV_RESULTS_PER_TEST},
> {"collect-script", required_argument, NULL, OPT_CODE_COV_SCRIPT},
> + {"dump-gpu-on-timeout", required_argument, NULL, OPT_DUMP_GPU_ON_TIMEOUT},
> {"multiple-mode", no_argument, NULL, OPT_MULTIPLE},
> {"inactivity-timeout", required_argument, NULL, OPT_TIMEOUT},
> {"per-test-timeout", required_argument, NULL, OPT_PER_TEST_TIMEOUT},
> @@ -740,7 +746,9 @@ bool parse_options(int argc, char **argv,
> case OPT_CODE_COV_SCRIPT:
> settings->code_coverage_script = bin_path(optarg);
> break;
> -
> + case OPT_DUMP_GPU_ON_TIMEOUT:
> + settings->dump_gpu_on_timeout = bin_path(optarg);
> + break;
> case OPT_MULTIPLE:
> settings->multiple_mode = true;
> break;
> @@ -1039,6 +1047,7 @@ bool serialize_settings(struct settings *settings)
> SERIALIZE_LINE(f, settings, enable_code_coverage, "%d");
> SERIALIZE_LINE(f, settings, cov_results_per_test, "%d");
> SERIALIZE_LINE(f, settings, code_coverage_script, "%s");
> + SERIALIZE_LINE(f, settings, dump_gpu_on_timeout, "%s");
>
> if (settings->sync) {
> fflush(f);
> @@ -1102,6 +1111,7 @@ bool read_settings_from_file(struct settings *settings, FILE *f)
> PARSE_LINE(settings, name, val, enable_code_coverage, numval);
> PARSE_LINE(settings, name, val, cov_results_per_test, numval);
> PARSE_LINE(settings, name, val, code_coverage_script, val ? strdup(val) : NULL);
> + PARSE_LINE(settings, name, val, dump_gpu_on_timeout, val ? strdup(val) : NULL);
>
> printf("Warning: Unknown field in settings file: %s = %s\n",
> name, val);
> diff --git a/runner/settings.h b/runner/settings.h
> index 819c34602..ab9e4c630 100644
> --- a/runner/settings.h
> +++ b/runner/settings.h
> @@ -72,6 +72,7 @@ struct settings {
> char *code_coverage_script;
> bool enable_code_coverage;
> bool cov_results_per_test;
> + char *dump_gpu_on_timeout;
> };
>
> /**
next prev parent reply other threads:[~2023-09-19 7:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-14 15:39 [igt-dev] [PATCH i-g-t 0/2] RFC: runner: dump GPU error state on timeout Kamil Konieczny
2023-07-14 15:39 ` [igt-dev] [PATCH i-g-t 1/2] runner/settings: add dump-gpu-on-timeout option Kamil Konieczny
2023-09-19 7:20 ` Mauro Carvalho Chehab [this message]
2023-07-14 15:39 ` [igt-dev] [PATCH i-g-t 2/2] runner/executor: write GPU error on timeout Kamil Konieczny
2023-09-19 7:29 ` Mauro Carvalho Chehab
2023-09-19 8:09 ` Kamil Konieczny
2023-07-14 15:58 ` [igt-dev] ✗ GitLab.Pipeline: warning for RFC: runner: dump GPU error state " Patchwork
2023-07-14 16:29 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-07-14 17:01 ` [igt-dev] ○ CI.xeBAT: info " Patchwork
2023-07-14 18:30 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230919092030.3b2bcec1@maurocar-mobl2 \
--to=mauro.chehab@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox