All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petri Latvala <petri.latvala@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH igt] igt/core_suspend: Exercise igt_system_suspend_autoresume()
Date: Mon, 16 Oct 2017 13:14:01 +0300	[thread overview]
Message-ID: <20171016101401.nlka5luplh5jvdty@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20171015140128.4502-1-chris@chris-wilson.co.uk>

On Sun, Oct 15, 2017 at 03:01:28PM +0100, Chris Wilson wrote:
> We have various basic suspend and debug modes, so iterate over them to
> check they each work without test interference. This help work out the
> cause of any suspend bugs.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  tests/Makefile.sources |  1 +
>  tests/core_suspend.c   | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 61 insertions(+)
>  create mode 100644 tests/core_suspend.c
> 
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index 9c461353..c2f51a59 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -26,6 +26,7 @@ TESTS_progs = \
>  	core_getversion \
>  	core_prop_blob \
>  	core_setmaster_vs_auth \
> +	core_suspend \
>  	debugfs_test \
>  	drm_import_export \
>  	drm_mm \
> diff --git a/tests/core_suspend.c b/tests/core_suspend.c
> new file mode 100644
> index 00000000..eee2e1ab
> --- /dev/null
> +++ b/tests/core_suspend.c
> @@ -0,0 +1,60 @@
> +/*
> + * Copyright © 2017 Intel Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> + * IN THE SOFTWARE.
> + *
> + */
> +
> +#include "igt.h"
> +
> +igt_main
> +{
> +	const struct mode {
> +		const char *name;
> +		unsigned int mode;
> +	} suspend[] = {
> +		{ "freze", SUSPEND_STATE_FREEZE },

"freeze"

> +		{ "standy", SUSPEND_STATE_STANDBY },

"standby"



-- 
Petri Latvala


> +		{ "mem", SUSPEND_STATE_MEM },
> +		{ "disk", SUSPEND_STATE_DISK },
> +		{}
> +	}, debug[] = {
> +		{ "freezer", SUSPEND_TEST_FREEZER },
> +		{ "devices", SUSPEND_TEST_DEVICES },
> +		{ "platform", SUSPEND_TEST_PLATFORM },
> +		{ "processors", SUSPEND_TEST_PROCESSORS },
> +		{ "core", SUSPEND_TEST_CORE },
> +		{ "full", SUSPEND_TEST_NONE },
> +		{}
> +	};
> +
> +	igt_skip_on_simulation();
> +
> +	/* unload all drivers? */
> +
> +	for (const struct mode *s = suspend; s->name; s++) {
> +		for (const struct mode *d = debug; d->name; d++) {
> +			igt_subtest_f("suspend-%s-%s", s->name, d->name)
> +				igt_system_suspend_autoresume(s->mode, d->mode);
> +		}
> +	}
> +
> +	/* again with drivers loaded? */
> +}
> -- 
> 2.15.0.rc0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-10-16 10:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-15 14:01 [PATCH igt] igt/core_suspend: Exercise igt_system_suspend_autoresume() Chris Wilson
2017-10-15 14:22 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-10-16  7:47 ` [PATCH igt] " Michał Winiarski
2017-10-16  7:58   ` Chris Wilson
2017-10-16  8:30 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-10-16 10:14 ` Petri Latvala [this message]
2017-10-16 10:30 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-10-16 10:34   ` Chris Wilson
2017-10-16 10:43     ` Imre Deak
2017-10-16 11:02       ` Chris Wilson
2017-10-16 13:18         ` Imre Deak
2017-12-08 19:39 [PATCH igt] " 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=20171016101401.nlka5luplh5jvdty@platvala-desk.ger.corp.intel.com \
    --to=petri.latvala@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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 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.