public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Ruediger Meier <sweet_f_a@gmx.de>
To: util-linux@vger.kernel.org
Subject: tests: hwclock questions
Date: Thu, 5 Jun 2014 00:32:24 +0200	[thread overview]
Message-ID: <201406050032.24233.sweet_f_a@gmx.de> (raw)

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

             reply	other threads:[~2014-06-04 22:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04 22:32 Ruediger Meier [this message]
2014-06-05  7:48 ` tests: hwclock questions Karel Zak
2014-06-05 12:45   ` Ruediger Meier
2014-06-06 13:06     ` [PATCH] " Ruediger Meier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201406050032.24233.sweet_f_a@gmx.de \
    --to=sweet_f_a@gmx.de \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox