summaryrefslogtreecommitdiff
path: root/tests/misc/sort-continue
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-03-17 21:23:51 +0100
committerJim Meyering <meyering@redhat.com>2009-03-18 21:44:45 +0100
commit5b86dc69d7160b6422b02c8cfb909734275c2faa (patch)
tree15a793c2b034414490f52ce7f02e79290ce3916a /tests/misc/sort-continue
parentf31ea18146a686d1ce838a9b6e6785cbfae35bbf (diff)
downloadcoreutils-5b86dc69d7160b6422b02c8cfb909734275c2faa.tar.xz
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.
Diffstat (limited to 'tests/misc/sort-continue')
-rwxr-xr-xtests/misc/sort-continue6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/misc/sort-continue b/tests/misc/sort-continue
index b1031fac3..1b0ef431c 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; }