summaryrefslogtreecommitdiff
path: root/gps
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-11-10 20:46:33 -0500
committerEric S. Raymond <esr@thyrsus.com>2013-11-10 20:46:33 -0500
commit26bcc5dd88d696ba68fde5a372a1e5aaa0057a0f (patch)
tree4ee15434ea74683b9a45c455881423e674c1709f /gps
parent528f255313f10d4d2600d8d6cdb094ae7a40d06b (diff)
downloadgpsd-26bcc5dd88d696ba68fde5a372a1e5aaa0057a0f.tar.gz
Reports on delays needed in the test framework.
Diffstat (limited to 'gps')
-rw-r--r--gps/fake.py22
1 files changed, 16 insertions, 6 deletions
diff --git a/gps/fake.py b/gps/fake.py
index a8c79145..56612e3b 100644
--- a/gps/fake.py
+++ b/gps/fake.py
@@ -76,15 +76,17 @@ import packet as sniffer
# they're too high you'll slow the tests down a lot. If they're too low
# you'll get random spurious regression failures that usually look
# like lines missing from the end of the test output relative to the
-# check file. These numbers might have to be adjusted upward on faster
-# machines. The need for them may be symptomatic of race conditions
+# check file. The need for them may be symptomatic of race conditions
# in the pty layer or elsewhere.
# Define a per-line delay on writes so we won't spam the buffers in
# the pty layer or gpsd itself. Removing this entirely was tried but
# caused failures under NetBSD. Values smaller than the system timer
# tick don't make any difference here.
-WRITE_PAD = 0.001
+#
+# Greg Troxel reported failure with 0.001, success with 0.004
+#
+WRITE_PAD = 0.004
# We delay briefly after a GPS source is exhausted before removing it.
# This should give its subscribers time to get gpsd's response before
@@ -92,9 +94,17 @@ WRITE_PAD = 0.001
# CLOSE_DELAY may have no effect; Python time.time() returns a float
# value, but it is not guaranteed by Python that the C implementation
# underneath will return with precision finer than 1 second. (Linux
-# and *BSD return full precision.) Dropping this to 0.1 has been
-# tried but caused failures.
-CLOSE_DELAY = 0.2
+# and *BSD return full precision.)
+#
+# Field reports:
+#
+# From Hal Murray on NetBSD 6.1.2 on an Intel(R) Celeron(R) CPU 2.80GHz
+# CLOSE_DELAY = 0.4 Works, takes 688.69 real
+# CLOSE_DELAY = 0.3 Fails tcp-torture.log, takes 677.53 real
+#
+# Greg Troxel reported failure with 0.4, success with 0.8
+#
+CLOSE_DELAY = 0.8
class TestLoadError(exceptions.Exception):
def __init__(self, msg):