Re: [Intel-gfx] [PATCH i-g-t 1/2] igt/pm_rpm: Test incomplete(debug) suspends vs rpm

2018-08-14 Thread Chris Wilson
Quoting Imre Deak (2018-08-14 14:52:16)
> On Fri, Aug 10, 2018 at 08:01:15AM +0100, Chris Wilson wrote:
> > Check that we restore runtime pm around debug suspends and hibernates.
> > 
> > v2: Differentiate between external test setup failure and one of
> > interest
> > 
> > Signed-off-by: Chris Wilson 
> > ---
> >  tests/pm_rpm.c | 18 ++
> >  1 file changed, 14 insertions(+), 4 deletions(-)
> > 
> > diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
> > index 4268bb19a..1fbdda4ed 100644
> > --- a/tests/pm_rpm.c
> > +++ b/tests/pm_rpm.c
> > @@ -707,8 +707,10 @@ static void setup_environment(void)
> >  
> >   igt_info("Runtime PM support: %d\n", has_runtime_pm);
> >   igt_info("PC8 residency support: %d\n", has_pc8);
> > -
> >   igt_require(has_runtime_pm);
> > +
> > + disable_all_screens(_data);
> > + igt_require(wait_for_suspended());
> 
> For some subtests (e.g. basic-rte) this check is the only (real)
> purpose. So shouldn't this be added to specific subtests instead (e.g.
> the system suspend ones) to avoid converting fail to skip?

The flip flop from PASS/SKIP is still significant, so I don't worry too
much. With a little tweak, it shall be done.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t 1/2] igt/pm_rpm: Test incomplete(debug) suspends vs rpm

2018-08-14 Thread Imre Deak
On Fri, Aug 10, 2018 at 08:01:15AM +0100, Chris Wilson wrote:
> Check that we restore runtime pm around debug suspends and hibernates.
> 
> v2: Differentiate between external test setup failure and one of
> interest
> 
> Signed-off-by: Chris Wilson 
> ---
>  tests/pm_rpm.c | 18 ++
>  1 file changed, 14 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
> index 4268bb19a..1fbdda4ed 100644
> --- a/tests/pm_rpm.c
> +++ b/tests/pm_rpm.c
> @@ -707,8 +707,10 @@ static void setup_environment(void)
>  
>   igt_info("Runtime PM support: %d\n", has_runtime_pm);
>   igt_info("PC8 residency support: %d\n", has_pc8);
> -
>   igt_require(has_runtime_pm);
> +
> + disable_all_screens(_data);
> + igt_require(wait_for_suspended());

For some subtests (e.g. basic-rte) this check is the only (real)
purpose. So shouldn't this be added to specific subtests instead (e.g.
the system suspend ones) to avoid converting fail to skip?

Otherwise looks ok.

>  }
>  
>  static void restore_environment(void)
> @@ -1372,10 +1374,11 @@ static void __attribute__((noreturn)) 
> stay_subtest(void)
>   sleep(600);
>  }
>  
> -static void system_suspend_subtest(void)
> +static void system_suspend_subtest(int state, int debug)
>  {
>   disable_all_screens_and_wait(_data);
> - igt_system_suspend_autoresume(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
> +
> + igt_system_suspend_autoresume(state, debug);
>   igt_assert(wait_for_suspended());
>  }
>  
> @@ -1992,12 +1995,19 @@ int main(int argc, char *argv[])
>   WAIT_STATUS | WAIT_EXTRA);
>  
>   /* System suspend */
> + igt_subtest("system-suspend-devices")
> + system_suspend_subtest(SUSPEND_STATE_MEM, SUSPEND_TEST_DEVICES);
>   igt_subtest("system-suspend")
> - system_suspend_subtest();
> + system_suspend_subtest(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
>   igt_subtest("system-suspend-execbuf")
>   system_suspend_execbuf_subtest();
>   igt_subtest("system-suspend-modeset")
>   system_suspend_modeset_subtest();
> + igt_subtest("system-hibernate-devices")
> + system_suspend_subtest(SUSPEND_STATE_DISK,
> +SUSPEND_TEST_DEVICES);
> + igt_subtest("system-hibernate")
> + system_suspend_subtest(SUSPEND_STATE_DISK, SUSPEND_TEST_NONE);
>  
>   /* GEM stress */
>   igt_subtest("gem-execbuf-stress")
> -- 
> 2.18.0
> 
> ___
> 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


[Intel-gfx] [PATCH i-g-t 1/2] igt/pm_rpm: Test incomplete(debug) suspends vs rpm

2018-08-10 Thread Chris Wilson
Check that we restore runtime pm around debug suspends and hibernates.

v2: Differentiate between external test setup failure and one of
interest

Signed-off-by: Chris Wilson 
---
 tests/pm_rpm.c | 18 ++
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index 4268bb19a..1fbdda4ed 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -707,8 +707,10 @@ static void setup_environment(void)
 
igt_info("Runtime PM support: %d\n", has_runtime_pm);
igt_info("PC8 residency support: %d\n", has_pc8);
-
igt_require(has_runtime_pm);
+
+   disable_all_screens(_data);
+   igt_require(wait_for_suspended());
 }
 
 static void restore_environment(void)
@@ -1372,10 +1374,11 @@ static void __attribute__((noreturn)) stay_subtest(void)
sleep(600);
 }
 
-static void system_suspend_subtest(void)
+static void system_suspend_subtest(int state, int debug)
 {
disable_all_screens_and_wait(_data);
-   igt_system_suspend_autoresume(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
+
+   igt_system_suspend_autoresume(state, debug);
igt_assert(wait_for_suspended());
 }
 
@@ -1992,12 +1995,19 @@ int main(int argc, char *argv[])
WAIT_STATUS | WAIT_EXTRA);
 
/* System suspend */
+   igt_subtest("system-suspend-devices")
+   system_suspend_subtest(SUSPEND_STATE_MEM, SUSPEND_TEST_DEVICES);
igt_subtest("system-suspend")
-   system_suspend_subtest();
+   system_suspend_subtest(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
igt_subtest("system-suspend-execbuf")
system_suspend_execbuf_subtest();
igt_subtest("system-suspend-modeset")
system_suspend_modeset_subtest();
+   igt_subtest("system-hibernate-devices")
+   system_suspend_subtest(SUSPEND_STATE_DISK,
+  SUSPEND_TEST_DEVICES);
+   igt_subtest("system-hibernate")
+   system_suspend_subtest(SUSPEND_STATE_DISK, SUSPEND_TEST_NONE);
 
/* GEM stress */
igt_subtest("gem-execbuf-stress")
-- 
2.18.0

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