diff options
author | Jim Meyering <meyering@fb.com> | 2022-07-09 20:46:45 -0700 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2022-07-09 20:46:45 -0700 |
commit | 0acc194ae1377a8b2a57b46dc121ac1b716245c2 (patch) | |
tree | 68ac760962abe51989642abb54ae844a6dc2856a | |
parent | aa8ca91c0810b1fe62cb4ff76621b352ac7a9e6e (diff) | |
download | grep-0acc194ae1377a8b2a57b46dc121ac1b716245c2.tar.gz |
tests: long-pattern-perf: avoid FP failure on unusual systems
* tests/long-pattern-perf: Skip this test whenever the base
case takes more than 800ms. See comment for details.
Reported by Bruno Haible in
https://lists.gnu.org/r/grep-devel/2022-07/msg00004.html
https://lists.gnu.org/r/grep-devel/2022-07/msg00006.html
-rwxr-xr-x | tests/long-pattern-perf | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/long-pattern-perf b/tests/long-pattern-perf index 25893e97..39ba63b7 100755 --- a/tests/long-pattern-perf +++ b/tests/long-pattern-perf @@ -35,6 +35,16 @@ mv r re || framework_failure_ returns_ 0 user_time_ 1 grep -f re in > base-ms \ || framework_failure_ 'failed to compute baseline timing' base_ms=$(cat base-ms) + +# This test caused trouble on at least two types of fringe hosts: those +# with very little memory (a 1.5GB RAM Solaris host) and a Linux/s390x +# (emulated with qemu-system-s390x). The former became unusable due to +# mem requirements of the 2nd test, and the latter ended up taking >35x +# more time than the base case. Skipping this test for any system using +# more than this many milliseconds for the first case should avoid those +# false-postitive failures while skipping the test on few other systems. +test 800 -lt "$base_ms" && skip_ "this base-case test took too long" + returns_ 0 user_time_ 1 grep -f re-10x in > b10x-ms \ || framework_failure_ 'failed to compute 10x timing' b10x_ms=$(cat b10x-ms) |