From: Jim Meyering Date: Tue, 17 Mar 2009 20:23:51 +0000 (+0100) Subject: tests: adjust sort-continue not to fail under valgrind X-Git-Tag: v7.2~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5b86dc69d7160b6422b02c8cfb909734275c2faa;p=thirdparty%2Fcoreutils.git tests: adjust sort-continue not to fail under valgrind * tests/misc/sort-continue: Don't run cat inside fd-limited shell. If sort fails to run in an fd-limited shell, skip the test. --- diff --git a/tests/misc/sort-continue b/tests/misc/sort-continue index b1031fac34..1b0ef431c8 100755 --- a/tests/misc/sort-continue +++ b/tests/misc/sort-continue @@ -23,6 +23,10 @@ fi . $srcdir/test-lib.sh +# Skip the test when running under valgrind. +( ulimit -n 6; sort < /dev/null ) \ + || skip_test_ 'fd-limited sort failed; are you running under valgrind?' + for i in $(seq 31); do echo $i | tee -a in > __test.$i || framework_failure done @@ -40,7 +44,7 @@ echo 32 | tee -a in > in1 ( ulimit -n 6 exec 3<&- 4<&- 5<&- - cat in1 | sort -n -m __test.* - > out + sort -n -m __test.* - < in1 > out ) && compare in out || { fail=1; echo 'stdin not handled properly' 1>&2; }