Subject: [PATCH] tests: avoid FP failure due to exhausted memory

From: Jim Meyering <[email-masked]>
Date: Sat, 21 Dec 2013 09:51:47 -0800

Some systems cannot read a 2GiB line into memory, and would cause a
new test to appear to fail.  Treat that as "SKIP" rather than "FAIL".
From c2731742fb9964f155c8d03ded8fac80d86b9ed8 Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email-masked]>
Date: Sat, 21 Dec 2013 09:49:44 -0800
Subject: [PATCH] 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.
---
 tests/long-line-vs-2GiB-read | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/long-line-vs-2GiB-read b/tests/long-line-vs-2GiB-read
index 773c542..29d29ec 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

-- 
1.8.5.rc2.6.gc6f1b92