Re: [chrony-dev] Re: [PATCH] test: check if RTC is RTC_UIE_ON capable

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]




On Tue, Dec 10, 2019 at 4:19 PM Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
On Tue, Dec 10, 2019 at 04:11:14PM +0100, Christian Ehrhardt wrote:
> On Tue, Dec 10, 2019 at 4:06 PM Vincent Blut <vincent.debian@xxxxxxx> wrote:
> > >+hwclock -r --test  | grep -q '^ioctl.*RTC_UIE_ON.*Invalid argument$' &&
> > test_skip "RTC not RTC_UIE_ON capable"
> >
> >                                                     ^^^^^^^^^^^^^^^^
> > Careful here, hwclock is internationalized.
> >
>
> Thanks for the warning, the ioctl and the flag RTC_UIE_ON should be always
> the same.
> The errno might be changing, but we could just drop that from the check
> maybe and be safe?

I'm sorry for changing my mind, but I now think this case should be
handled gracefully in chronyd and not avoided in the test. According
to the man page, the -s option is supposed to work even with no RTC or
broken RTCs. A hang or fatal error with the -s option may break
the user's expectation.

Do you agree?
 
Yes, but I think the changes are not mutually exclusive and should both be added.

-s needs the change you suggested to make the fail fatal.
Otherwise users will not realize that they don't get what they ordered.

But OTOH the tests should still skip if it is known to be a platform where the test won't work well.
If we only add the fatal exit, then the test will not hang but will "fail" still and that is not what one would want.
We know in advance that on this system it has to fail, so let's skip it.

So my thought would be to apply my patch (after we fixed it up to be better - internationalization wise) AND your suggested change like:


--
Miroslav Lichvar


--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.



--
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/