diff options
author | Sune Vuorela <debian@pusling.com> | 2007-08-09 10:19:33 +0000 |
---|---|---|
committer | Sune Vuorela <debian@pusling.com> | 2007-08-09 10:19:33 +0000 |
commit | 3436d24fb4c71be71e1e3eeafe20ee931ea44aa6 (patch) | |
tree | ba7cb8aa666bd4ad5ddf1a99d5c7da4c2aa27203 | |
parent | ff07f00bf37b16a834d5e5dec1d052a3e622a306 (diff) | |
download | qt4-x11-3436d24fb4c71be71e1e3eeafe20ee931ea44aa6.tar.gz |
add a test for broken hppa getdents
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/readdir-hppa-test.c | 25 | ||||
-rwxr-xr-x | debian/rules | 16 |
3 files changed, 47 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 0334da9..5180a12 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ qt4-x11 (4.3.1-1) unstable; urgency=low + [ Fathi Boudra ] * New upstream release. * Switch to quilt patch system. * Update copyright. Add Trolltech GPL Exception. @@ -17,7 +18,11 @@ qt4-x11 (4.3.1-1) unstable; urgency=low * Disable 0172-prefer-xrandr-over-xinerama patch. (Closes: #433931) * Enable 0182-argb-visuals-default patch. - -- Fathi Boudra <fboudra@free.fr> Wed, 08 Aug 2007 15:08:11 +0200 + [ Sune Vuorela ] + * Add a quick and dirty test to make build on hppa fail if a current + getdents kernel bug is detected. + + -- Sune Vuorela <debian@pusling.com> Thu, 09 Aug 2007 12:17:01 +0200 qt4-x11 (4.3.0-5) unstable; urgency=low diff --git a/debian/readdir-hppa-test.c b/debian/readdir-hppa-test.c new file mode 100644 index 0000000..eb893ba --- /dev/null +++ b/debian/readdir-hppa-test.c @@ -0,0 +1,25 @@ +#include <sys/types.h> +#include <dirent.h> +#include <errno.h> +#include <stdio.h> + +main() { + int return_code; + DIR *dir; + struct dirent entry; + struct dirent *result; + + if ((dir = opendir(".")) == NULL) + perror("opendir() error"); + else { + // puts("contents of .:"); + for (return_code = readdir_r(dir, &entry, &result); + result != NULL && return_code == 0; + return_code = readdir_r(dir, &entry, &result)) + printf("%s\n", entry.d_name); + if (return_code != 0) + perror("readdir_r() error"); + closedir(dir); + } +} + diff --git a/debian/rules b/debian/rules index b4ce4a9..512c237 100755 --- a/debian/rules +++ b/debian/rules @@ -36,6 +36,19 @@ else endif common-configure-arch:: +ifeq ($(DEB_HOST_ARCH),hppa) + mkdir -p debian/hppa-tmp + echo "Testing wether getdents kernel bug is present on this buildd - see #433768" + gcc -o debian/hppa-tmp/hppa-test-program debian/readdir-hppa-test.c + cd $(CURDIR)/doc/html && $(CURDIR)/debian/hppa-tmp/hppa-test-program | sort > $(CURDIR)/debian/hppa-tmp/readdir_r-out + cd $(CURDIR)/doc/html && ls -a | sort > $(CURDIR)/debian/hppa-tmp/ls-a-out + @if ! diff -q $(CURDIR)/debian/hppa-tmp/readdir_r-out $(CURDIR)/debian/hppa-tmp/ls-a-out ; \ + then \ + echo "Kernel bug present. This will misbuild qt4 if proceeding. Failing" ; \ + echo "Please update kernel and test again" ; \ + exit 5 ; \ + fi +endif # Create mkspecs/glibc-g++ from mkspecs/linux-g++, needed by GNU/kFreeBSD # we cannot use directly linux-g++ due to src/corelib/io/io.pri rm -rf mkspecs/glibc-g++ @@ -94,6 +107,9 @@ clean:: rm -rf lib/ plugins/ mkspecs/glibc-g++ + #cleaning up after hppa tests + rm -rf debian/hppa-tmp + find bin/ config.tests/ qmake/ -exec file {} \; | grep ELF | sed 's/:.*//' | xargs rm -f find include/ -type l -print0 | xargs -0r rm -f |