Merge branch 'core-updates'
[jackhill/guix/guix.git] / gnu / packages / patches / coreutils-cut-huge-range-test.patch
1 This patch fixes 100% reproducible test failures on arm-linux-gnueabihf in our
2 the build environment chroot, as reported at <https://bugs.gnu.org/26253>,
3 and now on x86_64-linux-gnu as well. It is a variant of this upstream patch:
4
5 commit f5422009389678680dba9ff4ecb7d33632ee3383
6 Author: Ludovic Courtès <ludo@gnu.org>
7 Date: Mon Mar 27 20:34:39 2017 -0700
8
9 tests: avoid false ulimit failure on some systems
10
11 * tests/misc/cut-huge-range.sh: On some systems returns_ may
12 use more memory, so incorporate that in the determination
13 of the ulimit value to use. Noticed on ARMv7 with bash-4.4.12,
14 and x86_64 with bash-4.2.37.
15 Fixes http://bugs.gnu.org/26253
16
17 ... which appeared to be insufficient.
18
19 diff --git a/tests/misc/cut-huge-range.sh b/tests/misc/cut-huge-range.sh
20 index 6b3c5b6ed..55b7b640e 100755
21 --- a/tests/misc/cut-huge-range.sh
22 +++ b/tests/misc/cut-huge-range.sh
23 @@ -20,9 +20,9 @@
24 print_ver_ cut
25 getlimits_
26
27 -vm=$(get_min_ulimit_v_ cut -b1 /dev/null) \
28 +vm=$(get_min_ulimit_v_ sh -c 'cut -b1 /dev/null') \
29 || skip_ "this shell lacks ulimit support"
30 vm=$(($vm + 1000)) # avoid spurious failures
31
32 # sed script to subtract one from the input.
33 # Each input line should consist of a positive decimal number.