[LTP] [PATCH 2/3] confstr01: Update to X/Open 7 (POSIX 2008)
Petr Vorel
pvorel@suse.cz
Tue Apr 5 15:48:37 CEST 2022
_CS_POSIX_V7_THREADS_{C,LD}FLAGS aren't currently supported on glibc
(2.35) nor on musl (v1.2.2).
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/kernel/syscalls/confstr/confstr01.c | 81 ++++++-------------
1 file changed, 24 insertions(+), 57 deletions(-)
diff --git a/testcases/kernel/syscalls/confstr/confstr01.c b/testcases/kernel/syscalls/confstr/confstr01.c
index 20267f6865..f41214add8 100644
--- a/testcases/kernel/syscalls/confstr/confstr01.c
+++ b/testcases/kernel/syscalls/confstr/confstr01.c
@@ -10,19 +10,16 @@
/*\
* [Description]
*
- * Test confstr(3) 500 (X/Open 5) functionality – POSIX 1995.
+ * Test confstr(3) 700 (X/Open 7) functionality – POSIX 2008.
*/
-#include "tst_test.h"
-
-#ifdef _XOPEN_SOURCE
-# undef _XOPEN_SOURCE
-#endif
-#define _XOPEN_SOURCE 500
+#define _XOPEN_SOURCE 700
#include <stdlib.h>
#include <unistd.h>
+#include "tst_test.h"
+
static struct test_case_t {
int value;
char *name;
@@ -30,56 +27,26 @@ static struct test_case_t {
{ _CS_PATH, "PATH" },
{ _CS_GNU_LIBC_VERSION, "GNU_LIBC_VERSION" },
{ _CS_GNU_LIBPTHREAD_VERSION, "GNU_LIBPTHREAD_VERSION" },
-
-/* checking for obsolete configurations */
-#ifdef _CS_XBS5_ILP32_OFF32_CFLAGS
- { _CS_XBS5_ILP32_OFF32_CFLAGS, "XBS5_ILP32_OFF32_CFLAGS" },
-#endif
-#ifdef _CS_XBS5_ILP32_OFF32_LDFLAGS
- { _CS_XBS5_ILP32_OFF32_LDFLAGS, "XBS5_ILP32_OFF32_LDFLAGS" },
-#endif
-#ifdef _CS_XBS5_ILP32_OFF32_LIBS
- { _CS_XBS5_ILP32_OFF32_LIBS, "XBS5_ILP32_OFF32_LIBS" },
-#endif
-#ifdef _CS_XBS5_ILP32_OFF32_LINTFLAGS
- { _CS_XBS5_ILP32_OFF32_LINTFLAGS, "XBS5_ILP32_OFF32_LINTFLAGS" },
-#endif
-#ifdef _CS_XBS5_ILP32_OFFBIG_CFLAGS
- { _CS_XBS5_ILP32_OFFBIG_CFLAGS, "XBS5_ILP32_OFFBIG_CFLAGS" },
-#endif
-#ifdef _CS_XBS5_ILP32_OFFBIG_LDFLAGS
- { _CS_XBS5_ILP32_OFFBIG_LDFLAGS, "XBS5_ILP32_OFFBIG_LDFLAGS" },
-#endif
-#ifdef _CS_XBS5_ILP32_OFFBIG_LIBS
- { _CS_XBS5_ILP32_OFFBIG_LIBS, "XBS5_ILP32_OFFBIG_LIBS" },
-#endif
-#ifdef _CS_XBS5_ILP32_OFFBIG_LINTFLAGS
- { _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, "XBS5_ILP32_OFFBIG_LINTFLAGS" },
-#endif
-#ifdef _CS_XBS5_LP64_OFF64_CFLAGS
- { _CS_XBS5_LP64_OFF64_CFLAGS, "XBS5_LP64_OFF64_CFLAGS" },
-#endif
-#ifdef _CS_XBS5_LP64_OFF64_LDFLAGS
- { _CS_XBS5_LP64_OFF64_LDFLAGS, "XBS5_LP64_OFF64_LDFLAGS" },
-#endif
-#ifdef _CS_XBS5_LP64_OFF64_LIBS
- { _CS_XBS5_LP64_OFF64_LIBS, "XBS5_LP64_OFF64_LIBS" },
-#endif
-#ifdef _CS_XBS5_LP64_OFF64_LINTFLAGS
- { _CS_XBS5_LP64_OFF64_LINTFLAGS, "XBS5_LP64_OFF64_LINTFLAGS" },
-#endif
-#ifdef _CS_XBS5_LPBIG_OFFBIG_CFLAGS
- { _CS_XBS5_LPBIG_OFFBIG_CFLAGS, "XBS5_LPBIG_OFFBIG_CFLAGS" },
-#endif
-#ifdef _CS_XBS5_LPBIG_OFFBIG_LDFLAGS
- { _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, "XBS5_LPBIG_OFFBIG_LDFLAGS" },
-#endif
-#ifdef _CS_XBS5_LPBIG_OFFBIG_LIBS
- { _CS_XBS5_LPBIG_OFFBIG_LIBS, "XBS5_LPBIG_OFFBIG_LIBS" },
-#endif
-#ifdef _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
- { _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, "XBS5_LPBIG_OFFBIG_LINTFLAGS" },
-#endif
+ { _CS_POSIX_V7_ILP32_OFF32_CFLAGS, "POSIX_V7_ILP32_OFF32_CFLAGS" },
+ { _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, "POSIX_V7_ILP32_OFF32_LDFLAGS" },
+ { _CS_POSIX_V7_ILP32_OFF32_LIBS, "POSIX_V7_ILP32_OFF32_LIBS" },
+ { _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, "POSIX_V7_ILP32_OFFBIG_CFLAGS" },
+ { _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, "POSIX_V7_ILP32_OFFBIG_LDFLAGS" },
+ { _CS_POSIX_V7_ILP32_OFFBIG_LIBS, "POSIX_V7_ILP32_OFFBIG_LIBS" },
+ { _CS_POSIX_V7_LP64_OFF64_CFLAGS, "POSIX_V7_LP64_OFF64_CFLAGS" },
+ { _CS_POSIX_V7_LP64_OFF64_LDFLAGS, "POSIX_V7_LP64_OFF64_LDFLAGS" },
+ { _CS_POSIX_V7_LP64_OFF64_LIBS, "POSIX_V7_LP64_OFF64_LIBS" },
+ { _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, "POSIX_V7_LPBIG_OFFBIG_CFLAGS" },
+ { _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, "POSIX_V7_LPBIG_OFFBIG_LDFLAGS" },
+ { _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, "POSIX_V7_LPBIG_OFFBIG_LIBS" },
+#ifdef _CS_POSIX_V7_THREADS_CFLAGS
+ { _CS_POSIX_V7_THREADS_CFLAGS, "POSIX_V7_THREADS_CFLAGS" },
+#endif
+#ifdef _CS_POSIX_V7_THREADS_LDFLAGS
+ { _CS_POSIX_V7_THREADS_LDFLAGS, "POSIX_V7_THREADS_LDFLAGS" },
+#endif
+ { _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS, "POSIX_V7_WIDTH_RESTRICTED_ENVS" },
+ { _CS_V7_ENV, "V7_ENV" },
};
static void run(unsigned int i)
--
2.35.1
More information about the ltp
mailing list