strace/0141-tests-disable-sockopt-timestamp-on-new-glibc-with-__.patch
Eugene Syromiatnikov 97d3c529a3 Rebase to strace 5.13
- Add "tests: disable sockopt-timestamp on new glibc with __TIMESIZE!=64 altogether"
   to work around mangling of SO_TIMESTAMP* setsockopt calls introduced
   in glibc-2.33.9000-707-g13c51549e2077f2f3bf84e8fd0b46d8b0c615912.

* .gitignore (/strace-5.10.tar.xz): Remove.
(/strace-5.13.tar.xz): New record.
* 0141-tests-disable-sockopt-timestamp-on-new-glibc-with-__.patch: New file.
* sources (strace-5.10.tar.xz): Replace with...
(strace-5.13.tar.xz): ...this version.
* strace.spec: Sync with strace.spec.in from the source tree.
(Version): Bump to 5.13.
(Patch141): New patch.
(%prep): Apply it.
(%changelog): New record about 5.13-1.

Resolves: #1925722
Resolves: #1925967
Resolves: #1928305
Resolves: #1973048
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
2021-07-22 14:06:23 +02:00

215 lines
6.2 KiB
Diff

From c766a2cb430ae6e382855859048f4ce2055ef0a4 Mon Sep 17 00:00:00 2001
From: Eugene Syromyatnikov <evgsyr@gmail.com>
Date: Tue, 20 Jul 2021 20:29:18 +0200
Subject: [PATCH] tests: disable sockopt-timestamp on new glibc with
__TIMESIZE!=64 altogether
---
tests/sockopt-timestamp.c | 23 +++++++----------------
1 file changed, 7 insertions(+), 16 deletions(-)
diff --git a/tests/sockopt-timestamp.c b/tests/sockopt-timestamp.c
index 33e0c1a..50ab867 100644
--- a/tests/sockopt-timestamp.c
+++ b/tests/sockopt-timestamp.c
@@ -26,27 +26,23 @@
# include "xlat/sock_options.h"
#undef XLAT_MACROS_ONLY
-#undef TEST_OLD_SCM_TIMESTAMPS
+#undef TEST_SCM_TIMESTAMPS
/*
* Sadly, starting with commit
* glibc-2.33.9000-707-g13c51549e2077f2f3bf84e8fd0b46d8b0c615912, on every
* 32-bit architecture where 32-bit time_t support is enabled,
- * glibc mangles old scm timestamps.
+ * glibc mangles scm timestamps.
*/
#if GLIBC_PREREQ_GE(2, 33) && defined __TIMESIZE && __TIMESIZE != 64
-# define TEST_OLD_SCM_TIMESTAMPS 0
+# define TEST_SCM_TIMESTAMPS 0
#endif
-#ifndef TEST_OLD_SCM_TIMESTAMPS
-# define TEST_OLD_SCM_TIMESTAMPS 1
+#ifndef TEST_SCM_TIMESTAMPS
+# define TEST_SCM_TIMESTAMPS 1
#endif
-#if TEST_OLD_SCM_TIMESTAMPS \
- || defined HAVE_STRUCT___KERNEL_TIMESPEC \
- || defined HAVE_STRUCT___KERNEL_SOCK_TIMEVAL
-
-# if TEST_OLD_SCM_TIMESTAMPS
+#if TEST_SCM_TIMESTAMPS
static void
print_timestamp_old(const struct cmsghdr *c)
{
@@ -84,7 +80,6 @@ print_timestampns_old(const struct cmsghdr *c)
printf("{tv_sec=%lld, tv_nsec=%lld}",
(long long) ts.tv_sec, (long long) ts.tv_nsec);
}
-# endif /* TEST_OLD_SCM_TIMESTAMPS */
# ifdef HAVE_STRUCT___KERNEL_SOCK_TIMEVAL
static void
@@ -212,10 +207,8 @@ main(void)
const char *str;
void (*fun)(const struct cmsghdr *);
} tests[] = {
-# if TEST_OLD_SCM_TIMESTAMPS
{ SO_TIMESTAMP_OLD, "SO_TIMESTAMP_OLD", print_timestamp_old },
{ SO_TIMESTAMPNS_OLD, "SO_TIMESTAMPNS_OLD", print_timestampns_old },
-# endif
# ifdef HAVE_STRUCT___KERNEL_SOCK_TIMEVAL
{ SO_TIMESTAMP_NEW, "SO_TIMESTAMP_NEW", print_timestamp_new },
# endif
@@ -237,8 +230,6 @@ main(void)
#else
-SKIP_MAIN_UNDEFINED("TEST_OLD_SCM_TIMESTAMPS"
- " || HAVE_STRUCT___KERNEL_TIMESPEC"
- " || HAVE_STRUCT___KERNEL_SOCK_TIMEVAL")
+SKIP_MAIN_UNDEFINED("TEST_SCM_TIMESTAMPS")
#endif
diff --git a/tests-m32/sockopt-timestamp.c b/tests-m32/sockopt-timestamp.c
index 33e0c1a..50ab867 100644
--- a/tests-m32/sockopt-timestamp.c
+++ b/tests-m32/sockopt-timestamp.c
@@ -26,27 +26,23 @@
# include "xlat/sock_options.h"
#undef XLAT_MACROS_ONLY
-#undef TEST_OLD_SCM_TIMESTAMPS
+#undef TEST_SCM_TIMESTAMPS
/*
* Sadly, starting with commit
* glibc-2.33.9000-707-g13c51549e2077f2f3bf84e8fd0b46d8b0c615912, on every
* 32-bit architecture where 32-bit time_t support is enabled,
- * glibc mangles old scm timestamps.
+ * glibc mangles scm timestamps.
*/
#if GLIBC_PREREQ_GE(2, 33) && defined __TIMESIZE && __TIMESIZE != 64
-# define TEST_OLD_SCM_TIMESTAMPS 0
+# define TEST_SCM_TIMESTAMPS 0
#endif
-#ifndef TEST_OLD_SCM_TIMESTAMPS
-# define TEST_OLD_SCM_TIMESTAMPS 1
+#ifndef TEST_SCM_TIMESTAMPS
+# define TEST_SCM_TIMESTAMPS 1
#endif
-#if TEST_OLD_SCM_TIMESTAMPS \
- || defined HAVE_STRUCT___KERNEL_TIMESPEC \
- || defined HAVE_STRUCT___KERNEL_SOCK_TIMEVAL
-
-# if TEST_OLD_SCM_TIMESTAMPS
+#if TEST_SCM_TIMESTAMPS
static void
print_timestamp_old(const struct cmsghdr *c)
{
@@ -84,7 +80,6 @@ print_timestampns_old(const struct cmsghdr *c)
printf("{tv_sec=%lld, tv_nsec=%lld}",
(long long) ts.tv_sec, (long long) ts.tv_nsec);
}
-# endif /* TEST_OLD_SCM_TIMESTAMPS */
# ifdef HAVE_STRUCT___KERNEL_SOCK_TIMEVAL
static void
@@ -212,10 +207,8 @@ main(void)
const char *str;
void (*fun)(const struct cmsghdr *);
} tests[] = {
-# if TEST_OLD_SCM_TIMESTAMPS
{ SO_TIMESTAMP_OLD, "SO_TIMESTAMP_OLD", print_timestamp_old },
{ SO_TIMESTAMPNS_OLD, "SO_TIMESTAMPNS_OLD", print_timestampns_old },
-# endif
# ifdef HAVE_STRUCT___KERNEL_SOCK_TIMEVAL
{ SO_TIMESTAMP_NEW, "SO_TIMESTAMP_NEW", print_timestamp_new },
# endif
@@ -237,8 +230,6 @@ main(void)
#else
-SKIP_MAIN_UNDEFINED("TEST_OLD_SCM_TIMESTAMPS"
- " || HAVE_STRUCT___KERNEL_TIMESPEC"
- " || HAVE_STRUCT___KERNEL_SOCK_TIMEVAL")
+SKIP_MAIN_UNDEFINED("TEST_SCM_TIMESTAMPS")
#endif
diff --git a/tests-mx32/sockopt-timestamp.c b/tests-mx32/sockopt-timestamp.c
index 33e0c1a..50ab867 100644
--- a/tests-mx32/sockopt-timestamp.c
+++ b/tests-mx32/sockopt-timestamp.c
@@ -26,27 +26,23 @@
# include "xlat/sock_options.h"
#undef XLAT_MACROS_ONLY
-#undef TEST_OLD_SCM_TIMESTAMPS
+#undef TEST_SCM_TIMESTAMPS
/*
* Sadly, starting with commit
* glibc-2.33.9000-707-g13c51549e2077f2f3bf84e8fd0b46d8b0c615912, on every
* 32-bit architecture where 32-bit time_t support is enabled,
- * glibc mangles old scm timestamps.
+ * glibc mangles scm timestamps.
*/
#if GLIBC_PREREQ_GE(2, 33) && defined __TIMESIZE && __TIMESIZE != 64
-# define TEST_OLD_SCM_TIMESTAMPS 0
+# define TEST_SCM_TIMESTAMPS 0
#endif
-#ifndef TEST_OLD_SCM_TIMESTAMPS
-# define TEST_OLD_SCM_TIMESTAMPS 1
+#ifndef TEST_SCM_TIMESTAMPS
+# define TEST_SCM_TIMESTAMPS 1
#endif
-#if TEST_OLD_SCM_TIMESTAMPS \
- || defined HAVE_STRUCT___KERNEL_TIMESPEC \
- || defined HAVE_STRUCT___KERNEL_SOCK_TIMEVAL
-
-# if TEST_OLD_SCM_TIMESTAMPS
+#if TEST_SCM_TIMESTAMPS
static void
print_timestamp_old(const struct cmsghdr *c)
{
@@ -84,7 +80,6 @@ print_timestampns_old(const struct cmsghdr *c)
printf("{tv_sec=%lld, tv_nsec=%lld}",
(long long) ts.tv_sec, (long long) ts.tv_nsec);
}
-# endif /* TEST_OLD_SCM_TIMESTAMPS */
# ifdef HAVE_STRUCT___KERNEL_SOCK_TIMEVAL
static void
@@ -212,10 +207,8 @@ main(void)
const char *str;
void (*fun)(const struct cmsghdr *);
} tests[] = {
-# if TEST_OLD_SCM_TIMESTAMPS
{ SO_TIMESTAMP_OLD, "SO_TIMESTAMP_OLD", print_timestamp_old },
{ SO_TIMESTAMPNS_OLD, "SO_TIMESTAMPNS_OLD", print_timestampns_old },
-# endif
# ifdef HAVE_STRUCT___KERNEL_SOCK_TIMEVAL
{ SO_TIMESTAMP_NEW, "SO_TIMESTAMP_NEW", print_timestamp_new },
# endif
@@ -237,8 +230,6 @@ main(void)
#else
-SKIP_MAIN_UNDEFINED("TEST_OLD_SCM_TIMESTAMPS"
- " || HAVE_STRUCT___KERNEL_TIMESPEC"
- " || HAVE_STRUCT___KERNEL_SOCK_TIMEVAL")
+SKIP_MAIN_UNDEFINED("TEST_SCM_TIMESTAMPS")
#endif
--
2.1.4