From d8e58323922ebb0b08fdcf92ee5cbe8abbc38c7f Mon Sep 17 00:00:00 2001 From: Benjamin Kaduk Date: Fri, 16 Dec 2016 00:08:27 -0500 Subject: [PATCH] Work on fixing test failures on !amd64 One is reproducible on i386, and the result of an extra sizeof() in a loop boundary condition, so it stops at sizeof(size_t) rather than the size of the array (8). The other only appears on the buildds for some more exotic architectures, so run that test verbosely and see if we can get enough information to track things down. --- debian/changelog | 9 +++++++ ...0006-softsig-helper-fix-signame-loop.patch | 25 +++++++++++++++++++ .../patches/0007-Run-jhash-t-verbosely.patch | 23 +++++++++++++++++ ...re-raise-the-signal-instead-of-exiti.patch | 8 ++---- debian/patches/series | 2 ++ ...g-t-Avoid-hanging-due-to-intermediat.patch | 6 +---- 6 files changed, 62 insertions(+), 11 deletions(-) create mode 100644 debian/patches/0006-softsig-helper-fix-signame-loop.patch create mode 100644 debian/patches/0007-Run-jhash-t-verbosely.patch diff --git a/debian/changelog b/debian/changelog index 8d41f50cb..091709c27 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +openafs (1.8.0~pre1-4) UNRELEASED; urgency=medium + + * debian/patches/0006-softsig-helper-fix-signame-loop.patch + Fix test failures on 32-bit architectures. + * debian/patches/0007-Run-jhash-t-verbosely.patch + Provide more output from failing tests. + + -- Benjamin Kaduk Thu, 15 Dec 2016 23:48:00 -0500 + openafs (1.8.0~pre1-3) experimental; urgency=medium * Replace hard-coded x86_64-linux-gnu with DEB_HOST_MULTIARCH. diff --git a/debian/patches/0006-softsig-helper-fix-signame-loop.patch b/debian/patches/0006-softsig-helper-fix-signame-loop.patch new file mode 100644 index 000000000..7eaca13bb --- /dev/null +++ b/debian/patches/0006-softsig-helper-fix-signame-loop.patch @@ -0,0 +1,25 @@ +From: Benjamin Kaduk +Date: Thu, 15 Dec 2016 22:29:41 -0600 +Subject: softsig-helper: fix signame() loop + +We want to iterate through the length of the array, not whatever +sizeof() happens to evaluate to. + +Change-Id: I5d939e241e848ed800524d5f501e0504d2b0b42d +--- + tests/opr/softsig-helper.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/opr/softsig-helper.c b/tests/opr/softsig-helper.c +index 91fa351..416f07c 100644 +--- a/tests/opr/softsig-helper.c ++++ b/tests/opr/softsig-helper.c +@@ -55,7 +55,7 @@ static struct sigtable { + static char *signame(int signo) { + int i; + +- for (i = 0; i < sizeof(sizeof(sigtable) / sizeof(sigtable[0])); ++i) { ++ for (i = 0; i < sizeof(sigtable) / sizeof(sigtable[0]); ++i) { + if (sigtable[i].signo == signo) { + return sigtable[i].name; + } diff --git a/debian/patches/0007-Run-jhash-t-verbosely.patch b/debian/patches/0007-Run-jhash-t-verbosely.patch new file mode 100644 index 000000000..43a1746e2 --- /dev/null +++ b/debian/patches/0007-Run-jhash-t-verbosely.patch @@ -0,0 +1,23 @@ +From: Benjamin Kaduk +Date: Thu, 15 Dec 2016 23:46:09 -0500 +Subject: Run jhash-t verbosely + +It's failing on several buildds and we need more information to +debug why. +--- + tests/Makefile.in | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/Makefile.in b/tests/Makefile.in +index 23f1fa0..0e01fcb 100644 +--- a/tests/Makefile.in ++++ b/tests/Makefile.in +@@ -23,6 +23,8 @@ runtests.o: $(srcdir)/runtests.c + check test tests: runtests + @for A in $(SUBDIRS); do cd $$A && $(MAKE) $@ && cd .. || exit 1; done + MAKECHECK=1 ./libwrap @TOP_OBJDIR@/lib \ ++ ./runtests -o $(abs_top_srcdir)/tests/opr/jhash ++ MAKECHECK=1 ./libwrap @TOP_OBJDIR@/lib \ + ./runtests $(abs_top_srcdir)/tests/TESTS + + install: diff --git a/debian/patches/opr-ExitHandler-re-raise-the-signal-instead-of-exiti.patch b/debian/patches/opr-ExitHandler-re-raise-the-signal-instead-of-exiti.patch index 5d9d18958..f006c2d0d 100644 --- a/debian/patches/opr-ExitHandler-re-raise-the-signal-instead-of-exiti.patch +++ b/debian/patches/opr-ExitHandler-re-raise-the-signal-instead-of-exiti.patch @@ -1,10 +1,9 @@ -From d0ce961499d72768168a98c9321c80943b9a3c75 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 14 Dec 2016 17:52:35 -0500 Subject: opr: ExitHandler: re-raise the signal instead of exiting with that code MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 +Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit This fixes a ‘make check’ failure introduced by commit @@ -38,7 +37,7 @@ Change-Id: I022965ea2b5440486ea1cf562551d3bbd0516104 1 file changed, 7 insertions(+) diff --git a/src/opr/softsig.c b/src/opr/softsig.c -index 4a210ad65..469bd43e1 100644 +index 4a210ad..469bd43 100644 --- a/src/opr/softsig.c +++ b/src/opr/softsig.c @@ -82,6 +82,13 @@ signalHandler(void *arg) @@ -55,6 +54,3 @@ index 4a210ad65..469bd43e1 100644 exit(signal); } --- -2.11.0 - diff --git a/debian/patches/series b/debian/patches/series index 50234c541..5042c1166 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,5 @@ 0003-Catch-up-to-roken-s-rename-of-base64-symbols.patch tests-opr-softsig-t-Avoid-hanging-due-to-intermediat.patch opr-ExitHandler-re-raise-the-signal-instead-of-exiti.patch +0006-softsig-helper-fix-signame-loop.patch +0007-Run-jhash-t-verbosely.patch diff --git a/debian/patches/tests-opr-softsig-t-Avoid-hanging-due-to-intermediat.patch b/debian/patches/tests-opr-softsig-t-Avoid-hanging-due-to-intermediat.patch index 471996dcd..90f8f3891 100644 --- a/debian/patches/tests-opr-softsig-t-Avoid-hanging-due-to-intermediat.patch +++ b/debian/patches/tests-opr-softsig-t-Avoid-hanging-due-to-intermediat.patch @@ -1,4 +1,3 @@ -From 62be24b3cc7ea4b422b9d89d791e8fb11e244a55 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 14 Dec 2016 15:47:21 -0500 Subject: tests/opr/softsig-t: Avoid hanging due to intermediate sh -c @@ -15,7 +14,7 @@ Change-Id: I054b9c8f606e197accb414bfe3f89719255c62c4 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/opr/softsig-t b/tests/opr/softsig-t -index 89e66e5df..533feb4fd 100755 +index 89e66e5..533feb4 100755 --- a/tests/opr/softsig-t +++ b/tests/opr/softsig-t @@ -33,8 +33,14 @@ use FindBin qw($Bin); @@ -53,6 +52,3 @@ index 89e66e5df..533feb4fd 100755 or die "Couldn't start test helper."; close(HELPER); is($? & 0x7f, $sigbus, "Helper exited on BUS signal."); --- -2.11.0 - -- 2.39.5