Last change
on this file since 3630 was 3529, checked in by bird, 3 years ago |
Imported grep 3.7 from grep-3.7.tar.gz (sha256: c22b0cf2d4f6bbe599c902387e8058990e1eee99aef333a203829e5fd3dbb342), applying minimal auto-props.
|
-
Property svn:executable
set to
*
|
File size:
670 bytes
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | # Ensure that grep can handle lines 2GiB long.
|
---|
3 | # Before grep-2.16, a line of length 2^31 or greater would provoke
|
---|
4 | # an "Invalid argument" (EINVAL) failure from the read syscall on
|
---|
5 | # systems like OS/X 10.8.5.
|
---|
6 |
|
---|
7 | . "${srcdir=.}/init.sh"; path_prepend_ ../src
|
---|
8 |
|
---|
9 | # Searching 2GiB takes a while.
|
---|
10 | expensive_
|
---|
11 |
|
---|
12 | echo big > exp || framework_failure_
|
---|
13 |
|
---|
14 | MiB=1048576
|
---|
15 | dd bs=$MiB seek=2048 of=big < /dev/null || framework_failure_
|
---|
16 | echo x >> big || framework_failure_
|
---|
17 | grep -l x big > out 2> err || fail=1
|
---|
18 |
|
---|
19 | # Not everyone has 2GB of memory free.
|
---|
20 | grep '^grep: memory exhausted$' err && skip_ 'memory exhausted'
|
---|
21 |
|
---|
22 | compare exp out || fail=1
|
---|
23 | compare /dev/null err || fail=1
|
---|
24 |
|
---|
25 | Exit $fail
|
---|
Note:
See
TracBrowser
for help on using the repository browser.