* [PATCH] Linux: misc/tst-ofdlocks-compat can be a regular test
@ 2021-03-05 12:57 Florian Weimer
2021-03-08 13:47 ` Adhemerval Zanella
0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer @ 2021-03-05 12:57 UTC (permalink / raw)
To: libc-alpha
Now that compat_symbol_reference works in non-internal tests.
Also do not build and run the test at all on architectures which
do not have the pre-2.28 symbol version of fcntl.
---
sysdeps/unix/sysv/linux/Makefile | 8 +++++++-
sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c | 8 --------
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 51e28b97ac..8cc03c8145 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -108,7 +108,13 @@ 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
-tests-internal += tst-ofdlocks-compat tst-sigcontext-get_pc
+
+# Test for the symbol version of fcntl that was replaced in glibc 2.28.
+ifeq ($(have-GLIBC_2.27)$(build-shared),yesyes)
+tests += tst-ofdlocks-compat
+endif
+
+tests-internal += tst-sigcontext-get_pc
CFLAGS-tst-sigcontext-get_pc.c = -fasynchronous-unwind-tables
diff --git a/sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c b/sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c
index 9169e3baf8..4af8da123f 100644
--- a/sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c
+++ b/sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c
@@ -25,7 +25,6 @@
#include <support/check.h>
#include <shlib-compat.h>
-#if TEST_COMPAT (libc, GLIBC_2_0, GLIBC_2_28)
compat_symbol_reference (libc, fcntl, fcntl, GLIBC_2_0);
static char *temp_filename;
@@ -86,12 +85,5 @@ do_test (void)
return 0;
}
-#else
-static int
-do_test (void)
-{
- return 77;
-}
-#endif
#include <support/test-driver.c>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Linux: misc/tst-ofdlocks-compat can be a regular test
2021-03-05 12:57 [PATCH] Linux: misc/tst-ofdlocks-compat can be a regular test Florian Weimer
@ 2021-03-08 13:47 ` Adhemerval Zanella
0 siblings, 0 replies; 2+ messages in thread
From: Adhemerval Zanella @ 2021-03-08 13:47 UTC (permalink / raw)
To: libc-alpha
On 05/03/2021 09:57, Florian Weimer via Libc-alpha wrote:
> Now that compat_symbol_reference works in non-internal tests.
> Also do not build and run the test at all on architectures which
> do not have the pre-2.28 symbol version of fcntl.
LGTM, thanks.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
>
> ---
> sysdeps/unix/sysv/linux/Makefile | 8 +++++++-
> sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c | 8 --------
> 2 files changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
> index 51e28b97ac..8cc03c8145 100644
> --- a/sysdeps/unix/sysv/linux/Makefile
> +++ b/sysdeps/unix/sysv/linux/Makefile
> @@ -108,7 +108,13 @@ 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
> -tests-internal += tst-ofdlocks-compat tst-sigcontext-get_pc
> +
> +# Test for the symbol version of fcntl that was replaced in glibc 2.28.
> +ifeq ($(have-GLIBC_2.27)$(build-shared),yesyes)
> +tests += tst-ofdlocks-compat
> +endif
> +
> +tests-internal += tst-sigcontext-get_pc
>
> CFLAGS-tst-sigcontext-get_pc.c = -fasynchronous-unwind-tables
>
Ok.
> diff --git a/sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c b/sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c
> index 9169e3baf8..4af8da123f 100644
> --- a/sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c
> +++ b/sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c
> @@ -25,7 +25,6 @@
> #include <support/check.h>
>
> #include <shlib-compat.h>
> -#if TEST_COMPAT (libc, GLIBC_2_0, GLIBC_2_28)
> compat_symbol_reference (libc, fcntl, fcntl, GLIBC_2_0);
>
> static char *temp_filename;
> @@ -86,12 +85,5 @@ do_test (void)
>
> return 0;
> }
> -#else
> -static int
> -do_test (void)
> -{
> - return 77;
> -}
> -#endif
>
> #include <support/test-driver.c>
>
Ok.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-08 13:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05 12:57 [PATCH] Linux: misc/tst-ofdlocks-compat can be a regular test Florian Weimer
2021-03-08 13:47 ` Adhemerval Zanella
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).