public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* tests: hwclock questions
@ 2014-06-04 22:32 Ruediger Meier
  2014-06-05  7:48 ` Karel Zak
  0 siblings, 1 reply; 4+ messages in thread
From: Ruediger Meier @ 2014-06-04 22:32 UTC (permalink / raw)
  To: util-linux

Hi,

The test hwclock/systohc needs some fixes because of the following 
issues:
 - ntpdate return value checks ("$?" == "1") are wrong
 - actually ntpdate is deprecated and we should go with "ntpd -q"
 - variable OFFSET should be checked for being numeric to protect "bc"
   and to avoid follow-up errors
 - hwclock loop should break and ts_failed if any hwclock call fails
 - We need to skip case "Cannot access the Hardware Clock via any
   known method"
 - I think we have to protect the user from setting his clock to
   un-wanted time zone (local or UTC).

On travis build server this test succeds allthough neither ntpdate nor 
hwclock works :)


But before doing this I have two questions.

1. I wonder what is the original purpose of this test. Are we really 
testing hwclock or the kernel or hardware? I mean setting and reading 
cock 10 times ... could this really discover a bug in our hwclock code?

2. Why do we _set_ the time from ntp server at the beginning? Wouldnt it 
be enough to check whether the offset to ntp is the same before and 
after the test?

cu,
Rudi

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

end of thread, other threads:[~2014-06-06 13:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-04 22:32 tests: hwclock questions Ruediger Meier
2014-06-05  7:48 ` Karel Zak
2014-06-05 12:45   ` Ruediger Meier
2014-06-06 13:06     ` [PATCH] " Ruediger Meier

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