summaryrefslogtreecommitdiff
path: root/gps
Commit message (Collapse)AuthorAgeFilesLines
* Makes gpsfake -T take -S into account.Fred Wright2016-03-031-8/+13
| | | | | | | | | | | | | | | | | | | | This makes it possible to view the "slow" as well as the normal WRITE_PAD values with gpsfake -T, without having to look at the source code. It adds a new GetDelay() function to fake.py, which returns the proper delay value, taking into account both the possible environment variable and the "slow" option. This is now used for all hree uses of WRITE_PAD. Because the environment override is now part of the function, the WRITE_PAD constant is no longer modified by the environment value, but instead reflects the platform default. TESTED: Ran the full set of regression tests, with both default and acceptably shortened WRITE_PAD. Also verified that a zero value causes trouble (OSX), and that adding -S to the zero value makes it work. Signed-off-by: Jon Schlueter <jon.schlueter@gmail.com>
* Eliminates spurious gpsd errors with gpsfake in TCP mode.Fred Wright2016-02-291-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depending on timing, in TCP mode, gpsd may try to reconnect to fake.py between the time that the logfile is complete and the time that the remove_device is issued. With no listener, this results in a set of three error messages from gpsd. They don't affect the test outcome, since they only go to stderr and the "real" output is complete, but they're annoying to the user. The likelihood of this happening increases with longer logfiles and with larger WRITE_PAD values. With a 30ms WRITE_PAD (the default on OSX), most logfiles exhibit this on all platforms, though it's not seen on Linux with the default zero WRITE_PAD. The fix is simply to avoid closing the listener after accepting the incoming connection. It's not necessary to explicitly service the listener further, since the OS listen queue is sufficient to accept the additional connection. Closing the listener at drain time is almost acceptable, but still occasionally fails due to the fact that drain() is (necessarily) called before remove_device(). Not explicitly closing it at all is acceptable, since Python closes it as part of the object cleanup. TESTED: Ran regress-driver in TCP mode with a 30ms WRITE_PAD on all logfiles on three versions of OSX, as well as Linux, FreeBSD, and OpenBSD, both with and without the fix. Observed spurious errors in all cases without the fix, and no cases with the fix. Also verified that no dangling sockets were left at the end of the runs.
* Makes fake.py's TCP and UDP port assignments parallel-compatible.Fred Wright2016-02-291-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | The current method for assigning ports uses a counter initialized to a constant. Although this works fine for multiple sessions managed by a single instance of fake.py, it fails miserably when running multiple parallel instances of fake.py. The fix is to allow the OS to assign the port numbers, since it's guaranteed to pick unused ports. In the TCP case, this is simply a matter of specifying 0 as the port, and then extracting the actual assigned port number with getsockname(). In the UDP case, it's more complicated since the port number being picked is actually for *gpsd's* end, which can't be done in a straightforward manner. The workaround, which was already being used to pick the control-socket port for gpsd, is to bind a socket with a reusable address, close it, and then assume that the port will remain available until gpsd grabs it. This change turns the existing code to do that into a function, with the socket type now being specifiable. TESTED: Ran all daemon tests in both TCP and UDP modes, on three versions of OSX as well as Linux, FreeBSD, and OpenBSD. Used default WRITE_PAD values except on OSX, where it was reduced to 1ms to save time. Signed-off-by: Jon Schlueter <jon.schlueter@gmail.com>
* [pep8] cleanup in gps/gps.py and misc.pyJon Schlueter2016-02-092-30/+35
|
* [pep8] cleanup of gps/fake.py for readablityJon Schlueter2016-02-091-20/+19
|
* [pep8] autopep8 whitespace cleanupJon Schlueter2016-02-094-10/+67
| | | | | large scale autopep8 cleanup of several pep8 whitespace warnings
* Correct buggy detection of SBAS satellites in the Python client code.Eric S. Raymond2015-04-071-0/+4
| | | | | Before this fix, satellites from the Beidou or QZNSS wuld have been incirrectly displayed with the SBAS shape.
* pep8 whitespace and is not None cleanup in gps/client.pyJon Schlueter2015-03-131-20/+31
|
* splint/cppcheck/coverity prerelease cleanup.Eric S. Raymond2015-03-131-1/+1
|
* Fix pty permissions in fake.pyGary E. Miller2015-03-101-0/+2
| | | | | | | | When gpsfake is run as root, it may, depending on OS configuration, create the pty's with 600 permissions that gpsd can not later read. Make fake.py create all pty's permission 666. Solves the problem running scons check as root on Gentoo and OS X.
* Updare some documentation.Eric S. Raymond2015-02-151-9/+3
|
* The capability to set WRITE_PAD in the test frame was buggy.Eric S. Raymond2015-02-141-1/+1
| | | | No logic changes. All regression tests pass.
* Allow setting WRITE_PAD from the environment.Eric S. Raymond2015-02-141-3/+6
|
* Time out hangs in single-shot tests.Eric S. Raymond2015-02-141-1/+7
| | | | All regression tests pass.
* Change the way EOF is injected in hopes of beating a *BSD timing problem.Eric S. Raymond2015-02-111-4/+6
| | | | All regression tests pass.
* Improved instrumentation for tracking down test frame issues.Eric S. Raymond2015-02-101-2/+3
|
* Set FreeBSD WRITE_PAD to 0.01 in report from Hal Murray.Eric S. Raymond2015-02-101-2/+2
|
* Reinstate port-zero allocation magic for tests. All regression tests pass.Eric S. Raymond2015-02-091-6/+14
|
* CLOSE_DELAY is gone. Test source termination is now deterministic.Eric S. Raymond2015-02-091-69/+4
| | | | All regression tests pass.
* Revert to non-blocking I/O. Blocking I/O broke gps-makeregress.Eric S. Raymond2015-02-061-57/+42
| | | | | | | | | Regression tests pass with nonblocking I/O, but a regression test *rebuild* fails with timing errors. Much as we want a solution to the select-buzz problem, this change must go on hold until the root cause of the timing problems is found and fixed. Regression tests still pass.
* test timing: Reduce netbsd5 values.Greg Troxel2015-02-051-1/+2
|
* Clean up pre-blocking-IO tests, organize.Greg Troxel2015-02-031-23/+21
| | | | This commit has no semantic change, just housekeeping.
* Update netbsd5 timing data.Greg Troxel2015-02-031-0/+3
|
* Update os x timing data; shorten delay.Greg Troxel2015-02-031-9/+4
|
* More updates of test delays.Eric S. Raymond2015-02-031-9/+12
|
* Recheck delays for Raspberry Pi Model B.Michael Tatarinov2015-02-031-5/+4
|
* Add delay tests reported by Frank Nicholas.Eric S. Raymond2015-02-031-0/+4
|
* Update netbsd timing comments.Greg Troxel2015-02-031-5/+7
|
* In the test framework, use the bind-to-port-0 trick to get a random unused port.Eric S. Raymond2015-02-021-6/+14
| | | | | | This makes the -f option of gpsfake obsolete, and it has been removed. All regression tests pass.
* gpsfake delays are no longer becessary under Linux, and possibly not elsewhere.Eric S. Raymond2015-02-021-4/+3
| | | | All regression tests pass.
* More delay reduction.Eric S. Raymond2015-02-021-6/+3
| | | | All regression tests pass.
* Open ttys with CLOCAL, following a suggestion by Hal Murray.Eric S. Raymond2015-02-021-5/+7
| | | | | | Also, zero in on shorter delays in the regression tests. All regression tests pass.
* Change to using blocking I/O and VTIME.Eric S. Raymond2015-02-021-7/+11
| | | | | | | This addresses the buzzing-select problem, but the cost is that the GPS regression tests require longer delays and may hang if the delays are too short. All regression tests pass.
* Add netbsd6 regression timing data.Greg Troxel2015-01-291-1/+2
|
* Add netbsd5-specific gpsfake timing and comments.Greg Troxel2015-01-281-0/+14
| | | | | It seems NetBSD-5 has different behavior than 6. Add a new if branch for 5 with longer delays.
* Shorten OS X delays.Greg Troxel2015-01-281-3/+7
|
* Reduce OSX delay slightly, and add datapoint.Greg Troxel2015-01-281-1/+2
|
* gps/fake.py: Add more OSX test failure datapoints.Greg Troxel2015-01-271-1/+3
|
* Make delays super high on darwin.Greg Troxel2015-01-271-2/+2
|
* Regularize comments and add OS X case.Greg Troxel2015-01-251-4/+6
| | | | | This is a comment-only change. It notes that OS X regression tests fail, even with long times.
* Add delays for DarwinGreg Troxel2015-01-251-0/+9
|
* Add slow=yes option for regression tests in an attempt to avoid flakeouts.Eric S. Raymond2014-08-241-5/+15
|
* pylint validation pass. All regresio tests pass, xgps runs live.Eric S. Raymond2014-08-234-15/+14
|
* Another step towards eliminating delays in the test framework.Eric S. Raymond2013-11-271-2/+2
| | | | All regressions tests pass.
* Investigating ways to get rid of CLOSE_DELAY in the test framework...Eric S. Raymond2013-11-272-3/+13
| | | | | | | | ...actually revealed a bug - device-shutdown messages getting lost on the way out to the test clients. This set of changes mostly fixes it. Some glitches remain; this state of things passes all regression tests but attempting to get rid of what now ought to be unnecessary code in fake.py does not pass. To be continued...
* pylint found a minor error in the factoring of the Python library classes.Eric S. Raymond2013-11-241-5/+2
| | | | All regression tests pass. PPS is live.
* Revert "Fix a pylint warning. With this scons audit runs completely clean ↵Eric S. Raymond2013-11-231-1/+0
| | | | | | | again." It breaks regression testing (but not the production code). After this revert all regression tests pass again.
* Fix a pylint warning. With this scons audit runs completely clean again.Eric S. Raymond2013-11-221-0/+1
|
* Resync the Python interface's list of various magic constants.Eric S. Raymond2013-11-201-1/+15
|
* Ritualistic pacification of pylint. All regression tests pass, xgps runs.Eric S. Raymond2013-11-153-2/+5
|