diff options
author | Jim Meyering <meyering@fb.com> | 2018-12-15 17:11:22 -0800 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2018-12-15 18:37:14 -0800 |
commit | 7eeab0689a72e8f2283531c61bd5edb7c19a7608 (patch) | |
tree | a42a4649a26952f6f199742f085601a6c08dbf51 /tests | |
parent | 853f1e432888402f4b37a19345c68e76036526bf (diff) | |
download | grep-7eeab0689a72e8f2283531c61bd5edb7c19a7608.tar.gz |
tests: stack-overflow: handle the case of success without the diagnostic
* tests/stack-overflow: Do not always require a stack
overflow diagnostic.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/stack-overflow | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/stack-overflow b/tests/stack-overflow index 69220455..492e959c 100755 --- a/tests/stack-overflow +++ b/tests/stack-overflow @@ -22,4 +22,13 @@ for i in 1 3 5 10 20 30 40 50 100 200; do fi done +# If there was no stack overflow message and the final run exited with +# status 1 and both stdout and stderr were empty, then assume it's a working +# regex that avoids the internal stack overflow problem like glibc's regexp +# used to. +test $st = 1 \ + && ! test -s out \ + && ! test -s err \ + && Exit 0 + fail_ 'grep never printed "stack overflow"' |