All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to disk
@ 2019-11-22  1:10 don.hiatt
  2019-11-22  1:54 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/aux: Ensure swap space prior to suspend to disk (rev3) Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: don.hiatt @ 2019-11-22  1:10 UTC (permalink / raw)
  To: igt-dev

From: Don Hiatt <don.hiatt@intel.com>

Suspending to disk requires swap space, make sure it exists
before attempting to suspend to disk.

v2: Use igt_skip() [Thanks, Chris!]
v3: Use igt_skip_on_f()

Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Don Hiatt <don.hiatt@intel.com>
---
 lib/igt_aux.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 578f857933f0..a6b114ed7e65 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -864,6 +864,10 @@ void igt_system_suspend_autoresume(enum igt_suspend_state state,
 	igt_require(test == SUSPEND_TEST_NONE ||
 		    faccessat(power_dir, "pm_test", R_OK | W_OK, 0) == 0);
 
+	igt_skip_on_f(state == SUSPEND_STATE_DISK &&
+		      !intel_get_total_swap_mb(),
+		      "Suspend to disk requires swap space.\n");
+
 	orig_test = get_suspend_test(power_dir);
 	set_suspend_test(power_dir, test);
 
-- 
2.17.1

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

^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to disk
@ 2019-11-22  1:08 don.hiatt
  0 siblings, 0 replies; 13+ messages in thread
From: don.hiatt @ 2019-11-22  1:08 UTC (permalink / raw)
  To: igt-dev

From: Don Hiatt <don.hiatt@intel.com>

Suspending to disk requires swap space, make sure it exists
before attempting to suspend to disk.

v2: Use igt_skip() [Thanks, Chris!]

Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Don Hiatt <don.hiatt@intel.com>
---
 lib/igt_aux.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 578f857933f0..f2a5bd71a110 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -864,6 +864,10 @@ void igt_system_suspend_autoresume(enum igt_suspend_state state,
 	igt_require(test == SUSPEND_TEST_NONE ||
 		    faccessat(power_dir, "pm_test", R_OK | W_OK, 0) == 0);
 
+	igt_skip(state == SUSPEND_STATE_DISK &&
+		 !intel_get_total_swap_mb(),
+		 "Suspend to disk requires swap space.\n");
+
 	orig_test = get_suspend_test(power_dir);
 	set_suspend_test(power_dir, test);
 
-- 
2.17.1

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

^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to disk
@ 2019-11-22  0:43 don.hiatt
  2019-11-22  0:36 ` Chris Wilson
  0 siblings, 1 reply; 13+ messages in thread
From: don.hiatt @ 2019-11-22  0:43 UTC (permalink / raw)
  To: igt-dev

From: Don Hiatt <don.hiatt@intel.com>

Suspending to disk requires swap space, make sure it exists
before attempting to suspend to disk.

Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
Signed-off-by: Don Hiatt <don.hiatt@intel.com>
---
 lib/igt_aux.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 578f857933f0..31c01624a651 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -864,6 +864,10 @@ void igt_system_suspend_autoresume(enum igt_suspend_state state,
 	igt_require(test == SUSPEND_TEST_NONE ||
 		    faccessat(power_dir, "pm_test", R_OK | W_OK, 0) == 0);
 
+	if (state == SUSPEND_STATE_DISK)
+		igt_require_f(intel_get_total_swap_mb() > 0,
+			      "Suspend to disk requires swap space.\n");
+
 	orig_test = get_suspend_test(power_dir);
 	set_suspend_test(power_dir, test);
 
-- 
2.17.1

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

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

end of thread, other threads:[~2019-11-28 13:30 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22  1:10 [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to disk don.hiatt
2019-11-22  1:54 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/aux: Ensure swap space prior to suspend to disk (rev3) Patchwork
2019-11-23  8:55 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-11-26  0:49 ` [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to disk Sujaritha
2019-11-26  9:52   ` Petri Latvala
2019-11-26 17:05     ` Hiatt, Don
2019-11-28 13:30   ` Petri Latvala
  -- strict thread matches above, loose matches on Subject: below --
2019-11-22  1:08 don.hiatt
2019-11-22  0:43 don.hiatt
2019-11-22  0:36 ` Chris Wilson
2019-11-22  0:40   ` Hiatt, Don
2019-11-22  0:52     ` Hiatt, Don
2019-11-22  0:55       ` 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.