public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] A few small fixups to the alarmtimer-suspend test
@ 2015-05-13 22:13 John Stultz
  2015-05-13 22:13 ` [PATCH 1/3] kselftests: timers: Increase delay between suspends in alarmtimer-suspend John Stultz
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: John Stultz @ 2015-05-13 22:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: John Stultz, Shuah Khan, Prarit Bhargava, Thomas Gleixner,
	Richard Cochran

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

Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Richard Cochran <richardcochran@gmail.com>

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(-)

-- 
1.9.1


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

* [PATCH 1/3] kselftests: timers: Increase delay between suspends in alarmtimer-suspend
  2015-05-13 22:13 [PATCH 0/3] A few small fixups to the alarmtimer-suspend test John Stultz
@ 2015-05-13 22:13 ` John Stultz
  2015-05-13 22:13 ` [PATCH 2/3] kselftests: timers: Ease alarmtimer-suspend unreasonable latency value John Stultz
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: John Stultz @ 2015-05-13 22:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: John Stultz, Shuah Khan, Prarit Bhargava, Thomas Gleixner,
	Richard Cochran

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.

Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 tools/testing/selftests/timers/alarmtimer-suspend.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/timers/alarmtimer-suspend.c b/tools/testing/selftests/timers/alarmtimer-suspend.c
index aaffbde..99a1ad3 100644
--- a/tools/testing/selftests/timers/alarmtimer-suspend.c
+++ b/tools/testing/selftests/timers/alarmtimer-suspend.c
@@ -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;
-- 
1.9.1


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

* [PATCH 2/3] kselftests: timers: Ease alarmtimer-suspend unreasonable latency value
  2015-05-13 22:13 [PATCH 0/3] A few small fixups to the alarmtimer-suspend test John Stultz
  2015-05-13 22:13 ` [PATCH 1/3] kselftests: timers: Increase delay between suspends in alarmtimer-suspend John Stultz
@ 2015-05-13 22:13 ` John Stultz
  2015-05-13 22:13 ` [PATCH 3/3] kselftests: timers: Check _ALARM clockids are supported before suspending John Stultz
  2015-05-13 23:04 ` [PATCH 0/3] A few small fixups to the alarmtimer-suspend test Shuah Khan
  3 siblings, 0 replies; 8+ messages in thread
From: John Stultz @ 2015-05-13 22:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: John Stultz, Shuah Khan, Prarit Bhargava, Thomas Gleixner,
	Richard Cochran

On 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.

Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 tools/testing/selftests/timers/alarmtimer-suspend.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/timers/alarmtimer-suspend.c b/tools/testing/selftests/timers/alarmtimer-suspend.c
index 99a1ad3..13586b6 100644
--- a/tools/testing/selftests/timers/alarmtimer-suspend.c
+++ b/tools/testing/selftests/timers/alarmtimer-suspend.c
@@ -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 15
 int alarmcount;
-- 
1.9.1


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

* [PATCH 3/3] kselftests: timers: Check _ALARM clockids are supported before suspending
  2015-05-13 22:13 [PATCH 0/3] A few small fixups to the alarmtimer-suspend test John Stultz
  2015-05-13 22:13 ` [PATCH 1/3] kselftests: timers: Increase delay between suspends in alarmtimer-suspend John Stultz
  2015-05-13 22:13 ` [PATCH 2/3] kselftests: timers: Ease alarmtimer-suspend unreasonable latency value John Stultz
@ 2015-05-13 22:13 ` John Stultz
  2015-05-13 23:04 ` [PATCH 0/3] A few small fixups to the alarmtimer-suspend test Shuah Khan
  3 siblings, 0 replies; 8+ messages in thread
From: John Stultz @ 2015-05-13 22:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: John Stultz, Shuah Khan, Prarit Bhargava, Thomas Gleixner,
	Richard Cochran

It 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.

Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 tools/testing/selftests/timers/alarmtimer-suspend.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/timers/alarmtimer-suspend.c b/tools/testing/selftests/timers/alarmtimer-suspend.c
index 13586b6..72cacf5 100644
--- a/tools/testing/selftests/timers/alarmtimer-suspend.c
+++ b/tools/testing/selftests/timers/alarmtimer-suspend.c
@@ -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),
-- 
1.9.1


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

* Re: [PATCH 0/3] A few small fixups to the alarmtimer-suspend test
  2015-05-13 22:13 [PATCH 0/3] A few small fixups to the alarmtimer-suspend test John Stultz
                   ` (2 preceding siblings ...)
  2015-05-13 22:13 ` [PATCH 3/3] kselftests: timers: Check _ALARM clockids are supported before suspending John Stultz
@ 2015-05-13 23:04 ` Shuah Khan
  2015-05-13 23:16   ` John Stultz
  3 siblings, 1 reply; 8+ messages in thread
From: Shuah Khan @ 2015-05-13 23:04 UTC (permalink / raw)
  To: John Stultz, linux-kernel
  Cc: Prarit Bhargava, Thomas Gleixner, Richard Cochran, Shuah Khan

On 05/13/2015 04:13 PM, John Stultz wrote:
> 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


-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978

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

* Re: [PATCH 0/3] A few small fixups to the alarmtimer-suspend test
  2015-05-13 23:04 ` [PATCH 0/3] A few small fixups to the alarmtimer-suspend test Shuah Khan
@ 2015-05-13 23:16   ` John Stultz
  2015-05-13 23:18     ` Shuah Khan
  2015-05-14  0:39     ` Shuah Khan
  0 siblings, 2 replies; 8+ messages in thread
From: John Stultz @ 2015-05-13 23:16 UTC (permalink / raw)
  To: Shuah Khan; +Cc: lkml, Prarit Bhargava, Thomas Gleixner, Richard Cochran

On Wed, May 13, 2015 at 4:04 PM, Shuah Khan <shuahkh@osg.samsung.com> wrote:
> On 05/13/2015 04:13 PM, John Stultz wrote:
>> 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.

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

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

* Re: [PATCH 0/3] A few small fixups to the alarmtimer-suspend test
  2015-05-13 23:16   ` John Stultz
@ 2015-05-13 23:18     ` Shuah Khan
  2015-05-14  0:39     ` Shuah Khan
  1 sibling, 0 replies; 8+ messages in thread
From: Shuah Khan @ 2015-05-13 23:18 UTC (permalink / raw)
  To: John Stultz; +Cc: lkml, Prarit Bhargava, Thomas Gleixner, Richard Cochran

On 05/13/2015 05:16 PM, John Stultz wrote:
> On Wed, May 13, 2015 at 4:04 PM, Shuah Khan <shuahkh@osg.samsung.com> wrote:
>> On 05/13/2015 04:13 PM, John Stultz wrote:
>>> 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.
> 
> 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


-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978

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

* Re: [PATCH 0/3] A few small fixups to the alarmtimer-suspend test
  2015-05-13 23:16   ` John Stultz
  2015-05-13 23:18     ` Shuah Khan
@ 2015-05-14  0:39     ` Shuah Khan
  1 sibling, 0 replies; 8+ messages in thread
From: Shuah Khan @ 2015-05-14  0:39 UTC (permalink / raw)
  To: John Stultz
  Cc: lkml, Prarit Bhargava, Thomas Gleixner, Richard Cochran,
	Shuah Khan

On 05/13/2015 05:16 PM, John Stultz wrote:
> On Wed, May 13, 2015 at 4:04 PM, Shuah Khan <shuahkh@osg.samsung.com> wrote:
>> On 05/13/2015 04:13 PM, John Stultz wrote:
>>> 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.
> 
> 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


-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978

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

end of thread, other threads:[~2015-05-14  0:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-13 22:13 [PATCH 0/3] A few small fixups to the alarmtimer-suspend test John Stultz
2015-05-13 22:13 ` [PATCH 1/3] kselftests: timers: Increase delay between suspends in alarmtimer-suspend John Stultz
2015-05-13 22:13 ` [PATCH 2/3] kselftests: timers: Ease alarmtimer-suspend unreasonable latency value John Stultz
2015-05-13 22:13 ` [PATCH 3/3] kselftests: timers: Check _ALARM clockids are supported before suspending John Stultz
2015-05-13 23:04 ` [PATCH 0/3] A few small fixups to the alarmtimer-suspend test Shuah Khan
2015-05-13 23:16   ` John Stultz
2015-05-13 23:18     ` Shuah Khan
2015-05-14  0:39     ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox