From 820186434ae33fee3953c8e74f111c45d6779192 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 9 Nov 2016 14:46:26 +0100 Subject: [PATCH] guile: Fix random test failure Also, let's try parallel building again. Seems to work on several tries. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24769#12 http://hydra.nixos.org/build/43385084 --- .../interpreters/guile/default.nix | 8 ++-- .../interpreters/guile/fix-test.patch | 38 +++++++++++++++++++ 2 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 pkgs/development/interpreters/guile/fix-test.patch diff --git a/pkgs/development/interpreters/guile/default.nix b/pkgs/development/interpreters/guile/default.nix index 97f8f61a98e..391885a4404 100644 --- a/pkgs/development/interpreters/guile/default.nix +++ b/pkgs/development/interpreters/guile/default.nix @@ -16,8 +16,8 @@ nativeBuildInputs = [ makeWrapper gawk pkgconfig ]; buildInputs = [ readline libtool libunistring libffi ]; - propagatedBuildInputs = [ gmp boehmgc ] + propagatedBuildInputs = [ gmp boehmgc ] # XXX: These ones aren't normally needed here, but since # `libguile-2.0.la' reads `-lltdl -lunistring', adding them here will add # the needed `-L' flags. As for why the `.la' file lacks the `-L' flags, @@ -27,11 +27,9 @@ # A native Guile 2.0 is needed to cross-build Guile. selfNativeBuildInput = true; - # Guile 2.0.11 repeatable fails with 8-core parallel building because - # libguile/vm-i-system.i is not created in time - enableParallelBuilding = false; + enableParallelBuilding = true; - patches = [ ./disable-gc-sensitive-tests.patch ./eai_system.patch ./clang.patch ] ++ + patches = [ ./disable-gc-sensitive-tests.patch ./eai_system.patch ./clang.patch ./fix-test.patch ] ++ (stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch); # Explicitly link against libgcc_s, to work around the infamous diff --git a/pkgs/development/interpreters/guile/fix-test.patch b/pkgs/development/interpreters/guile/fix-test.patch new file mode 100644 index 00000000000..91bfa822b9e --- /dev/null +++ b/pkgs/development/interpreters/guile/fix-test.patch @@ -0,0 +1,38 @@ +From 2fbde7f02adb8c6585e9baf6e293ee49cd23d4c4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= +Date: Fri, 4 Nov 2016 22:45:51 +0100 +Subject: tests: Avoid race condition in REPL server test. + +Fixes . +Reported by Rob Browning . + +* test-suite/tests/00-repl-server.test ("simple expression"): Add call +to 'select' before 'display'. +--- + test-suite/tests/00-repl-server.test | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/test-suite/tests/00-repl-server.test b/test-suite/tests/00-repl-server.test +index 1f570a9..4b5ec0c 100644 +--- a/test-suite/tests/00-repl-server.test ++++ b/test-suite/tests/00-repl-server.test +@@ -105,8 +105,14 @@ reached." + "scheme@(repl-server)> $1 = 42\n" + (with-repl-server socket + (read-until-prompt socket %last-line-before-prompt) +- (display "(+ 40 2)\n(quit)\n" socket) +- (read-string socket))) ++ ++ ;; Wait until 'repl-reader' in boot-9 has written the prompt. ++ ;; Otherwise, if we write too quickly, 'repl-reader' checks for ++ ;; 'char-ready?' and doesn't print the prompt. ++ (match (select (list socket) '() (list socket) 3) ++ (((_) () ()) ++ (display "(+ 40 2)\n(quit)\n" socket) ++ (read-string socket))))) + + (pass-if "HTTP inter-protocol attack" ;CVE-2016-8606 + (with-repl-server socket +-- +cgit v1.0 +