Message ID | 20210228223938.8304-2-lukma@denx.de |
---|---|
State | New |
Headers | show |
Series | [1/3] tst: Modify tst-clock_adjtime to allow reuse of its code | expand |
On 28/02/2021 19:39, Lukasz Majewski wrote: > This test is a wrapper on tst-clock_adjtime test. LGTM, although with the previous suggestion on first patch on the set it should be simpler to define the adjtime call. > --- > sysdeps/unix/sysv/linux/Makefile | 2 +- > sysdeps/unix/sysv/linux/tst-adjtimex.c | 23 +++++++++++++++++++++++ > 2 files changed, 24 insertions(+), 1 deletion(-) > create mode 100644 sysdeps/unix/sysv/linux/tst-adjtimex.c > > diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile > index ca3b2f9d40..5c067fd12b 100644 > --- a/sysdeps/unix/sysv/linux/Makefile > +++ b/sysdeps/unix/sysv/linux/Makefile > @@ -112,7 +112,7 @@ tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \ > tst-rlimit-infinity tst-ofdlocks tst-gettid tst-gettid-kill \ > tst-tgkill tst-sysvsem-linux tst-sysvmsg-linux tst-sysvshm-linux \ > tst-timerfd tst-ppoll tst-futimens tst-utime tst-utimes \ > - tst-clock_adjtime > + tst-clock_adjtime tst-adjtimex > > tests-y2038 += \ > tst-futimens-y2038 \ Ok. > diff --git a/sysdeps/unix/sysv/linux/tst-adjtimex.c b/sysdeps/unix/sysv/linux/tst-adjtimex.c > new file mode 100644 > index 0000000000..c7272a2b84 > --- /dev/null > +++ b/sysdeps/unix/sysv/linux/tst-adjtimex.c > @@ -0,0 +1,23 @@ > +/* Test for adjtimex. > + Copyright (C) 2021 Free Software Foundation, Inc. > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, see > + <https://www.gnu.org/licenses/>. */ > + > +#include <sys/timex.h> > +#define TST_ADJTIME_SYSCALL adjtimex > +#define TST_ADJTIME_ARGS (&delta) > + > +#include "tst-clock_adjtime.c" > Ok.
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index ca3b2f9d40..5c067fd12b 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -112,7 +112,7 @@ tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \ tst-rlimit-infinity tst-ofdlocks tst-gettid tst-gettid-kill \ tst-tgkill tst-sysvsem-linux tst-sysvmsg-linux tst-sysvshm-linux \ tst-timerfd tst-ppoll tst-futimens tst-utime tst-utimes \ - tst-clock_adjtime + tst-clock_adjtime tst-adjtimex tests-y2038 += \ tst-futimens-y2038 \ diff --git a/sysdeps/unix/sysv/linux/tst-adjtimex.c b/sysdeps/unix/sysv/linux/tst-adjtimex.c new file mode 100644 index 0000000000..c7272a2b84 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tst-adjtimex.c @@ -0,0 +1,23 @@ +/* Test for adjtimex. + Copyright (C) 2021 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#include <sys/timex.h> +#define TST_ADJTIME_SYSCALL adjtimex +#define TST_ADJTIME_ARGS (&delta) + +#include "tst-clock_adjtime.c"