A few small fixups to the alarmtimer-suspend test
Subsystems (3)
cover A few small fixups to the alarmtimer-suspend test
Hey Shuah,
Wanted to send along a few small fixups to the alarmtimer-suspend
test that I had pending.
Let me know if you have any objections or feedback.
thanks
-john
John Stultz (3):
kselftests: timers: Increase delay between suspends in
alarmtimer-suspend
kselftests: timers: Ease alarmtimer-suspend unreasonable latency value
kselftests: timers: Check _ALARM clockids are supported before
suspending
tools/testing/selftests/timers/alarmtimer-suspend.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/3 kselftests: timers: Increase delay between suspends in alarmtimer-suspend
When testing on some hardware, waiting only a second before re-triggering suspend can keep TCP connections from re-establishing which after a number of cycles can cause TCP connections to close while the test is running.
So extend the delay between suspend calls to 3 seconds to let the connections stay alive.
--- tools/testing/selftests/timers/alarmtimer-suspend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/timers/alarmtimer-suspend.c +1 -1
@@ -172,7 +172,7 @@ int main(void)while (alarmcount <10 ) {int ret; -sleep (1 ); +sleep (3 ); ret =system ("echo mem > /sys/power/state" );if (ret)break ;
Signature · 1 line
1.9.1
PATCH 2/3 kselftests: timers: Ease alarmtimer-suspend unreasonable latency value
In reply to John StultzOn the hardware I have, resume latency from an alarm is often 2-3 seconds (with a fair amount of variability due to the RTC's single second granularity). Having four seconds be the pass/fail bar is maybe a little too tight, so extend this to 5 seconds.
--- tools/testing/selftests/timers/alarmtimer-suspend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/timers/alarmtimer-suspend.c +1 -1
@@ -57,7 +57,7 @@ static inline int ksft_exit_fail(void)#define NSEC_PER_SEC 1000000000ULL -#define UNREASONABLE_LAT (NSEC_PER_SEC * 4)/* hopefully we resume in 4secs */ +#define UNREASONABLE_LAT (NSEC_PER_SEC * 5)/* hopefully we resume in 5 secs */ #define SUSPEND_SECS 15int alarmcount;
Signature · 1 line
1.9.1
PATCH 3/3 kselftests: timers: Check _ALARM clockids are supported before suspending
In reply to John StultzIt was reported that the alarmtimer-suspend test hangs on older systems that don't support _ALARM clockids.
This is due to the fact that we don't check if the timer_create fails, and thus when we suspend, the system will not programatically resume.
Fix this by checking the timer_create call for errors.
--- tools/testing/selftests/timers/alarmtimer-suspend.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
tools/testing/selftests/timers/alarmtimer-suspend.c +5 -1
@@ -152,7 +152,11 @@ int main(void) alarm_clock_id++) { alarmcount =0 ; -timer_create (alarm_clock_id, &se, &tm1); +if (timer_create (alarm_clock_id, &se, &tm1) ==-1 ) { +printf ("timer_create failled, %s unspported?\n" , +clockstring (alarm_clock_id)); +break ; + }clock_gettime (alarm_clock_id, &start_time); printf("Start time (%s): %ld:%ld\n", clockstring(alarm_clock_id),
Signature · 1 line
1.9.1
Quoted 6 lines · John Stultz
Hey Shuah,
Wanted to send along a few small fixups to the alarmtimer-suspend
test that I had pending.Let me know if you have any objections or feedback.
Hi John,
No issues with these. We are tweaking sleep and suspend times. The nature of the beast I am guessing. I gave it test run and looks good. I would like to get these into rc5. Patches 1 and 3 look like critical fixes to me. I will wait a couple of days for any reviews comments before I apply them to linux-kselftest fixes.
thanks,
-- Shuah
Signature · 5 lines
Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) [email protected] | (970) 217-8978
Quoted 8 lines · Shuah Khan
Quoted 6 lines · John Stultz
Hey Shuah,
Wanted to send along a few small fixups to the alarmtimer-suspend
test that I had pending.Let me know if you have any objections or feedback.
Quoted 8 lines
Hi John,
No issues with these. We are tweaking sleep and suspend times. The nature of the beast I am guessing. I gave it test run and looks good. I would like to get these into rc5. Patches 1 and 3 look like critical fixes to me. I will wait a couple of days for any reviews comments before I apply them to linux-kselftest fixes.
I'd not claim any of them are actually urgent. So if you'd rather queue these for 4.2 I'm fine with it.
thanks
-john
Quoted 18 lines · John Stultz
Quoted 8 lines · Shuah Khan
Quoted 6 lines · John Stultz
Hey Shuah,
Wanted to send along a few small fixups to the alarmtimer-suspend
test that I had pending.Let me know if you have any objections or feedback.
Quoted 8 lines
Hi John,
No issues with these. We are tweaking sleep and suspend times. The nature of the beast I am guessing. I gave it test run and looks good. I would like to get these into rc5. Patches 1 and 3 look like critical fixes to me. I will wait a couple of days for any reviews comments before I apply them to linux-kselftest fixes.
Quoted 3 lines
I'd not claim any of them are actually urgent. So if you'd rather queue these for 4.2 I'm fine with it.
ok I will get them into 4.2 then.
thanks,
-- Shuah
Signature · 5 lines
Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) [email protected] | (970) 217-8978
Quoted 18 lines · John Stultz
Quoted 8 lines · Shuah Khan
Quoted 6 lines · John Stultz
Hey Shuah,
Wanted to send along a few small fixups to the alarmtimer-suspend
test that I had pending.Let me know if you have any objections or feedback.
Quoted 8 lines
Hi John,
No issues with these. We are tweaking sleep and suspend times. The nature of the beast I am guessing. I gave it test run and looks good. I would like to get these into rc5. Patches 1 and 3 look like critical fixes to me. I will wait a couple of days for any reviews comments before I apply them to linux-kselftest fixes.
Quoted 3 lines
I'd not claim any of them are actually urgent. So if you'd rather queue these for 4.2 I'm fine with it.
Applied to linux-kselftest next for 4.2
thanks,
-- Shuah
Signature · 5 lines
Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) [email protected] | (970) 217-8978