All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] i915/selftest: Allow filtering of individual subtests
@ 2019-01-22 18:35 ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2019-01-22 18:35 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

Take an environment variable, SELFTESTS=foo,bar, and pass that along to
the kernel (as i915.st_filter=foo,bar) to provide fine grained test
selection. This can be either as an exact match to select only that
test, or to exclude only test. For example,

SELFTESTS=igt_vma_create,igt_vma_pin1 i915_selftest --run mock_vma
SELFTESTS=!igt_vma_create i915_selftest --run mock_vma

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/selftest.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/tests/i915/selftest.c b/tests/i915/selftest.c
index 80e515c61..b8d7f0af1 100644
--- a/tests/i915/selftest.c
+++ b/tests/i915/selftest.c
@@ -28,10 +28,16 @@ IGT_TEST_DESCRIPTION("Basic unit tests for i915.ko");
 
 igt_main
 {
-	igt_kselftests("i915",
-		       "mock_selftests=-1 disable_display=1",
-		       NULL, "mock");
-	igt_kselftests("i915",
-		       "live_selftests=-1 disable_display=1",
-		       "live_selftests", "live");
+	const char *env = getenv("SELFTESTS");
+	char opts[1024];
+
+	igt_assert(snprintf(opts, sizeof(opts),
+			    "mock_selftests=-1 disable_display=1 st_filter=%s",
+			    env) < sizeof(opts));
+	igt_kselftests("i915", opts, NULL, "mock");
+
+	igt_assert(snprintf(opts, sizeof(opts),
+			    "live_selftests=-1 disable_display=1 st_filter=%s",
+			    env) < sizeof(opts));
+	igt_kselftests("i915", opts, "live_selftests", "live");
 }
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [igt-dev] [PATCH i-g-t] i915/selftest: Allow filtering of individual subtests
@ 2019-01-22 18:35 ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2019-01-22 18:35 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

Take an environment variable, SELFTESTS=foo,bar, and pass that along to
the kernel (as i915.st_filter=foo,bar) to provide fine grained test
selection. This can be either as an exact match to select only that
test, or to exclude only test. For example,

SELFTESTS=igt_vma_create,igt_vma_pin1 i915_selftest --run mock_vma
SELFTESTS=!igt_vma_create i915_selftest --run mock_vma

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/selftest.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/tests/i915/selftest.c b/tests/i915/selftest.c
index 80e515c61..b8d7f0af1 100644
--- a/tests/i915/selftest.c
+++ b/tests/i915/selftest.c
@@ -28,10 +28,16 @@ IGT_TEST_DESCRIPTION("Basic unit tests for i915.ko");
 
 igt_main
 {
-	igt_kselftests("i915",
-		       "mock_selftests=-1 disable_display=1",
-		       NULL, "mock");
-	igt_kselftests("i915",
-		       "live_selftests=-1 disable_display=1",
-		       "live_selftests", "live");
+	const char *env = getenv("SELFTESTS");
+	char opts[1024];
+
+	igt_assert(snprintf(opts, sizeof(opts),
+			    "mock_selftests=-1 disable_display=1 st_filter=%s",
+			    env) < sizeof(opts));
+	igt_kselftests("i915", opts, NULL, "mock");
+
+	igt_assert(snprintf(opts, sizeof(opts),
+			    "live_selftests=-1 disable_display=1 st_filter=%s",
+			    env) < sizeof(opts));
+	igt_kselftests("i915", opts, "live_selftests", "live");
 }
-- 
2.20.1

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for i915/selftest: Allow filtering of individual subtests
  2019-01-22 18:35 ` [igt-dev] " Chris Wilson
  (?)
@ 2019-01-22 19:29 ` Patchwork
  -1 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2019-01-22 19:29 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: i915/selftest: Allow filtering of individual subtests
URL   : https://patchwork.freedesktop.org/series/55577/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5464 -> IGTPW_2274
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/55577/revisions/1/mbox/

Known issues
------------

  Here are the changes found in IGTPW_2274 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_basic@cs-compute:
    - fi-kbl-8809g:       NOTRUN -> FAIL [fdo#108094]

  * igt@amdgpu/amd_prime@amd-to-i915:
    - fi-kbl-8809g:       NOTRUN -> FAIL [fdo#107341]

  
#### Possible fixes ####

  * igt@amdgpu/amd_basic@userptr:
    - fi-kbl-8809g:       DMESG-WARN [fdo#108965] -> PASS

  * igt@gem_exec_suspend@basic-s3:
    - fi-blb-e6850:       INCOMPLETE [fdo#107718] -> PASS

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
    - fi-byt-clapper:     FAIL [fdo#103191] / [fdo#107362] -> PASS

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#107341]: https://bugs.freedesktop.org/show_bug.cgi?id=107341
  [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#108094]: https://bugs.freedesktop.org/show_bug.cgi?id=108094
  [fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278


Participating hosts (45 -> 42)
------------------------------

  Additional (1): fi-skl-6770hq 
  Missing    (4): fi-kbl-soraka fi-ilk-m540 fi-byt-squawks fi-bsw-cyan 


Build changes
-------------

    * IGT: IGT_4782 -> IGTPW_2274

  CI_DRM_5464: af90b519a670a3aec89045d9fcca8f2d174adeda @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2274: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2274/
  IGT_4782: 96f3a1b876e0dd24706b85fb872f12031a436e84 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2274/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.IGT: success for i915/selftest: Allow filtering of individual subtests
  2019-01-22 18:35 ` [igt-dev] " Chris Wilson
  (?)
  (?)
@ 2019-01-22 21:09 ` Patchwork
  -1 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2019-01-22 21:09 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: i915/selftest: Allow filtering of individual subtests
URL   : https://patchwork.freedesktop.org/series/55577/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5464_full -> IGTPW_2274_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/55577/revisions/1/mbox/

Known issues
------------

  Here are the changes found in IGTPW_2274_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@kms_available_modes_crc@available_mode_test_crc:
    - shard-apl:          PASS -> FAIL [fdo#106641]
    - shard-glk:          PASS -> FAIL [fdo#106641]

  * igt@kms_busy@extended-modeset-hang-newfb-render-a:
    - shard-glk:          NOTRUN -> DMESG-WARN [fdo#107956]

  * igt@kms_busy@extended-pageflip-hang-newfb-render-a:
    - shard-glk:          PASS -> DMESG-WARN [fdo#107956]

  * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a:
    - shard-snb:          PASS -> DMESG-WARN [fdo#107956]

  * igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
    - shard-glk:          PASS -> FAIL [fdo#108145]

  * igt@kms_color@pipe-a-legacy-gamma:
    - shard-apl:          PASS -> FAIL [fdo#104782] / [fdo#108145]

  * igt@kms_color@pipe-b-ctm-max:
    - shard-apl:          NOTRUN -> FAIL [fdo#108147]

  * igt@kms_cursor_crc@cursor-256x256-random:
    - shard-glk:          PASS -> FAIL [fdo#103232] +10
    - shard-apl:          PASS -> FAIL [fdo#103232] +9

  * igt@kms_cursor_legacy@flip-vs-cursor-legacy:
    - shard-glk:          NOTRUN -> FAIL [fdo#102670]

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
    - shard-apl:          PASS -> FAIL [fdo#103167] +1

  * igt@kms_frontbuffer_tracking@fbc-1p-rte:
    - shard-glk:          PASS -> FAIL [fdo#103167] / [fdo#105682]

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu:
    - shard-glk:          PASS -> FAIL [fdo#103167] +11

  * igt@kms_plane@plane-position-covered-pipe-b-planes:
    - shard-kbl:          PASS -> FAIL [fdo#103166]
    - shard-apl:          PASS -> FAIL [fdo#103166]

  * igt@kms_plane_alpha_blend@pipe-c-alpha-transparant-fb:
    - shard-glk:          NOTRUN -> FAIL [fdo#108145]

  * igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
    - shard-glk:          PASS -> FAIL [fdo#103166] +6

  * igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
    - shard-apl:          NOTRUN -> FAIL [fdo#103166]

  
#### Possible fixes ####

  * igt@gem_tiled_swapping@non-threaded:
    - shard-apl:          INCOMPLETE [fdo#103927] -> PASS

  * igt@kms_cursor_crc@cursor-256x256-dpms:
    - shard-glk:          FAIL [fdo#103232] -> PASS +3

  * igt@kms_cursor_crc@cursor-256x85-random:
    - shard-apl:          FAIL [fdo#103232] -> PASS
    - shard-kbl:          FAIL [fdo#103232] -> PASS

  * igt@kms_cursor_crc@cursor-64x64-suspend:
    - shard-apl:          FAIL [fdo#103191] / [fdo#103232] -> PASS

  * igt@kms_cursor_legacy@cursora-vs-flipa-atomic-transitions-varying-size:
    - shard-snb:          {SKIP} [fdo#109271] -> PASS +4

  * igt@kms_cursor_legacy@pipe-c-torture-move:
    - shard-hsw:          DMESG-WARN [fdo#107122] -> PASS

  * igt@kms_flip@flip-vs-expired-vblank:
    - shard-glk:          FAIL [fdo#105363] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-wc:
    - shard-apl:          FAIL [fdo#103167] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-move:
    - shard-glk:          FAIL [fdo#103167] -> PASS

  * igt@kms_plane@pixel-format-pipe-a-planes-source-clamping:
    - shard-apl:          FAIL [fdo#108948] -> PASS

  * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-max:
    - shard-glk:          FAIL [fdo#108145] -> PASS +1

  * igt@kms_plane_multiple@atomic-pipe-b-tiling-yf:
    - shard-apl:          FAIL [fdo#103166] -> PASS +1

  * igt@kms_plane_multiple@atomic-pipe-c-tiling-y:
    - shard-glk:          FAIL [fdo#103166] -> PASS

  * igt@prime_vgem@basic-fence-flip:
    - shard-kbl:          FAIL [fdo#104008] -> PASS

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#102670]: https://bugs.freedesktop.org/show_bug.cgi?id=102670
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104008]: https://bugs.freedesktop.org/show_bug.cgi?id=104008
  [fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
  [fdo#106641]: https://bugs.freedesktop.org/show_bug.cgi?id=106641
  [fdo#107122]: https://bugs.freedesktop.org/show_bug.cgi?id=107122
  [fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
  [fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278


Participating hosts (7 -> 5)
------------------------------

  Missing    (2): shard-skl shard-iclb 


Build changes
-------------

    * IGT: IGT_4782 -> IGTPW_2274
    * Piglit: piglit_4509 -> None

  CI_DRM_5464: af90b519a670a3aec89045d9fcca8f2d174adeda @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2274: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2274/
  IGT_4782: 96f3a1b876e0dd24706b85fb872f12031a436e84 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2274/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] i915/selftest: Allow filtering of individual subtests
  2019-01-22 18:35 ` [igt-dev] " Chris Wilson
                   ` (2 preceding siblings ...)
  (?)
@ 2019-01-24 14:28 ` Katarzyna Dec
  2019-01-24 15:01   ` Chris Wilson
  -1 siblings, 1 reply; 10+ messages in thread
From: Katarzyna Dec @ 2019-01-24 14:28 UTC (permalink / raw)
  To: Chris Wilson, igt-dev

On Tue, Jan 22, 2019 at 06:35:21PM +0000, Chris Wilson wrote:
> Take an environment variable, SELFTESTS=foo,bar, and pass that along to
> the kernel (as i915.st_filter=foo,bar) to provide fine grained test
> selection. This can be either as an exact match to select only that
> test, or to exclude only test. For example,
> 
> SELFTESTS=igt_vma_create,igt_vma_pin1 i915_selftest --run mock_vma
> SELFTESTS=!igt_vma_create i915_selftest --run mock_vma
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

If I understand correctly we can choose specific subtest or exclude specific
subtest from binary?

That is a really nice feature :) I didn't have chance to use it, but LGTM.

Kasia :)
> ---
>  tests/i915/selftest.c | 18 ++++++++++++------
>  1 file changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/i915/selftest.c b/tests/i915/selftest.c
> index 80e515c61..b8d7f0af1 100644
> --- a/tests/i915/selftest.c
> +++ b/tests/i915/selftest.c
> @@ -28,10 +28,16 @@ IGT_TEST_DESCRIPTION("Basic unit tests for i915.ko");
>  
>  igt_main
>  {
> -	igt_kselftests("i915",
> -		       "mock_selftests=-1 disable_display=1",
> -		       NULL, "mock");
> -	igt_kselftests("i915",
> -		       "live_selftests=-1 disable_display=1",
> -		       "live_selftests", "live");
> +	const char *env = getenv("SELFTESTS");
> +	char opts[1024];
> +
> +	igt_assert(snprintf(opts, sizeof(opts),
> +			    "mock_selftests=-1 disable_display=1 st_filter=%s",
> +			    env) < sizeof(opts));
> +	igt_kselftests("i915", opts, NULL, "mock");
> +
> +	igt_assert(snprintf(opts, sizeof(opts),
> +			    "live_selftests=-1 disable_display=1 st_filter=%s",
> +			    env) < sizeof(opts));
> +	igt_kselftests("i915", opts, "live_selftests", "live");
>  }
> -- 
> 2.20.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] i915/selftest: Allow filtering of individual subtests
  2019-01-24 14:28 ` [igt-dev] [PATCH i-g-t] " Katarzyna Dec
@ 2019-01-24 15:01   ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2019-01-24 15:01 UTC (permalink / raw)
  To: Katarzyna Dec, igt-dev

Quoting Katarzyna Dec (2019-01-24 14:28:27)
> On Tue, Jan 22, 2019 at 06:35:21PM +0000, Chris Wilson wrote:
> > Take an environment variable, SELFTESTS=foo,bar, and pass that along to
> > the kernel (as i915.st_filter=foo,bar) to provide fine grained test
> > selection. This can be either as an exact match to select only that
> > test, or to exclude only test. For example,
> > 
> > SELFTESTS=igt_vma_create,igt_vma_pin1 i915_selftest --run mock_vma
> > SELFTESTS=!igt_vma_create i915_selftest --run mock_vma
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> 
> If I understand correctly we can choose specific subtest or exclude specific
> subtest from binary?

Hopefully,
https://patchwork.freedesktop.org/patch/279600/
explains it a little more clearer / completely.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [PATCH i-g-t] i915/selftest: Allow filtering of individual subtests
  2019-01-22 18:35 ` [igt-dev] " Chris Wilson
@ 2019-01-25  9:44   ` Petri Latvala
  -1 siblings, 0 replies; 10+ messages in thread
From: Petri Latvala @ 2019-01-25  9:44 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev, intel-gfx

On Tue, Jan 22, 2019 at 06:35:21PM +0000, Chris Wilson wrote:
> Take an environment variable, SELFTESTS=foo,bar, and pass that along to
> the kernel (as i915.st_filter=foo,bar) to provide fine grained test
> selection. This can be either as an exact match to select only that
> test, or to exclude only test. For example,
> 
> SELFTESTS=igt_vma_create,igt_vma_pin1 i915_selftest --run mock_vma
> SELFTESTS=!igt_vma_create i915_selftest --run mock_vma
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  tests/i915/selftest.c | 18 ++++++++++++------
>  1 file changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/i915/selftest.c b/tests/i915/selftest.c
> index 80e515c61..b8d7f0af1 100644
> --- a/tests/i915/selftest.c
> +++ b/tests/i915/selftest.c
> @@ -28,10 +28,16 @@ IGT_TEST_DESCRIPTION("Basic unit tests for i915.ko");
>  
>  igt_main
>  {
> -	igt_kselftests("i915",
> -		       "mock_selftests=-1 disable_display=1",
> -		       NULL, "mock");
> -	igt_kselftests("i915",
> -		       "live_selftests=-1 disable_display=1",
> -		       "live_selftests", "live");
> +	const char *env = getenv("SELFTESTS");
> +	char opts[1024];
> +
> +	igt_assert(snprintf(opts, sizeof(opts),
> +			    "mock_selftests=-1 disable_display=1 st_filter=%s",
> +			    env) < sizeof(opts));


I don't particularly like passing NULL to %s, even though glibc makes
it print "(null)".


-- 
Petri Latvala
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] i915/selftest: Allow filtering of individual subtests
@ 2019-01-25  9:44   ` Petri Latvala
  0 siblings, 0 replies; 10+ messages in thread
From: Petri Latvala @ 2019-01-25  9:44 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev, intel-gfx

On Tue, Jan 22, 2019 at 06:35:21PM +0000, Chris Wilson wrote:
> Take an environment variable, SELFTESTS=foo,bar, and pass that along to
> the kernel (as i915.st_filter=foo,bar) to provide fine grained test
> selection. This can be either as an exact match to select only that
> test, or to exclude only test. For example,
> 
> SELFTESTS=igt_vma_create,igt_vma_pin1 i915_selftest --run mock_vma
> SELFTESTS=!igt_vma_create i915_selftest --run mock_vma
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  tests/i915/selftest.c | 18 ++++++++++++------
>  1 file changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/i915/selftest.c b/tests/i915/selftest.c
> index 80e515c61..b8d7f0af1 100644
> --- a/tests/i915/selftest.c
> +++ b/tests/i915/selftest.c
> @@ -28,10 +28,16 @@ IGT_TEST_DESCRIPTION("Basic unit tests for i915.ko");
>  
>  igt_main
>  {
> -	igt_kselftests("i915",
> -		       "mock_selftests=-1 disable_display=1",
> -		       NULL, "mock");
> -	igt_kselftests("i915",
> -		       "live_selftests=-1 disable_display=1",
> -		       "live_selftests", "live");
> +	const char *env = getenv("SELFTESTS");
> +	char opts[1024];
> +
> +	igt_assert(snprintf(opts, sizeof(opts),
> +			    "mock_selftests=-1 disable_display=1 st_filter=%s",
> +			    env) < sizeof(opts));


I don't particularly like passing NULL to %s, even though glibc makes
it print "(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] 10+ messages in thread

* Re: [PATCH i-g-t] i915/selftest: Allow filtering of individual subtests
  2019-01-25  9:44   ` [igt-dev] [Intel-gfx] " Petri Latvala
@ 2019-01-25 10:10     ` Chris Wilson
  -1 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2019-01-25 10:10 UTC (permalink / raw)
  To: Petri Latvala; +Cc: igt-dev, intel-gfx

Quoting Petri Latvala (2019-01-25 09:44:50)
> On Tue, Jan 22, 2019 at 06:35:21PM +0000, Chris Wilson wrote:
> > Take an environment variable, SELFTESTS=foo,bar, and pass that along to
> > the kernel (as i915.st_filter=foo,bar) to provide fine grained test
> > selection. This can be either as an exact match to select only that
> > test, or to exclude only test. For example,
> > 
> > SELFTESTS=igt_vma_create,igt_vma_pin1 i915_selftest --run mock_vma
> > SELFTESTS=!igt_vma_create i915_selftest --run mock_vma
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >  tests/i915/selftest.c | 18 ++++++++++++------
> >  1 file changed, 12 insertions(+), 6 deletions(-)
> > 
> > diff --git a/tests/i915/selftest.c b/tests/i915/selftest.c
> > index 80e515c61..b8d7f0af1 100644
> > --- a/tests/i915/selftest.c
> > +++ b/tests/i915/selftest.c
> > @@ -28,10 +28,16 @@ IGT_TEST_DESCRIPTION("Basic unit tests for i915.ko");
> >  
> >  igt_main
> >  {
> > -     igt_kselftests("i915",
> > -                    "mock_selftests=-1 disable_display=1",
> > -                    NULL, "mock");
> > -     igt_kselftests("i915",
> > -                    "live_selftests=-1 disable_display=1",
> > -                    "live_selftests", "live");
> > +     const char *env = getenv("SELFTESTS");
> > +     char opts[1024];
> > +
> > +     igt_assert(snprintf(opts, sizeof(opts),
> > +                         "mock_selftests=-1 disable_display=1 st_filter=%s",
> > +                         env) < sizeof(opts));
> 
> 
> I don't particularly like passing NULL to %s, even though glibc makes
> it print "(null)".

	env = getenv() ?: "";

Fwiw, Tvrtko had provided a patch to pass kmod options on the command
line, that might be a preferred approach.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] i915/selftest: Allow filtering of individual subtests
@ 2019-01-25 10:10     ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2019-01-25 10:10 UTC (permalink / raw)
  To: Petri Latvala; +Cc: igt-dev, intel-gfx

Quoting Petri Latvala (2019-01-25 09:44:50)
> On Tue, Jan 22, 2019 at 06:35:21PM +0000, Chris Wilson wrote:
> > Take an environment variable, SELFTESTS=foo,bar, and pass that along to
> > the kernel (as i915.st_filter=foo,bar) to provide fine grained test
> > selection. This can be either as an exact match to select only that
> > test, or to exclude only test. For example,
> > 
> > SELFTESTS=igt_vma_create,igt_vma_pin1 i915_selftest --run mock_vma
> > SELFTESTS=!igt_vma_create i915_selftest --run mock_vma
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >  tests/i915/selftest.c | 18 ++++++++++++------
> >  1 file changed, 12 insertions(+), 6 deletions(-)
> > 
> > diff --git a/tests/i915/selftest.c b/tests/i915/selftest.c
> > index 80e515c61..b8d7f0af1 100644
> > --- a/tests/i915/selftest.c
> > +++ b/tests/i915/selftest.c
> > @@ -28,10 +28,16 @@ IGT_TEST_DESCRIPTION("Basic unit tests for i915.ko");
> >  
> >  igt_main
> >  {
> > -     igt_kselftests("i915",
> > -                    "mock_selftests=-1 disable_display=1",
> > -                    NULL, "mock");
> > -     igt_kselftests("i915",
> > -                    "live_selftests=-1 disable_display=1",
> > -                    "live_selftests", "live");
> > +     const char *env = getenv("SELFTESTS");
> > +     char opts[1024];
> > +
> > +     igt_assert(snprintf(opts, sizeof(opts),
> > +                         "mock_selftests=-1 disable_display=1 st_filter=%s",
> > +                         env) < sizeof(opts));
> 
> 
> I don't particularly like passing NULL to %s, even though glibc makes
> it print "(null)".

	env = getenv() ?: "";

Fwiw, Tvrtko had provided a patch to pass kmod options on the command
line, that might be a preferred approach.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2019-01-25 10:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-22 18:35 [PATCH i-g-t] i915/selftest: Allow filtering of individual subtests Chris Wilson
2019-01-22 18:35 ` [igt-dev] " Chris Wilson
2019-01-22 19:29 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-01-22 21:09 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-01-24 14:28 ` [igt-dev] [PATCH i-g-t] " Katarzyna Dec
2019-01-24 15:01   ` Chris Wilson
2019-01-25  9:44 ` Petri Latvala
2019-01-25  9:44   ` [igt-dev] [Intel-gfx] " Petri Latvala
2019-01-25 10:10   ` Chris Wilson
2019-01-25 10:10     ` [igt-dev] [Intel-gfx] " 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.