public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sandbox:master commit in: tests/, /
@ 2021-03-11  9:08 Michał Górny
  0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2021-03-11  9:08 UTC (permalink / raw
  To: gentoo-commits

commit:     7962de6a71a4f8c99df1ad448a455c96ee4c33b3
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 11 08:45:52 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Mar 11 08:55:49 2021 +0000
URL:        https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=7962de6a

Fix detecting libsigsegv

Apparently the hack to pretend that libsigsegv's headers do not exist
does not work anymore.  Fix the test to actually respect library check
status instead.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 configure.ac           | 1 -
 tests/Makefile.am      | 2 ++
 tests/libsigsegv_tst.c | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index d0f46e2..b3bc10d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,7 +90,6 @@ AM_CONDITIONAL([SB_SCHIZO], [test "x$enable_schizo" != "xno"])
 dnl this test fills up the stack and then triggers a segfault ...
 dnl but it's hard to wrap things without a stack, so let's ignore
 dnl this test for now ...
-ac_cv_header_sigsegv_h=no
 ac_cv_lib_sigsegv_stackoverflow_install_handler=false
 
 dnl Checks for libraries.

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3baf5b1..52746ee 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -96,7 +96,9 @@ sb_printf_tst_LDADD = $(top_builddir)/libsbutil/libsbutil.la
 
 malloc_hooked_tst_LDFLAGS = $(AM_LDFLAGS) -pthread
 
+libsigsegv_tst_CPPFLAGS = ${AM_CPPFLAGS}
 if HAVE_LIBSIGSEGV
+libsigsegv_tst_CPPFLAGS += -DHAVE_LIBSIGSEGV
 libsigsegv_tst_LDADD = -lsigsegv
 endif
 

diff --git a/tests/libsigsegv_tst.c b/tests/libsigsegv_tst.c
index 82ed21b..2b17fa4 100644
--- a/tests/libsigsegv_tst.c
+++ b/tests/libsigsegv_tst.c
@@ -11,7 +11,7 @@
 
 #define WRITE(msg) ({ ssize_t w = write(1, msg, sizeof(msg) - 1); w; })
 
-#ifdef HAVE_SIGSEGV_H
+#if defined(HAVE_SIGSEGV_H) && defined(HAVE_LIBSIGSEGV)
 #include <sigsegv.h>
 
 static int segv_handler(void *address, int serious)


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/sandbox:stable-2.x commit in: tests/, /
@ 2025-01-08  2:12 Mike Gilbert
  2025-01-14  4:38 ` [gentoo-commits] proj/sandbox:master " Mike Gilbert
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Gilbert @ 2025-01-08  2:12 UTC (permalink / raw
  To: gentoo-commits

commit:     6a8c9e4621d3df8277eae4f4a7d9fed5effd2d63
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  6 17:26:54 2025 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Jan  6 17:28:20 2025 +0000
URL:        https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=6a8c9e46

tests: replace _LARGEFILE64_SOURCE with _FILE_OFFSET_BITS=64

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 configure.ac          |  2 ++
 tests/creat64-0.c     | 18 ++----------------
 tests/fopen64-0.c     | 18 ++----------------
 tests/mkostemp-0.c    |  2 ++
 tests/mkostemp64-0.c  | 18 ++----------------
 tests/mkostemps-0.c   |  2 ++
 tests/mkostemps64-0.c | 22 ++--------------------
 tests/mkstemp-0.c     |  2 ++
 tests/mkstemp64-0.c   | 15 ++-------------
 tests/mkstemps-0.c    |  2 ++
 tests/mkstemps64-0.c  | 19 ++-----------------
 tests/open64-0.c      | 18 ++----------------
 tests/openat-0.c      |  2 ++
 tests/openat64-0.c    | 24 ++----------------------
 tests/truncate64-0.c  | 21 ++-------------------
 tests/utimensat-0.c   |  2 ++
 tests/utimensat64-0.c |  3 ++-
 17 files changed, 34 insertions(+), 156 deletions(-)

diff --git a/configure.ac b/configure.ac
index f58da0b..d690440 100644
--- a/configure.ac
+++ b/configure.ac
@@ -241,6 +241,8 @@ AC_CHECK_FUNCS_ONCE(m4_flatten([
 	unshare
 	utime
 	utimensat
+	__utimensat64
+	__utimensat_time64
 	utimes
 ]))
 AC_CHECK_LIB([sigsegv], [stackoverflow_install_handler],

diff --git a/tests/creat64-0.c b/tests/creat64-0.c
index f900c58..ebbbbfc 100644
--- a/tests/creat64-0.c
+++ b/tests/creat64-0.c
@@ -1,17 +1,3 @@
 #define CONFIG HAVE_CREAT64
-#define FUNC creat64
-#define SFUNC "creat64"
-#define FUNC_STR "\"%s\", %o"
-#define FUNC_IMP file, mode
-#define ARG_CNT 2
-#define ARG_USE "<file> <mode>"
-
-#define process_args() \
-	s = argv[i++]; \
-	const char *file = f_get_file(s); \
-	\
-	s = argv[i++]; \
-	mode_t mode = sscanf_mode_t(s);
-
-#define _LARGEFILE64_SOURCE
-#include "test-skel-0.c"
+#define _FILE_OFFSET_BITS 64
+#include "creat-0.c"

diff --git a/tests/fopen64-0.c b/tests/fopen64-0.c
index 2c229b9..3fee0cd 100644
--- a/tests/fopen64-0.c
+++ b/tests/fopen64-0.c
@@ -1,17 +1,3 @@
 #define CONFIG HAVE_FOPEN64
-#define FUNC fopen64
-#define SFUNC "fopen64"
-#define FUNC_STR "\"%s\", \"%s\""
-#define FUNC_IMP file, mode
-#define ARG_CNT 2
-#define ARG_USE "<file> <strmode>"
-
-#define process_args() \
-	s = argv[i++]; \
-	const char *file = f_get_file(s); \
-	\
-	s = argv[i++]; \
-	char *mode = s;
-
-#define _LARGEFILE64_SOURCE
-#include "test-skel-0.c"
+#define _FILE_OFFSET_BITS 64
+#include "fopen-0.c"

diff --git a/tests/mkostemp-0.c b/tests/mkostemp-0.c
index 65cf8c2..2c520b2 100644
--- a/tests/mkostemp-0.c
+++ b/tests/mkostemp-0.c
@@ -1,4 +1,6 @@
+#ifndef CONFIG
 #define CONFIG HAVE_MKOSTEMP
+#endif
 #define FUNC mkostemp
 #define SFUNC "mkostemp"
 #define FUNC_STR "\"%s\", %#x"

diff --git a/tests/mkostemp64-0.c b/tests/mkostemp64-0.c
index d3c7f7c..88412bc 100644
--- a/tests/mkostemp64-0.c
+++ b/tests/mkostemp64-0.c
@@ -1,17 +1,3 @@
 #define CONFIG HAVE_MKOSTEMP64
-#define FUNC mkostemp64
-#define SFUNC "mkostemp64"
-#define FUNC_STR "\"%s\", %#x"
-#define FUNC_IMP template, flags
-#define ARG_CNT 2
-#define ARG_USE "<template> <fflags>"
-
-#define process_args() \
-	s = argv[i++]; \
-	char *template = s; \
-	\
-	s = argv[i++]; \
-	int flags = f_get_flags(s);
-
-#define _LARGEFILE64_SOURCE
-#include "test-skel-0.c"
+#define _FILE_OFFSET_BITS 64
+#include "mkostemp-0.c"

diff --git a/tests/mkostemps-0.c b/tests/mkostemps-0.c
index 739a491..40c30de 100644
--- a/tests/mkostemps-0.c
+++ b/tests/mkostemps-0.c
@@ -1,4 +1,6 @@
+#ifndef CONFIG
 #define CONFIG HAVE_MKOSTEMPS
+#endif
 #define FUNC mkostemps
 #define SFUNC "mkostemps"
 #define FUNC_STR "\"%s\", %i, %#x"

diff --git a/tests/mkostemps64-0.c b/tests/mkostemps64-0.c
index 9328a0c..7e9f5eb 100644
--- a/tests/mkostemps64-0.c
+++ b/tests/mkostemps64-0.c
@@ -1,21 +1,3 @@
 #define CONFIG HAVE_MKOSTEMPS64
-#define FUNC mkostemps64
-#define SFUNC "mkostemps64"
-#define FUNC_STR "\"%s\", %i, %#x"
-#define FUNC_IMP template, suffixlen, flags
-#define ARG_CNT 3
-#define ARG_USE "<template> <suffixlen> <fflags>"
-
-#define process_args() \
-	s = argv[i++]; \
-	char *template = s; \
-	\
-	s = argv[i++]; \
-	int suffixlen = 0; \
-	sscanf(s, "%i", &suffixlen); \
-	\
-	s = argv[i++]; \
-	int flags = f_get_flags(s);
-
-#define _LARGEFILE64_SOURCE
-#include "test-skel-0.c"
+#define _FILE_OFFSET_BITS 64
+#include "mkostemps-0.c"

diff --git a/tests/mkstemp-0.c b/tests/mkstemp-0.c
index a81344b..d97a3a2 100644
--- a/tests/mkstemp-0.c
+++ b/tests/mkstemp-0.c
@@ -1,4 +1,6 @@
+#ifndef CONFIG
 #define CONFIG HAVE_MKSTEMP
+#endif
 #define FUNC mkstemp
 #define SFUNC "mkstemp"
 #define FUNC_STR "\"%s\""

diff --git a/tests/mkstemp64-0.c b/tests/mkstemp64-0.c
index cc42d59..3f37d6f 100644
--- a/tests/mkstemp64-0.c
+++ b/tests/mkstemp64-0.c
@@ -1,14 +1,3 @@
 #define CONFIG HAVE_MKSTEMP64
-#define FUNC mkstemp64
-#define SFUNC "mkstemp64"
-#define FUNC_STR "\"%s\""
-#define FUNC_IMP template
-#define ARG_CNT 1
-#define ARG_USE "<template>"
-
-#define process_args() \
-	s = argv[i++]; \
-	char *template = s;
-
-#define _LARGEFILE64_SOURCE
-#include "test-skel-0.c"
+#define _FILE_OFFSET_BITS 64
+#include "mkstemp-0.c"

diff --git a/tests/mkstemps-0.c b/tests/mkstemps-0.c
index e1c73fc..8776432 100644
--- a/tests/mkstemps-0.c
+++ b/tests/mkstemps-0.c
@@ -1,4 +1,6 @@
+#ifndef CONFIG
 #define CONFIG HAVE_MKSTEMPS
+#endif
 #define FUNC mkstemps
 #define SFUNC "mkstemps"
 #define FUNC_STR "\"%s\", %i"

diff --git a/tests/mkstemps64-0.c b/tests/mkstemps64-0.c
index af9f25c..3f6f5bf 100644
--- a/tests/mkstemps64-0.c
+++ b/tests/mkstemps64-0.c
@@ -1,18 +1,3 @@
 #define CONFIG HAVE_MKSTEMPS64
-#define FUNC mkstemps64
-#define SFUNC "mkstemps64"
-#define FUNC_STR "\"%s\", %i"
-#define FUNC_IMP template, suffixlen
-#define ARG_CNT 2
-#define ARG_USE "<template> <suffixlen>"
-
-#define process_args() \
-	s = argv[i++]; \
-	char *template = s; \
-	\
-	s = argv[i++]; \
-	int suffixlen = 0; \
-	sscanf(s, "%i", &suffixlen);
-
-#define _LARGEFILE64_SOURCE
-#include "test-skel-0.c"
+#define _FILE_OFFSET_BITS 64
+#include "mkstemps-0.c"

diff --git a/tests/open64-0.c b/tests/open64-0.c
index e6befb5..f36d98b 100644
--- a/tests/open64-0.c
+++ b/tests/open64-0.c
@@ -1,17 +1,3 @@
 #define CONFIG HAVE_OPEN64
-#define FUNC open64
-#define SFUNC "open64"
-#define FUNC_STR "\"%s\", %o"
-#define FUNC_IMP file, flags
-#define ARG_CNT 2
-#define ARG_USE "<file> <fflags>"
-
-#define process_args() \
-	s = argv[i++]; \
-	const char *file = f_get_file(s); \
-	\
-	s = argv[i++]; \
-	int flags = f_get_flags(s);
-
-#define _LARGEFILE64_SOURCE
-#include "test-skel-0.c"
+#define _FILE_OFFSET_BITS 64
+#include "open-0.c"

diff --git a/tests/openat-0.c b/tests/openat-0.c
index 24f230b..c616a06 100644
--- a/tests/openat-0.c
+++ b/tests/openat-0.c
@@ -1,4 +1,6 @@
+#ifndef CONFIG
 #define CONFIG HAVE_OPENAT
+#endif
 #define FUNC openat
 #define SFUNC "openat"
 #define FUNC_STR "%i, \"%s\", %#x, %o"

diff --git a/tests/openat64-0.c b/tests/openat64-0.c
index 0b8ab19..02c6474 100644
--- a/tests/openat64-0.c
+++ b/tests/openat64-0.c
@@ -1,23 +1,3 @@
 #define CONFIG HAVE_OPENAT64
-#define FUNC openat64
-#define SFUNC "openat64"
-#define FUNC_STR "%i, \"%s\", %#x, %o"
-#define FUNC_IMP dirfd, file, flags, mode
-#define ARG_CNT 4
-#define ARG_USE "<dirfd> <file> <fflags> <mode>"
-
-#define process_args() \
-	s = argv[i++]; \
-	int dirfd = at_get_fd(s); \
-	\
-	s = argv[i++]; \
-	const char *file = f_get_file(s); \
-	\
-	s = argv[i++]; \
-	int flags = f_get_flags(s); \
-	\
-	s = argv[i++]; \
-	mode_t mode = sscanf_mode_t(s);
-
-#define _LARGEFILE64_SOURCE
-#include "test-skel-0.c"
+#define _FILE_OFFSET_BITS 64
+#include "openat-0.c"

diff --git a/tests/truncate64-0.c b/tests/truncate64-0.c
index 710c8bd..4ec253b 100644
--- a/tests/truncate64-0.c
+++ b/tests/truncate64-0.c
@@ -1,20 +1,3 @@
 #define CONFIG HAVE_TRUNCATE64
-#define FUNC truncate64
-#define SFUNC "truncate64"
-#define FUNC_STR "\"%s\", %llu"
-#define FUNC_IMP path, (unsigned long long)length
-#define ARG_CNT 2
-#define ARG_USE "<path> <length>"
-
-#define process_args() \
-	s = argv[i++]; \
-	char *path = s; \
-	\
-	s = argv[i++]; \
-	off64_t length; \
-	unsigned long long sl; \
-	sscanf(s, "%llu", &sl); \
-	length = sl;
-
-#define _LARGEFILE64_SOURCE
-#include "test-skel-0.c"
+#define _FILE_OFFSET_BITS 64
+#include "truncate-0.c"

diff --git a/tests/utimensat-0.c b/tests/utimensat-0.c
index 4e8b89c..c69f7ea 100644
--- a/tests/utimensat-0.c
+++ b/tests/utimensat-0.c
@@ -1,7 +1,9 @@
 #pragma GCC push_options
 #pragma GCC optimize("-fno-isolate-erroneous-paths-dereference,-fno-isolate-erroneous-paths-attribute")
 
+#ifndef CONFIG
 #define CONFIG HAVE_UTIMENSAT
+#endif
 #define FUNC utimensat
 #define SFUNC "utimensat"
 #define FUNC_STR "%i, \"%s\", %p, %x"

diff --git a/tests/utimensat64-0.c b/tests/utimensat64-0.c
index bbacef5..1351c25 100644
--- a/tests/utimensat64-0.c
+++ b/tests/utimensat64-0.c
@@ -1,3 +1,4 @@
-#define _TIME_BITS 64
+#define CONFIG HAVE___UTIMENSAT64 || HAVE___UTIMENSAT_TIME64
 #define _FILE_OFFSET_BITS 64
+#define _TIME_BITS 64
 #include "utimensat-0.c"


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/sandbox:master commit in: tests/, /
  2025-01-08  2:12 [gentoo-commits] proj/sandbox:stable-2.x commit in: tests/, / Mike Gilbert
@ 2025-01-14  4:38 ` Mike Gilbert
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Gilbert @ 2025-01-14  4:38 UTC (permalink / raw
  To: gentoo-commits

commit:     6a8c9e4621d3df8277eae4f4a7d9fed5effd2d63
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  6 17:26:54 2025 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Jan  6 17:28:20 2025 +0000
URL:        https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=6a8c9e46

tests: replace _LARGEFILE64_SOURCE with _FILE_OFFSET_BITS=64

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 configure.ac          |  2 ++
 tests/creat64-0.c     | 18 ++----------------
 tests/fopen64-0.c     | 18 ++----------------
 tests/mkostemp-0.c    |  2 ++
 tests/mkostemp64-0.c  | 18 ++----------------
 tests/mkostemps-0.c   |  2 ++
 tests/mkostemps64-0.c | 22 ++--------------------
 tests/mkstemp-0.c     |  2 ++
 tests/mkstemp64-0.c   | 15 ++-------------
 tests/mkstemps-0.c    |  2 ++
 tests/mkstemps64-0.c  | 19 ++-----------------
 tests/open64-0.c      | 18 ++----------------
 tests/openat-0.c      |  2 ++
 tests/openat64-0.c    | 24 ++----------------------
 tests/truncate64-0.c  | 21 ++-------------------
 tests/utimensat-0.c   |  2 ++
 tests/utimensat64-0.c |  3 ++-
 17 files changed, 34 insertions(+), 156 deletions(-)

diff --git a/configure.ac b/configure.ac
index f58da0b..d690440 100644
--- a/configure.ac
+++ b/configure.ac
@@ -241,6 +241,8 @@ AC_CHECK_FUNCS_ONCE(m4_flatten([
 	unshare
 	utime
 	utimensat
+	__utimensat64
+	__utimensat_time64
 	utimes
 ]))
 AC_CHECK_LIB([sigsegv], [stackoverflow_install_handler],

diff --git a/tests/creat64-0.c b/tests/creat64-0.c
index f900c58..ebbbbfc 100644
--- a/tests/creat64-0.c
+++ b/tests/creat64-0.c
@@ -1,17 +1,3 @@
 #define CONFIG HAVE_CREAT64
-#define FUNC creat64
-#define SFUNC "creat64"
-#define FUNC_STR "\"%s\", %o"
-#define FUNC_IMP file, mode
-#define ARG_CNT 2
-#define ARG_USE "<file> <mode>"
-
-#define process_args() \
-	s = argv[i++]; \
-	const char *file = f_get_file(s); \
-	\
-	s = argv[i++]; \
-	mode_t mode = sscanf_mode_t(s);
-
-#define _LARGEFILE64_SOURCE
-#include "test-skel-0.c"
+#define _FILE_OFFSET_BITS 64
+#include "creat-0.c"

diff --git a/tests/fopen64-0.c b/tests/fopen64-0.c
index 2c229b9..3fee0cd 100644
--- a/tests/fopen64-0.c
+++ b/tests/fopen64-0.c
@@ -1,17 +1,3 @@
 #define CONFIG HAVE_FOPEN64
-#define FUNC fopen64
-#define SFUNC "fopen64"
-#define FUNC_STR "\"%s\", \"%s\""
-#define FUNC_IMP file, mode
-#define ARG_CNT 2
-#define ARG_USE "<file> <strmode>"
-
-#define process_args() \
-	s = argv[i++]; \
-	const char *file = f_get_file(s); \
-	\
-	s = argv[i++]; \
-	char *mode = s;
-
-#define _LARGEFILE64_SOURCE
-#include "test-skel-0.c"
+#define _FILE_OFFSET_BITS 64
+#include "fopen-0.c"

diff --git a/tests/mkostemp-0.c b/tests/mkostemp-0.c
index 65cf8c2..2c520b2 100644
--- a/tests/mkostemp-0.c
+++ b/tests/mkostemp-0.c
@@ -1,4 +1,6 @@
+#ifndef CONFIG
 #define CONFIG HAVE_MKOSTEMP
+#endif
 #define FUNC mkostemp
 #define SFUNC "mkostemp"
 #define FUNC_STR "\"%s\", %#x"

diff --git a/tests/mkostemp64-0.c b/tests/mkostemp64-0.c
index d3c7f7c..88412bc 100644
--- a/tests/mkostemp64-0.c
+++ b/tests/mkostemp64-0.c
@@ -1,17 +1,3 @@
 #define CONFIG HAVE_MKOSTEMP64
-#define FUNC mkostemp64
-#define SFUNC "mkostemp64"
-#define FUNC_STR "\"%s\", %#x"
-#define FUNC_IMP template, flags
-#define ARG_CNT 2
-#define ARG_USE "<template> <fflags>"
-
-#define process_args() \
-	s = argv[i++]; \
-	char *template = s; \
-	\
-	s = argv[i++]; \
-	int flags = f_get_flags(s);
-
-#define _LARGEFILE64_SOURCE
-#include "test-skel-0.c"
+#define _FILE_OFFSET_BITS 64
+#include "mkostemp-0.c"

diff --git a/tests/mkostemps-0.c b/tests/mkostemps-0.c
index 739a491..40c30de 100644
--- a/tests/mkostemps-0.c
+++ b/tests/mkostemps-0.c
@@ -1,4 +1,6 @@
+#ifndef CONFIG
 #define CONFIG HAVE_MKOSTEMPS
+#endif
 #define FUNC mkostemps
 #define SFUNC "mkostemps"
 #define FUNC_STR "\"%s\", %i, %#x"

diff --git a/tests/mkostemps64-0.c b/tests/mkostemps64-0.c
index 9328a0c..7e9f5eb 100644
--- a/tests/mkostemps64-0.c
+++ b/tests/mkostemps64-0.c
@@ -1,21 +1,3 @@
 #define CONFIG HAVE_MKOSTEMPS64
-#define FUNC mkostemps64
-#define SFUNC "mkostemps64"
-#define FUNC_STR "\"%s\", %i, %#x"
-#define FUNC_IMP template, suffixlen, flags
-#define ARG_CNT 3
-#define ARG_USE "<template> <suffixlen> <fflags>"
-
-#define process_args() \
-	s = argv[i++]; \
-	char *template = s; \
-	\
-	s = argv[i++]; \
-	int suffixlen = 0; \
-	sscanf(s, "%i", &suffixlen); \
-	\
-	s = argv[i++]; \
-	int flags = f_get_flags(s);
-
-#define _LARGEFILE64_SOURCE
-#include "test-skel-0.c"
+#define _FILE_OFFSET_BITS 64
+#include "mkostemps-0.c"

diff --git a/tests/mkstemp-0.c b/tests/mkstemp-0.c
index a81344b..d97a3a2 100644
--- a/tests/mkstemp-0.c
+++ b/tests/mkstemp-0.c
@@ -1,4 +1,6 @@
+#ifndef CONFIG
 #define CONFIG HAVE_MKSTEMP
+#endif
 #define FUNC mkstemp
 #define SFUNC "mkstemp"
 #define FUNC_STR "\"%s\""

diff --git a/tests/mkstemp64-0.c b/tests/mkstemp64-0.c
index cc42d59..3f37d6f 100644
--- a/tests/mkstemp64-0.c
+++ b/tests/mkstemp64-0.c
@@ -1,14 +1,3 @@
 #define CONFIG HAVE_MKSTEMP64
-#define FUNC mkstemp64
-#define SFUNC "mkstemp64"
-#define FUNC_STR "\"%s\""
-#define FUNC_IMP template
-#define ARG_CNT 1
-#define ARG_USE "<template>"
-
-#define process_args() \
-	s = argv[i++]; \
-	char *template = s;
-
-#define _LARGEFILE64_SOURCE
-#include "test-skel-0.c"
+#define _FILE_OFFSET_BITS 64
+#include "mkstemp-0.c"

diff --git a/tests/mkstemps-0.c b/tests/mkstemps-0.c
index e1c73fc..8776432 100644
--- a/tests/mkstemps-0.c
+++ b/tests/mkstemps-0.c
@@ -1,4 +1,6 @@
+#ifndef CONFIG
 #define CONFIG HAVE_MKSTEMPS
+#endif
 #define FUNC mkstemps
 #define SFUNC "mkstemps"
 #define FUNC_STR "\"%s\", %i"

diff --git a/tests/mkstemps64-0.c b/tests/mkstemps64-0.c
index af9f25c..3f6f5bf 100644
--- a/tests/mkstemps64-0.c
+++ b/tests/mkstemps64-0.c
@@ -1,18 +1,3 @@
 #define CONFIG HAVE_MKSTEMPS64
-#define FUNC mkstemps64
-#define SFUNC "mkstemps64"
-#define FUNC_STR "\"%s\", %i"
-#define FUNC_IMP template, suffixlen
-#define ARG_CNT 2
-#define ARG_USE "<template> <suffixlen>"
-
-#define process_args() \
-	s = argv[i++]; \
-	char *template = s; \
-	\
-	s = argv[i++]; \
-	int suffixlen = 0; \
-	sscanf(s, "%i", &suffixlen);
-
-#define _LARGEFILE64_SOURCE
-#include "test-skel-0.c"
+#define _FILE_OFFSET_BITS 64
+#include "mkstemps-0.c"

diff --git a/tests/open64-0.c b/tests/open64-0.c
index e6befb5..f36d98b 100644
--- a/tests/open64-0.c
+++ b/tests/open64-0.c
@@ -1,17 +1,3 @@
 #define CONFIG HAVE_OPEN64
-#define FUNC open64
-#define SFUNC "open64"
-#define FUNC_STR "\"%s\", %o"
-#define FUNC_IMP file, flags
-#define ARG_CNT 2
-#define ARG_USE "<file> <fflags>"
-
-#define process_args() \
-	s = argv[i++]; \
-	const char *file = f_get_file(s); \
-	\
-	s = argv[i++]; \
-	int flags = f_get_flags(s);
-
-#define _LARGEFILE64_SOURCE
-#include "test-skel-0.c"
+#define _FILE_OFFSET_BITS 64
+#include "open-0.c"

diff --git a/tests/openat-0.c b/tests/openat-0.c
index 24f230b..c616a06 100644
--- a/tests/openat-0.c
+++ b/tests/openat-0.c
@@ -1,4 +1,6 @@
+#ifndef CONFIG
 #define CONFIG HAVE_OPENAT
+#endif
 #define FUNC openat
 #define SFUNC "openat"
 #define FUNC_STR "%i, \"%s\", %#x, %o"

diff --git a/tests/openat64-0.c b/tests/openat64-0.c
index 0b8ab19..02c6474 100644
--- a/tests/openat64-0.c
+++ b/tests/openat64-0.c
@@ -1,23 +1,3 @@
 #define CONFIG HAVE_OPENAT64
-#define FUNC openat64
-#define SFUNC "openat64"
-#define FUNC_STR "%i, \"%s\", %#x, %o"
-#define FUNC_IMP dirfd, file, flags, mode
-#define ARG_CNT 4
-#define ARG_USE "<dirfd> <file> <fflags> <mode>"
-
-#define process_args() \
-	s = argv[i++]; \
-	int dirfd = at_get_fd(s); \
-	\
-	s = argv[i++]; \
-	const char *file = f_get_file(s); \
-	\
-	s = argv[i++]; \
-	int flags = f_get_flags(s); \
-	\
-	s = argv[i++]; \
-	mode_t mode = sscanf_mode_t(s);
-
-#define _LARGEFILE64_SOURCE
-#include "test-skel-0.c"
+#define _FILE_OFFSET_BITS 64
+#include "openat-0.c"

diff --git a/tests/truncate64-0.c b/tests/truncate64-0.c
index 710c8bd..4ec253b 100644
--- a/tests/truncate64-0.c
+++ b/tests/truncate64-0.c
@@ -1,20 +1,3 @@
 #define CONFIG HAVE_TRUNCATE64
-#define FUNC truncate64
-#define SFUNC "truncate64"
-#define FUNC_STR "\"%s\", %llu"
-#define FUNC_IMP path, (unsigned long long)length
-#define ARG_CNT 2
-#define ARG_USE "<path> <length>"
-
-#define process_args() \
-	s = argv[i++]; \
-	char *path = s; \
-	\
-	s = argv[i++]; \
-	off64_t length; \
-	unsigned long long sl; \
-	sscanf(s, "%llu", &sl); \
-	length = sl;
-
-#define _LARGEFILE64_SOURCE
-#include "test-skel-0.c"
+#define _FILE_OFFSET_BITS 64
+#include "truncate-0.c"

diff --git a/tests/utimensat-0.c b/tests/utimensat-0.c
index 4e8b89c..c69f7ea 100644
--- a/tests/utimensat-0.c
+++ b/tests/utimensat-0.c
@@ -1,7 +1,9 @@
 #pragma GCC push_options
 #pragma GCC optimize("-fno-isolate-erroneous-paths-dereference,-fno-isolate-erroneous-paths-attribute")
 
+#ifndef CONFIG
 #define CONFIG HAVE_UTIMENSAT
+#endif
 #define FUNC utimensat
 #define SFUNC "utimensat"
 #define FUNC_STR "%i, \"%s\", %p, %x"

diff --git a/tests/utimensat64-0.c b/tests/utimensat64-0.c
index bbacef5..1351c25 100644
--- a/tests/utimensat64-0.c
+++ b/tests/utimensat64-0.c
@@ -1,3 +1,4 @@
-#define _TIME_BITS 64
+#define CONFIG HAVE___UTIMENSAT64 || HAVE___UTIMENSAT_TIME64
 #define _FILE_OFFSET_BITS 64
+#define _TIME_BITS 64
 #include "utimensat-0.c"


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-14  4:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-08  2:12 [gentoo-commits] proj/sandbox:stable-2.x commit in: tests/, / Mike Gilbert
2025-01-14  4:38 ` [gentoo-commits] proj/sandbox:master " Mike Gilbert
  -- strict thread matches above, loose matches on Subject: below --
2021-03-11  9:08 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox