linux-test-project / ltp

Linux Test Project (mailing list: https://lists.linux.it/listinfo/ltp)
https://linux-test-project.readthedocs.io/
GNU General Public License v2.0
2.31k stars 1.01k forks source link

Write test for/investigate clock_settime() #343

Open rafaeldtinoco opened 6 years ago

rafaeldtinoco commented 6 years ago

Just like issues #270 and issue #342, there is also missing coverage for clock_settime() syscall.

OBS: Part of Linaro effort for full arm32/arm64 syscall coverage.

rafaeldtinoco commented 5 years ago

I'm currently working on these tests.

rafaeldtinoco commented 5 years ago

Created: http://lists.linux.it/pipermail/ltp/2018-December/010200.html Waiting review before moving on into clock_gettime() and others.

metan-ucw commented 5 years ago

Looking at /usr/include/bits/time.h on a recent distribution the list seems to include:

/* Like CLOCK_REALTIME but also wakes suspended system.  */
# define CLOCK_REALTIME_ALARM           8
/* Like CLOCK_BOOTTIME but also wakes suspended system.  */
# define CLOCK_BOOTTIME_ALARM           9
/* Like CLOCK_REALTIME but in International Atomic Time.  */
# define CLOCK_TAI                      11

/* Flag to indicate time is absolute.  */
# define TIMER_ABSTIME                  1

We should probably take these into consideration in the tst_clock_name() function and in the invalid clock_settime tests.