public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* LTP and commit e1d7ba8735551ed7 ("time: Always make sure wall_to_monotonic isn't positive")
@ 2015-09-14 13:46 Mark Rutland
  2015-09-15  8:37 ` Cyril Hrubis
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Rutland @ 2015-09-14 13:46 UTC (permalink / raw)
  To: John Stultz, Cyril Hrubis, Wang YanQing; +Cc: ltp, will.deacon, linux-kernel

Hi,

While testing v4.3-rc1 with the LTP, we spotted failures in a couple of
timekeeping tests, which seem to be a result of commit e1d7ba8735551ed7
("time: Always make sure wall_to_monotonic isn't positive").

In both cases this is because the new time would be before the boot
time, so I guess these are covered by the caveat at the end of the
commit message.

settimeofday01 [1] tries tries to settimeofday() with a timeval 100s and
100ns, while clock_gettime02 [2] tries to clock_settime to 1s and
100ns. Neither expect -EINVAL, and report failure with the new
behaviour.

While I don't know that any "real" software is affected, I thought I
should let you know.

Thanks,
Mark.

[1] https://github.com/linux-test-project/ltp/blob/20150903/testcases/kernel/syscalls/settimeofday/settimeofday01.c
[2] https://github.com/linux-test-project/ltp/blob/20150903/testcases/kernel/timers/clock_settime/clock_settime02.c

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

* Re: LTP and commit e1d7ba8735551ed7 ("time: Always make sure wall_to_monotonic isn't positive")
  2015-09-14 13:46 LTP and commit e1d7ba8735551ed7 ("time: Always make sure wall_to_monotonic isn't positive") Mark Rutland
@ 2015-09-15  8:37 ` Cyril Hrubis
  2015-09-24 14:51   ` [LTP] " Cyril Hrubis
  0 siblings, 1 reply; 3+ messages in thread
From: Cyril Hrubis @ 2015-09-15  8:37 UTC (permalink / raw)
  To: Mark Rutland; +Cc: John Stultz, Wang YanQing, ltp, will.deacon, linux-kernel

Hi!
> While testing v4.3-rc1 with the LTP, we spotted failures in a couple of
> timekeeping tests, which seem to be a result of commit e1d7ba8735551ed7
> ("time: Always make sure wall_to_monotonic isn't positive").
> 
> In both cases this is because the new time would be before the boot
> time, so I guess these are covered by the caveat at the end of the
> commit message.
> 
> settimeofday01 [1] tries tries to settimeofday() with a timeval 100s and
> 100ns, while clock_gettime02 [2] tries to clock_settime to 1s and
> 100ns. Neither expect -EINVAL, and report failure with the new
> behaviour.
> 
> While I don't know that any "real" software is affected, I thought I
> should let you know.

Thanks for the report, we allready have patch for the first testcase on
the mailing list that initializes the the timeval value to current time
+ small amount. I will have a look at the second test as well.

> [1] https://github.com/linux-test-project/ltp/blob/20150903/testcases/kernel/syscalls/settimeofday/settimeofday01.c
> [2] https://github.com/linux-test-project/ltp/blob/20150903/testcases/kernel/timers/clock_settime/clock_settime02.c

-- 
Cyril Hrubis
chrubis@suse.cz

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

* Re: [LTP] LTP and commit e1d7ba8735551ed7 ("time: Always make sure wall_to_monotonic isn't positive")
  2015-09-15  8:37 ` Cyril Hrubis
@ 2015-09-24 14:51   ` Cyril Hrubis
  0 siblings, 0 replies; 3+ messages in thread
From: Cyril Hrubis @ 2015-09-24 14:51 UTC (permalink / raw)
  To: Mark Rutland; +Cc: will.deacon, John Stultz, Wang YanQing, ltp, linux-kernel

Hi!
> Thanks for the report, we allready have patch for the first testcase on
> the mailing list that initializes the the timeval value to current time
> + small amount. I will have a look at the second test as well.
> 
> > [1] https://github.com/linux-test-project/ltp/blob/20150903/testcases/kernel/syscalls/settimeofday/settimeofday01.c
> > [2] https://github.com/linux-test-project/ltp/blob/20150903/testcases/kernel/timers/clock_settime/clock_settime02.c

Both should be fixed in latest git.

-- 
Cyril Hrubis
chrubis@suse.cz

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

end of thread, other threads:[~2015-09-24 14:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-14 13:46 LTP and commit e1d7ba8735551ed7 ("time: Always make sure wall_to_monotonic isn't positive") Mark Rutland
2015-09-15  8:37 ` Cyril Hrubis
2015-09-24 14:51   ` [LTP] " Cyril Hrubis

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