public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] tst: Modify tst-clock_adjtime to allow reuse of its code
@ 2021-03-09  9:12 Lukasz Majewski
  0 siblings, 0 replies; only message in thread
From: Lukasz Majewski @ 2021-03-09  9:12 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4de01867dcacae244b8524c104f10dc68c4f393b

commit 4de01867dcacae244b8524c104f10dc68c4f393b
Author: Lukasz Majewski <lukma@denx.de>
Date:   Sun Feb 28 23:02:54 2021 +0100

    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>

Diff:
---
 sysdeps/unix/sysv/linux/tst-clock_adjtime.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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");


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-09  9:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09  9:12 [glibc] tst: Modify tst-clock_adjtime to allow reuse of its code Lukasz Majewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).