summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2013-12-21 09:49:44 -0800
committerJim Meyering <meyering@fb.com>2013-12-21 09:52:05 -0800
commit1a8b1b370eace41be892e9fef041f36b72baeefb (patch)
tree4b32a0ca66ae50ed984b7d4bb3543a83b65eab03 /tests
parentba7ecab408cc5beafb93ecde7a9528a08df5afeb (diff)
downloadgrep-1a8b1b370eace41be892e9fef041f36b72baeefb.tar.gz
tests: avoid FP failure due to exhausted memory
* tests/long-line-vs-2GiB-read: Don't declare the test "failed" when running out of memory. In that case, skip it.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/long-line-vs-2GiB-read3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/long-line-vs-2GiB-read b/tests/long-line-vs-2GiB-read
index 773c542d..29d29ec9 100755
--- a/tests/long-line-vs-2GiB-read
+++ b/tests/long-line-vs-2GiB-read
@@ -16,6 +16,9 @@ dd bs=$MiB seek=2048 of=big < /dev/null || framework_failure_
echo x >> big || framework_failure_
grep -l x big > out 2> err || fail=1
+# Not everyone has 2GB of memory free.
+grep '^grep: memory exhausted$' err && skip_ 'memory exhausted'
+
compare exp out || fail=1
compare /dev/null err || fail=1