guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: gawk: Protect against random failures of the 'fts' test.


From: Ludovic Courtès
Subject: 01/01: gnu: gawk: Protect against random failures of the 'fts' test.
Date: Thu, 14 Jan 2016 09:44:09 +0000

civodul pushed a commit to branch core-updates
in repository guix.

commit 76002e54f2280f5a6416438c513aab14ecddb138
Author: Ludovic Courtès <address@hidden>
Date:   Thu Jan 14 10:42:08 2016 +0100

    gnu: gawk: Protect against random failures of the 'fts' test.
    
    * gnu/packages/patches/gawk-fts-test.patch: New file.
    * gnu/packages/gawk.scm (gawk)[source]: Use it.
    * gnu-system.am (dist_patch_DATA): Add it.
---
 gnu-system.am                            |    1 +
 gnu/packages/gawk.scm                    |    6 ++-
 gnu/packages/patches/gawk-fts-test.patch |   51 ++++++++++++++++++++++++++++++
 3 files changed, 56 insertions(+), 2 deletions(-)

diff --git a/gnu-system.am b/gnu-system.am
index 0ce1a3f..3eb01c3 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -467,6 +467,7 @@ dist_patch_DATA =                                           
\
   gnu/packages/patches/flint-ldconfig.patch                    \
   gnu/packages/patches/fltk-shared-lib-defines.patch           \
   gnu/packages/patches/freeimage-CVE-2015-0852.patch           \
+  gnu/packages/patches/gawk-fts-test.patch                     \
   gnu/packages/patches/gawk-shell.patch                                \
   gnu/packages/patches/gcc-arm-link-spec-fix.patch             \
   gnu/packages/patches/gcc-cross-environment-variables.patch   \
diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm
index 6bfea34..8f2805c 100644
--- a/gnu/packages/gawk.scm
+++ b/gnu/packages/gawk.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <address@hidden>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <address@hidden>
 ;;; Copyright © 2014, 2015 Mark H Weaver <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -19,6 +19,7 @@
 
 (define-module (gnu packages gawk)
   #:use-module (guix licenses)
+  #:use-module (gnu packages)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages libsigsegv)
   #:use-module (guix packages)
@@ -34,7 +35,8 @@
             (uri (string-append "mirror://gnu/gawk/gawk-" version
                                 ".tar.xz"))
             (sha256
-             (base32 "09d6pmx6h3i2glafm0jd1v1iyrs03vcyv2rkz12jisii3vlmbkz3"))))
+             (base32 "09d6pmx6h3i2glafm0jd1v1iyrs03vcyv2rkz12jisii3vlmbkz3"))
+            (patches (list (search-patch "gawk-fts-test.patch")))))
    (build-system gnu-build-system)
    (arguments
     `(#:parallel-tests? #f                ; test suite fails in parallel
diff --git a/gnu/packages/patches/gawk-fts-test.patch 
b/gnu/packages/patches/gawk-fts-test.patch
new file mode 100644
index 0000000..de1f5c4
--- /dev/null
+++ b/gnu/packages/patches/gawk-fts-test.patch
@@ -0,0 +1,51 @@
+This is upstream commit c9a018c.  We have observed random failures of
+this test on i686 that seem related to load.
+
+2015-05-21         Arnold D. Robbins     <address@hidden>
+
+       * fts.awk: Really remove atime from the output. 
+       This avoids spurious failures on heavily loaded systems.
+
+diff --git a/test/fts.awk b/test/fts.awk
+index b1df060..dea5b68 100644
+--- a/test/fts.awk
++++ b/test/fts.awk
+@@ -50,6 +50,11 @@ function sort_traverse(data,        sorted, i)
+ {
+       asorti(data, sorted)
+       for (i = 1; i in sorted; i++) {
++              # 5/2015: skip for atime, since there can
++              # occasionally be small differences.
++              if (sorted[i] == "atime")
++                      continue
++
+               indent()
+               printf("%s --> %s\n", sorted[i], data[sorted[i]]) > output
+       }
+@@ -63,17 +68,20 @@ function traverse(data,         i)
+                       printf("%s:\n", i) > output
+ 
+                       Level++
+-                      if (("mtime" in data[i]) && ! isarray(data[i][mtime])) {
++                      if (("mtime" in data[i]) && ! 
isarray(data[i]["mtime"])) {
+                               sort_traverse(data[i])
+                       } else {
+                               traverse(data[i])
+                       }
+                       Level--
+-              } else if (data[i] != "atime") {
+-                      # 4/2015: skip for atime, since there can
+-                      # occasionally be small differences.
+-                      indent()
+-                      printf("%s --> %s\n", i, data[i]) > output
++#             } else {
++#                     JUNK = 1
++#                     if (i != "atime") {
++#                             # 4/2015: skip for atime, since there can
++#                             # occasionally be small differences.
++#                             indent()
++#                             printf("%s --> %s\n", i, data[i]) > output
++#                     }
+               }
+       }
+ }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]