From: Petri Latvala <petri.latvala@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] i915/selftest: Allow filtering of individual subtests
Date: Fri, 25 Jan 2019 11:44:50 +0200 [thread overview]
Message-ID: <20190125094450.GF4038@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20190122183521.2910-1-chris@chris-wilson.co.uk>
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
next prev parent reply other threads:[~2019-01-25 9:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-22 18:35 [igt-dev] [PATCH i-g-t] i915/selftest: Allow filtering of individual subtests 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 [this message]
2019-01-25 10:10 ` [igt-dev] [Intel-gfx] " Chris Wilson
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=20190125094450.GF4038@platvala-desk.ger.corp.intel.com \
--to=petri.latvala@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/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