mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-26 06:50:07 +00:00
tst: Modify tst-clock_adjtime to allow reuse of its code
The tst-clock_adjtime can be adjusted to be reused for also testing adjtimex. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
parent
b4effffde8
commit
4de01867dc
@ -22,6 +22,10 @@
|
||||
#include <support/check.h>
|
||||
#include <support/timespec.h>
|
||||
|
||||
#ifndef ADJTIME_CALL
|
||||
# define ADJTIME_CALL(__clock, __timex) clock_adjtime (__clock, __timex)
|
||||
#endif
|
||||
|
||||
static int
|
||||
do_test (void)
|
||||
{
|
||||
@ -40,7 +44,7 @@ do_test (void)
|
||||
delta.time.tv_usec = 0;
|
||||
delta.modes = ADJ_SETOFFSET;
|
||||
|
||||
int ret = clock_adjtime (CLOCK_REALTIME, &delta);
|
||||
int ret = ADJTIME_CALL (CLOCK_REALTIME, &delta);
|
||||
if (ret == -1)
|
||||
FAIL_EXIT1 ("clock_adjtime failed: %m\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user