[glibc] 02/02: testsuite-xfail-debian.mk: update for kfreebsd.
This is an automated email from the git hooks/post-receive script.
aurel32 pushed a commit to branch glibc-2.25
in repository glibc.
commit 4884de07bfab565ac2af07ac04e346cb438691b1
Author: Aurelien Jarno <aurelien@aurel32.net>
Date: Mon Aug 14 02:33:29 2017 +0200
testsuite-xfail-debian.mk: update for kfreebsd.
---
debian/patches/any/submitted-resolv-unaligned.diff | 97 ++++++++++++++++++++++
debian/testsuite-xfail-debian.mk | 21 +++++
2 files changed, 118 insertions(+)
diff --git a/debian/patches/any/submitted-resolv-unaligned.diff b/debian/patches/any/submitted-resolv-unaligned.diff
new file mode 100644
index 0000000..a9fc705
--- /dev/null
+++ b/debian/patches/any/submitted-resolv-unaligned.diff
@@ -0,0 +1,97 @@
+diff --git a/resolv/res_mkquery.c b/resolv/res_mkquery.c
+index d80b5318e5..99d7d96027 100644
+--- a/resolv/res_mkquery.c
++++ b/resolv/res_mkquery.c
+@@ -83,6 +83,15 @@
+ # define RANDOM_BITS(Var) { uint64_t v64; HP_TIMING_NOW (v64); Var = v64; }
+ #endif
+
++/* The structure HEADER is normally aligned to a word boundary and its
++ fields are accessed using word loads and stores. We need to access
++ this structure when it is aligned on a byte boundary. This can cause
++ problems on machines with strict alignment. So, we create a new
++ typedef to reduce its alignment to one. This ensures the fields are
++ accessed with byte loads and stores. */
++typedef HEADER __attribute__ ((__aligned__(1))) UHEADER;
++#define HEADER UHEADER
++
+ /*
+ * Form all types of queries.
+ * Returns the size of the result or -1.
+diff --git a/resolv/res_query.c b/resolv/res_query.c
+index 07dc6f6583..f26338bc9b 100644
+--- a/resolv/res_query.c
++++ b/resolv/res_query.c
+@@ -81,6 +81,14 @@
+ /* Options. Leave them on. */
+ /* #undef DEBUG */
+
++/* The structure HEADER is normally aligned to a word boundary and its
++ fields are accessed using word loads and stores. We need to access
++ this structure when it is aligned on a byte boundary. This can cause
++ problems on machines with strict alignment. So, we create a new
++ typedef to reduce its alignment to one. This ensures the fields are
++ accessed with byte loads and stores. */
++typedef HEADER __attribute__ ((__aligned__(1))) UHEADER;
++
+ #if PACKETSZ > 65536
+ #define MAXPACKET PACKETSZ
+ #else
+@@ -117,8 +125,8 @@ __libc_res_nquery(res_state statp,
+ int *resplen2,
+ int *answerp2_malloced)
+ {
+- HEADER *hp = (HEADER *) answer;
+- HEADER *hp2;
++ UHEADER *hp = (UHEADER *) answer;
++ UHEADER *hp2;
+ int n, use_malloc = 0;
+ u_int oflags = statp->_flags;
+
+@@ -235,7 +243,7 @@ __libc_res_nquery(res_state statp,
+
+ if (answerp != NULL)
+ /* __libc_res_nsend might have reallocated the buffer. */
+- hp = (HEADER *) *answerp;
++ hp = (UHEADER *) *answerp;
+
+ /* We simplify the following tests by assigning HP to HP2 or
+ vice versa. It is easy to verify that this is the same as
+@@ -246,7 +254,7 @@ __libc_res_nquery(res_state statp,
+ }
+ else
+ {
+- hp2 = (HEADER *) *answerp2;
++ hp2 = (UHEADER *) *answerp2;
+ if (n < (int) sizeof (HEADER))
+ {
+ hp = hp2;
+@@ -336,7 +344,7 @@ __libc_res_nsearch(res_state statp,
+ int *answerp2_malloced)
+ {
+ const char *cp, * const *domain;
+- HEADER *hp = (HEADER *) answer;
++ UHEADER *hp = (UHEADER *) answer;
+ char tmp[NS_MAXDNAME];
+ u_int dots;
+ int trailing_dot, ret, saved_herrno;
+diff --git a/resolv/res_send.c b/resolv/res_send.c
+index 93db5b9a61..36a389509d 100644
+--- a/resolv/res_send.c
++++ b/resolv/res_send.c
+@@ -110,6 +110,15 @@
+ #include <kernel-features.h>
+ #include <libc-internal.h>
+
++/* The structure HEADER is normally aligned to a word boundary and its
++ fields are accessed using word loads and stores. We need to access
++ this structure when it is aligned on a byte boundary. This can cause
++ problems on machines with strict alignment. So, we create a new
++ typedef to reduce its alignment to one. This ensures the fields are
++ accessed with byte loads and stores. */
++typedef HEADER __attribute__ ((__aligned__(1))) UHEADER;
++#define HEADER UHEADER
++
+ #if PACKETSZ > 65536
+ #define MAXPACKET PACKETSZ
+ #else
diff --git a/debian/testsuite-xfail-debian.mk b/debian/testsuite-xfail-debian.mk
index 1105439..9d6f640 100644
--- a/debian/testsuite-xfail-debian.mk
+++ b/debian/testsuite-xfail-debian.mk
@@ -1033,6 +1033,19 @@ test-xfail-XPG4/unistd.h/conform = yes
test-xfail-XPG4/utime.h/conform = yes
test-xfail-XPG4/utmpx.h/conform = yes
+# Most of these failures are due to headers provided by kfreebsd-kernel-headers
+test-xfail-check-installed-headers-c = yes
+test-xfail-check-installed-headers-c = yes
+test-xfail-check-installed-headers-cxx = yes
+test-xfail-check-installed-headers-c = yes
+test-xfail-check-installed-headers-cxx = yes
+test-xfail-check-installed-headers-c = yes
+test-xfail-check-installed-headers-c = yes
+test-xfail-check-installed-headers-c = yes
+test-xfail-check-installed-headers-cxx = yes
+test-xfail-check-installed-headers-c = yes
+test-xfail-check-installed-headers-cxx = yes
+
# will expectedly SIGSEGV on kfreebsd 10.0 and later, due to having
# nxstack=1 by default (bug #762404)
test-xfail-tst-execstack = yes
@@ -1046,6 +1059,8 @@ endif
######################################################################
ifeq ($(config-machine)-$(config-os),x86_64-kfreebsd-gnu)
test-xfail-check-local-headers = yes
+test-xfail-test-sysvsem = yes
+test-xfail-test-sysvshm = yes
test-xfail-tst-aio10 = yes
test-xfail-tst-aio9 = yes
test-xfail-tst-attr2 = yes
@@ -1060,6 +1075,8 @@ test-xfail-tst-renameat = yes
test-xfail-tst-setcontext2 = yes
test-xfail-tst-shm = yes
test-xfail-tst-spawn2 = yes
+test-xfail-tst-spawn3 = yes
+test-xfail-tst-udp-error = yes
test-xfail-tst-waitid = yes
test-xfail-tst-writev = yes
endif
@@ -1070,6 +1087,8 @@ endif
######################################################################
ifeq ($(config-machine)-$(config-os),i686-kfreebsd-gnu)
test-xfail-check-local-headers = yes
+test-xfail-test-sysvsem = yes
+test-xfail-test-sysvshm = yes
test-xfail-tst-aio10 = yes
test-xfail-tst-aio9 = yes
test-xfail-tst-attr2 = yes
@@ -1085,6 +1104,8 @@ test-xfail-tst-renameat = yes
test-xfail-tst-setcontext2 = yes
test-xfail-tst-shm = yes
test-xfail-tst-spawn2 = yes
+test-xfail-tst-spawn3 = yes
+test-xfail-tst-udp-error = yes
test-xfail-tst-waitid = yes
endif
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-glibc/glibc.git
Reply to: