lib/aux: Ensure swap space prior to suspend to disk
PATCH 1/1 lib/aux: Ensure swap space prior to suspend to disk
From: Don Hiatt <[email protected]>
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 <[email protected]>
Cc Chris Wilson <[email protected]>
Signed-off-by Don Hiatt <[email protected]>
--- lib/igt_aux.c | 4 ++++ 1 file changed, 4 insertions(+)
lib/igt_aux.c +4 -0
@@ -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);
Signature · 6 lines
2.17.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev