[LTP] [PATCH v3 4/4] syscalls/clock_adjtime: create clock_adjtime syscall tests

Cyril Hrubis chrubis@suse.cz
Fri Mar 22 14:34:25 CET 2019


Hi!
> > +	if (rval != TIME_OK)
> > +		tst_brk(TBROK | TTERRNO, "unsynced clock or on-going leap???);
> 
> I choose to break test if rval > 0 mainly because it could still have
> on-going leap operations, since clock_adjtime() is async, and also
> because doing the test with an unsynced clock seems weird.

We should print the saved with timex_show() here and the rval at least.

It however it looks like kernel boots with STA_UNSYNC until NTP manges
to sync the time and clears the flag but only if it manages to sync the
clock.

See:

http://linuxelf.com/blog/2017/03/27/clock-status-unsync/

Which itself is an argument to run the test with unsynced clock, since
not all environments have access to internet or ntp daemon running.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list