]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: adjust sort-continue not to fail under valgrind
authorJim Meyering <meyering@redhat.com>
Tue, 17 Mar 2009 20:23:51 +0000 (21:23 +0100)
committerJim Meyering <meyering@redhat.com>
Wed, 18 Mar 2009 20:44:45 +0000 (21:44 +0100)
* 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.

tests/misc/sort-continue

index b1031fac347831491e8ca0b002072a72f15378bb..1b0ef431c837db6d3256fce31596d3df47be646e 100755 (executable)
@@ -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; }