aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Majewski <lukma@denx.de>2021-02-28 23:02:54 +0100
committerLukasz Majewski <lukma@denx.de>2021-03-08 22:41:41 +0100
commit4de01867dcacae244b8524c104f10dc68c4f393b (patch)
tree573035e95f2f803c58e24f2273c37b3e8d47c7b6
parentb4effffde8e61be97a9a11dec1c628034207a643 (diff)
downloadglibc-4de01867dcacae244b8524c104f10dc68c4f393b.tar
glibc-4de01867dcacae244b8524c104f10dc68c4f393b.tar.gz
glibc-4de01867dcacae244b8524c104f10dc68c4f393b.tar.bz2
glibc-4de01867dcacae244b8524c104f10dc68c4f393b.zip
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>
-rw-r--r--sysdeps/unix/sysv/linux/tst-clock_adjtime.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/tst-clock_adjtime.c b/sysdeps/unix/sysv/linux/tst-clock_adjtime.c
index 6b9bb9940c..52adb8817e 100644
--- a/sysdeps/unix/sysv/linux/tst-clock_adjtime.c
+++ b/sysdeps/unix/sysv/linux/tst-clock_adjtime.c
@@ -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");