summaryrefslogtreecommitdiff
path: root/tests/skip-device
Commit message (Collapse)AuthorAgeFilesLines
* tests: standardize on 10-second timeouts to avoid rare false failureJim Meyering2016-08-061-1/+1
| | | | | | | | | | | | | | In a parallel test run, it is not unusual to exceed a timeout of 1-3 seconds. Increase several from 3 or fewer to 10 seconds. * tests/skip-device: Increase timeout from 2 to 10 seconds. * tests/grep-dev-null-out: Likewise, but s/1/10/. * tests/pcre-invalid-utf8-input: Likewise, but s/3/10/. * tests/dfa-match: Likewise. * tests/pcre-invalid-utf8-infloop: Likewise. * tests/pcre-infloop: Likewise. * tests/max-count-overread: Likewise. * tests/invalid-multibyte-infloop: Likewise. Prompted by http://bugs.gnu.org/24159.
* grep: don't hang on command-line fifo if -D skipPaul Eggert2015-06-261-0/+5
| | | | | | | | | | | | | * NEWS: Document this. * src/grep.c (skip_devices): New function, with code taken from grepdirent. (grepdirent): Use it. Avoid an unnecessary initialization. (grepfile): If skipping devices, open files with O_NONBLOCK. Throw in O_NOCTTY while we're at it. (grepdesc): Skip devices here, too. Not only does this fix the bug, it fixes an unlikely race condition if some other process renames a device between fstatat and openat. * tests/skip-device: Add a test for this bug.
* grep: make GREP_OPTIONS obsolescentPaul Eggert2014-09-121-3/+0
| | | | | | | | | * NEWS: * doc/grep.in.1 (ENVIRONMENT_VARIABLES): * doc/grep.texi (Environment Variables): Document that GREP_OPTIONS is obsolescent now. * src/grep.c (main): Warn if GREP_OPTIONS is used. * tests/r-dot, tests/skip-device: Don't use GREP_OPTIONS.
* grep: fix --devices=ACTION (-D) so stdin is once again exemptJim Meyering2012-04-171-0/+14
An oversight in the 2.11 changes made it so "echo x|grep x" would fail for those who set GREP_OPTIONS=--devices=skip. * src/main.c (grepdesc): Ignore skip-related options when reading from standard input. * tests/skip-device: New file. Test for the above. * tests/Makefile.am (TESTS): Add it. * doc/grep.texi (File and Directory Selection): Clarify this point, documenting the stdin exemption. * NEWS (Bug fixes): Mention it, and add a few "[fixed in ...] notes. Reported by Tino Keitel in http://bugs.debian.org/669084, and forwarded to bug-grep by AnĂ­bal Monsalve Salazar.