All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] runner: Abort the run after a kernel taint is discovered
@ 2021-01-06 14:00 Chris Wilson
  2021-01-06 14:31 ` [igt-dev] ✗ Fi.CI.BUILD: failure for " Patchwork
  2021-01-07  9:55 ` [igt-dev] [PATCH i-g-t] " Petri Latvala
  0 siblings, 2 replies; 4+ messages in thread
From: Chris Wilson @ 2021-01-06 14:00 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala, Chris Wilson

Since we no longer immediately abort a test upon a taint, that taint may
persist into the next test causing unrelated incompletes. Avoid the
tainted inheritance by aborting between tests if the kernel is tainted.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
---
 runner/executor.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/runner/executor.c b/runner/executor.c
index faf272d85..8cddcf1ce 100644
--- a/runner/executor.c
+++ b/runner/executor.c
@@ -1801,6 +1801,7 @@ bool execute(struct execute_state *state,
 
 	for (; state->next < job_list->size;
 	     state->next++) {
+		unsigned long taints;
 		char *reason = NULL;
 		int result;
 
@@ -1836,6 +1837,13 @@ bool execute(struct execute_state *state,
 			break;
 		}
 
+		if (settings->abort_mask & ABORT_TAINT && tainted(&taints)) {
+			outf("Stopping the rung because the kernel is tainted: %#x.\n",
+			     taintss);
+			status = false;
+			break;
+		}
+
 		reduce_time_left(settings, state, time_spent);
 
 		if (overall_timeout_exceeded(state)) {
-- 
2.30.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [igt-dev] ✗ Fi.CI.BUILD: failure for runner: Abort the run after a kernel taint is discovered
  2021-01-06 14:00 [igt-dev] [PATCH i-g-t] runner: Abort the run after a kernel taint is discovered Chris Wilson
@ 2021-01-06 14:31 ` Patchwork
  2021-01-07  9:55 ` [igt-dev] [PATCH i-g-t] " Petri Latvala
  1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2021-01-06 14:31 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: runner: Abort the run after a kernel taint is discovered
URL   : https://patchwork.freedesktop.org/series/85550/
State : failure

== Summary ==

IGT patchset build failed on latest successful build
f0ad1a564956d6796d9ff09182c48d78fb00eefe i915/gem_ctx_engines: Skip store-dword testing on unusable engines

[371/415] Linking target tools/intel_gpu_time.
[372/415] Linking target tools/intel_gtt.
[373/415] Linking target tools/intel_guc_logger.
[374/415] Linking target tools/intel_lid.
[375/415] Linking target tools/intel_infoframes.
[376/415] Linking target tools/intel_panel_fitter.
[377/415] Linking target tools/intel_opregion_decode.
[378/415] Linking target tools/intel_reg_checker.
[379/415] Linking target tools/intel_stepping.
[380/415] Linking target tools/intel_residency.
[381/415] Linking target tools/intel_vbt_decode.
[382/415] Linking target tools/intel_watermark.
[383/415] Linking target tools/intel_gem_info.
[384/415] Linking target tools/intel_gvtg_test.
[385/415] Linking target tools/dpcd_reg.
[386/415] Linking target tools/lsgpu.
[387/415] Linking target tools/intel_framebuffer_dump.
[388/415] Linking target tools/intel_dump_decode.
[389/415] Linking target tools/intel_error_decode.
[390/415] Linking target tools/intel_perf_counters.
[391/415] Linking target tools/intel_dp_compliance.
[392/415] Linking target tools/intel_l3_parity.
[393/415] Linking target tools/intel_reg.
[394/415] Linking target tools/amd_hdmi_compliance.
[395/415] Linking target tools/i915-perf/i915-perf-reader.
[396/415] Linking target tools/msm_dp_compliance.
[397/415] Linking target tools/i915-perf/i915-perf-configs.
[398/415] Linking target runner/testdata/successtest.
[399/415] Linking target tools/null_state_gen/intel_null_state_gen.
[400/415] Linking target runner/testdata/no-subtests.
[401/415] Linking target runner/testdata/skippers.
[402/415] Linking target runner/testdata/abort-dynamic.
[403/415] Linking target runner/testdata/dynamic.
[404/415] Compiling C object 'runner/runner@@igt_runner@sta/executor.c.o'.
FAILED: runner/runner@@igt_runner@sta/executor.c.o 
ccache cc -Irunner/runner@@igt_runner@sta -Irunner -I../runner -I../include/drm-uapi -Ilib -I../lib -I../lib/stubs/syscalls -I. -I../ -I/usr/include/json-c -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/home/cidrm/kernel_headers/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O2 -g -D_GNU_SOURCE -include config.h -D_FORTIFY_SOURCE=2 -Wbad-function-cast -Wdeclaration-after-statement -Wformat=2 -Wimplicit-fallthrough=0 -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wuninitialized -Wunused -Wno-clobbered -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-pointer-arith -Wno-sign-compare -Wno-type-limits -Wno-unused-parameter -Wno-unused-result -Werror=address -Werror=array-bounds -Werror=implicit -Werror=init-self -Werror=int-to-pointer-cast -Werror=main -Werror=missing-braces -Werror=nonnull -Werror=pointer-to-int-cast -Werror=return-type -Werror=sequence-point -Werror=trigraphs -Werror=write-strings -fno-builtin-malloc -fno-builtin-calloc -fcommon -fPIC -DHAVE_OPING=1  -MD -MQ 'runner/runner@@igt_runner@sta/executor.c.o' -MF 'runner/runner@@igt_runner@sta/executor.c.o.d' -o 'runner/runner@@igt_runner@sta/executor.c.o' -c ../runner/executor.c
../runner/executor.c: In function ‘execute’:
../runner/executor.c:1842:9: error: ‘taintss’ undeclared (first use in this function); did you mean ‘taints’?
         taintss);
         ^~~~~~~
../runner/executor.c:54:39: note: in definition of macro ‘outf’
 #define outf(fmt...) __logf__(stdout, fmt)
                                       ^~~
../runner/executor.c:1842:9: note: each undeclared identifier is reported only once for each function it appears in
         taintss);
         ^~~~~~~
../runner/executor.c:54:39: note: in definition of macro ‘outf’
 #define outf(fmt...) __logf__(stdout, fmt)
                                       ^~~
ninja: build stopped: subcommand failed.


_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] runner: Abort the run after a kernel taint is discovered
  2021-01-06 14:00 [igt-dev] [PATCH i-g-t] runner: Abort the run after a kernel taint is discovered Chris Wilson
  2021-01-06 14:31 ` [igt-dev] ✗ Fi.CI.BUILD: failure for " Patchwork
@ 2021-01-07  9:55 ` Petri Latvala
  2021-01-07 10:05   ` Chris Wilson
  1 sibling, 1 reply; 4+ messages in thread
From: Petri Latvala @ 2021-01-07  9:55 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

On Wed, Jan 06, 2021 at 02:00:35PM +0000, Chris Wilson wrote:
> Since we no longer immediately abort a test upon a taint, that taint may
> persist into the next test causing unrelated incompletes. Avoid the
> tainted inheritance by aborting between tests if the kernel is tainted.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
> Cc: Petri Latvala <petri.latvala@intel.com>
> ---
>  runner/executor.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/runner/executor.c b/runner/executor.c
> index faf272d85..8cddcf1ce 100644
> --- a/runner/executor.c
> +++ b/runner/executor.c
> @@ -1801,6 +1801,7 @@ bool execute(struct execute_state *state,
>  
>  	for (; state->next < job_list->size;
>  	     state->next++) {
> +		unsigned long taints;
>  		char *reason = NULL;
>  		int result;
>  
> @@ -1836,6 +1837,13 @@ bool execute(struct execute_state *state,
>  			break;
>  		}
>  
> +		if (settings->abort_mask & ABORT_TAINT && tainted(&taints)) {
> +			outf("Stopping the rung because the kernel is tainted: %#x.\n",
> +			     taintss);
> +			status = false;
> +			break;
> +		}
> +

We already call need_to_abort() a couple of lines above this:

if (reason != NULL || (reason = need_to_abort(settings)) != NULL) {


-- 
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] runner: Abort the run after a kernel taint is discovered
  2021-01-07  9:55 ` [igt-dev] [PATCH i-g-t] " Petri Latvala
@ 2021-01-07 10:05   ` Chris Wilson
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2021-01-07 10:05 UTC (permalink / raw)
  To: Petri Latvala; +Cc: igt-dev

Quoting Petri Latvala (2021-01-07 09:55:17)
> On Wed, Jan 06, 2021 at 02:00:35PM +0000, Chris Wilson wrote:
> > Since we no longer immediately abort a test upon a taint, that taint may
> > persist into the next test causing unrelated incompletes. Avoid the
> > tainted inheritance by aborting between tests if the kernel is tainted.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
> > Cc: Petri Latvala <petri.latvala@intel.com>
> > ---
> >  runner/executor.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/runner/executor.c b/runner/executor.c
> > index faf272d85..8cddcf1ce 100644
> > --- a/runner/executor.c
> > +++ b/runner/executor.c
> > @@ -1801,6 +1801,7 @@ bool execute(struct execute_state *state,
> >  
> >       for (; state->next < job_list->size;
> >            state->next++) {
> > +             unsigned long taints;
> >               char *reason = NULL;
> >               int result;
> >  
> > @@ -1836,6 +1837,13 @@ bool execute(struct execute_state *state,
> >                       break;
> >               }
> >  
> > +             if (settings->abort_mask & ABORT_TAINT && tainted(&taints)) {
> > +                     outf("Stopping the rung because the kernel is tainted: %#x.\n",
> > +                          taintss);
> > +                     status = false;
> > +                     break;
> > +             }
> > +
> 
> We already call need_to_abort() a couple of lines above this:
> 
> if (reason != NULL || (reason = need_to_abort(settings)) != NULL) {

Oh, it's the dynamic subtests that are producing the confused results.

More reason to have the tainted selfchecks in libigt.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-07 10:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-06 14:00 [igt-dev] [PATCH i-g-t] runner: Abort the run after a kernel taint is discovered Chris Wilson
2021-01-06 14:31 ` [igt-dev] ✗ Fi.CI.BUILD: failure for " Patchwork
2021-01-07  9:55 ` [igt-dev] [PATCH i-g-t] " Petri Latvala
2021-01-07 10:05   ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.