From: Ruediger Meier <sweet_f_a@gmx.de>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: Re: tests: hwclock questions
Date: Thu, 5 Jun 2014 14:45:31 +0200 [thread overview]
Message-ID: <201406051445.31366.sweet_f_a@gmx.de> (raw)
In-Reply-To: <20140605074805.GV9000@x2.net.home>
On Thursday 05 June 2014, Karel Zak wrote:
> On Thu, Jun 05, 2014 at 12:32:24AM +0200, Ruediger Meier wrote:
> > But before doing this I have two questions.
>
> Maybe we can remove the test at all (or use --force to enable the
> test). It was always very problematic test
I will try to make it a bit more robust and then see if we still should
make it optional. IMO these time sync problems are some kind of
science. Could be too much for being solved within one simple shell
script.
> and I have doubts it's
> still necessary as relevant hwclock code is completely different and
> more robust now.
Ok, then I would do --systohc and --hctosys just one time instead of 10.
BTW how could I get the offset between sys and hw clock? What does the
last "xxx seconds" in --show output mean? Obviously not the whole
offset:
$ export LANG=C; export TZ=UTC
$ date
Thu Jun 5 12:38:21 UTC 2014
$ hwclock --show --utc
Thu Jun 5 13:07:28 2014 -0.062807 seconds
> > 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
>
> The purpose is to test how precisely is able hwclock to set HW time.
> Long time ago we had problem that each iteration added extra 0.5s to
> the time.
> > cock 10 times ... could this really discover a bug in our hwclock
> > code?
>
> Yes.
>
> > 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?
>
> Probably yes.
Maybe getting sys vs. ntp offset like this:
$ ntp_ip=$(dig 0.fedora.pool.ntp.org ANY +short | head -n 1)
$ sntp -K /tmp/kod "$ntp_ip"
5 Jun 13:00:38 sntp[6547]: Started sntp
2014-06-05 13:00:38.263771 (-0100) -0.002546 +/- 0.022034 secs
Note we have to use fixed IP to get comparable offsets.
cu,
Rudi
next prev parent reply other threads:[~2014-06-05 12:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-04 22:32 tests: hwclock questions Ruediger Meier
2014-06-05 7:48 ` Karel Zak
2014-06-05 12:45 ` Ruediger Meier [this message]
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=201406051445.31366.sweet_f_a@gmx.de \
--to=sweet_f_a@gmx.de \
--cc=kzak@redhat.com \
--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