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.
--- 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 ); +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);
Signature · 6 lines
2.17.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoting [email protected] (2019-11-22 00:43:53)
Quoted 16 lines
From: Don Hiatt <[email protected]>
Suspending to disk requires swap space, make sure it exists before attempting to suspend to disk.
Cc Sujaritha Sundaresan <[email protected]>Signed-off-by Don Hiatt <[email protected]>--- lib/igt_aux.c | 4 ++++ 1 file changed, 4 insertions(+)lib/igt_aux.c +0
-0
lib/igt_aux.c void igt_system_suspend_autoresume(enum igt_suspend_state state, · line 868
Quoted 5 lines
lib/igt_aux.c +2
-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 ); +if (state ==SUSPEND_STATE_DISK ) + igt_require_f(intel_get_total_swap_mb() > 0,
igt_skip_f(state == SUSPEND_STATE_DISK &&
!intel_get_total_swap_mb(),
Quoted 12 lines
lib/igt_aux.c +2
-0+ "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
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 24 lines
From: Chris Wilson <[email protected]>
Sent: Thursday, November 21, 2019 4:36 PM
To: Hiatt, Don <[email protected]>; [email protected]
Subject: Re: [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to diskQuoting [email protected] (2019-11-22 00:43:53)
lib/igt_aux.c void igt_system_suspend_autoresume(enum
Quoted 16 lines
From: Don Hiatt <[email protected]>
Suspending to disk requires swap space, make sure it exists before attempting to suspend to disk.
Cc Sujaritha Sundaresan <[email protected]>Signed-off-by Don Hiatt <[email protected]>--- lib/igt_aux.c | 4 ++++ 1 file changed, 4 insertions(+)lib/igt_aux.c +0
-0@@ -864,6 +864,10 @@ void igt_system_suspend_autoresume(enum
igt_suspend_statestate,
Quoted 14 lines
lib/igt_aux.c void igt_system_suspend_autoresume(enum igt_suspend_state state, · line 868
Quoted 5 lines
lib/igt_aux.c +2
-0igt_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,igt_skip_f(state ==
SUSPEND_STATE_DISK&&!intel_get_total_swap_mb(),Quoted 5 lines
lib/igt_aux.c +2
-0+ "Suspend to disk requires swap space.\n"); + orig_test =get_suspend_test (power_dir);set_suspend_test (power_dir, test);
Ahh! Thanks, Chris! I'll submit another one. Thank you!
Quoted 7 lines
Quoted 7 lines
--
2.17.1_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 40 lines
From: igt-dev <[email protected]> On Behalf Of Hiatt, Don
Sent: Thursday, November 21, 2019 4:41 PM
To: Chris Wilson <[email protected]>; [email protected]
Subject: Re: [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to diskQuoted 32 lines
From: Chris Wilson <[email protected]>
Sent: Thursday, November 21, 2019 4:36 PM
To: Hiatt, Don <[email protected]>; [email protected]
Subject: Re: [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to diskQuoting [email protected] (2019-11-22 00:43:53)
lib/igt_aux.c void igt_system_suspend_autoresume(enum
Quoted 16 lines
From: Don Hiatt <[email protected]>
Suspending to disk requires swap space, make sure it exists before attempting to suspend to disk.
Cc Sujaritha Sundaresan <[email protected]>Signed-off-by Don Hiatt <[email protected]>--- lib/igt_aux.c | 4 ++++ 1 file changed, 4 insertions(+)lib/igt_aux.c +0
-0@@ -864,6 +864,10 @@ void igt_system_suspend_autoresume(enum
igt_suspend_statestate,lib/igt_aux.c void igt_system_suspend_autoresume(enum igt_suspend_state state, · line 868
Quoted 5 lines
lib/igt_aux.c +2
-0igt_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,igt_skip_f(state ==
SUSPEND_STATE_DISK&&!intel_get_total_swap_mb(
),
Quoted 9 lines
Quoted 6 lines
lib/igt_aux.c void igt_system_suspend_autoresume(enum igt_suspend_state state, · line 873
Quoted 6 lines
lib/igt_aux.c +2
-0+ "Suspend to disk requires swap space.\n"); + orig_test =get_suspend_test (power_dir);set_suspend_test (power_dir, test);Ahh! Thanks, Chris! I'll submit another one. Thank you!
Hi Chris, sorry, I don't see any igt_skip_f(), sorry if I'm missing something.
Quoted 11 lines
Quoted 7 lines
Quoted 7 lines
--
2.17.1_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoting Hiatt, Don (2019-11-22 00:52:53)
Quoted 48 lines
Quoted 40 lines
From: igt-dev <[email protected]> On Behalf Of Hiatt, Don
Sent: Thursday, November 21, 2019 4:41 PM
To: Chris Wilson <[email protected]>; [email protected]
Subject: Re: [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to diskQuoted 32 lines
From: Chris Wilson <[email protected]>
Sent: Thursday, November 21, 2019 4:36 PM
To: Hiatt, Don <[email protected]>; [email protected]
Subject: Re: [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to diskQuoting [email protected] (2019-11-22 00:43:53)
lib/igt_aux.c void igt_system_suspend_autoresume(enum
Quoted 16 lines
From: Don Hiatt <[email protected]>
Suspending to disk requires swap space, make sure it exists before attempting to suspend to disk.
Cc Sujaritha Sundaresan <[email protected]>Signed-off-by Don Hiatt <[email protected]>--- lib/igt_aux.c | 4 ++++ 1 file changed, 4 insertions(+)lib/igt_aux.c +0
-0@@ -864,6 +864,10 @@ void igt_system_suspend_autoresume(enum
igt_suspend_statestate,lib/igt_aux.c void igt_system_suspend_autoresume(enum igt_suspend_state state, · line 868
Quoted 5 lines
lib/igt_aux.c +2
-0igt_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,igt_skip_f(state ==
SUSPEND_STATE_DISK&&!intel_get_total_swap_mb(),
Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
lib/igt_aux.c +2
-0+ "Suspend to disk requires swap space.\n"); + orig_test =get_suspend_test (power_dir);set_suspend_test (power_dir, test);
Quoted 4 lines
Quoted 2 lines
Ahh! Thanks, Chris! I'll submit another one. Thank you!
Hi Chris, sorry, I don't see any
igt_skip_f(), sorry if I'm missing something.
igt_skip_on_f()
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev