Commit Graph

112 Commits

Author SHA1 Message Date
Andrew Bettison
dce8b378d2 Refactor routing and Swift test set-up
Add some servald config set-up functions to 'testdefs_routing.sh' and
'testdefs_swift.sh' that can be re-used in the Swift Routing API tests.

Improve some commenting on existing functions, for consistency.
2018-04-09 09:22:36 +09:30
Andrew Bettison
8345d896a6 Add Route REST API (fixes #96)
Consists of a single, one-shot request, GET /restful/route/all.json, for
the time being.  A "newsince" request can be added later.

Add a Markdown tech doc that specifies the new Route REST API and update
the MDP tech doc a little.

Add the 'routerestful' test script, which uses some test utility
fuctions that have been factored out of the 'routing' test script into
the new testdefs_routing.sh.

Add the new 'allrestful' test script.
2018-03-29 15:31:03 +10:30
Andrew Bettison
4f5567e2c1 Use rigorous quoting throughout test scripts
This makes it much easier to refactor test fixtures and utilities.
2018-03-27 17:29:21 +10:30
Andrew Bettison
9ef7d33d69 Log more debug in MDP_ROUTE_TABLE request 2018-03-27 09:06:41 +10:30
Jeremy Lakeman
65932e05db Improve reliability of last routing test 2017-06-20 16:32:12 +09:30
Jeremy Lakeman
62a1ca46bc Wait for path establishment in network scan test 2016-09-27 15:51:23 +09:30
Jeremy Lakeman
adf0a880bc Any identity could be the main one, check for any valid route 2016-09-21 17:27:39 +09:30
Jeremy Lakeman
b55926b081 Add configuration for idle_tick_ms so tests can complete faster without wasting power 2016-05-10 11:19:49 +09:30
Jeremy Lakeman
c1947cf774 Add prior hop SID to route print output 2016-03-02 10:51:16 +10:30
Jeremy Lakeman
389f16d2bb Establish a unicast link to a configured host on demand 2016-01-27 16:27:47 +10:30
Andrew Bettison
0361b99ca7 Fix OSX bugs in test framework
Use GNU grep, sed and awk instead of BSD variants.  Developers will have
to install these using a package manager like homebrew.  Updated the
INSTALL.md and doc/Development.md tech docs with instructions.
2016-01-27 00:24:43 +10:30
Jeremy Lakeman
75523b7f3c Don't talk about SID's that don't match the whole abbreviation 2016-01-12 10:29:46 +10:30
Jeremy Lakeman
2ddbb86cb5 Don't ask for explanation of SIDs with dead routing links 2015-11-16 14:09:35 +10:30
Jeremy Lakeman
e97f7c4e29 Fix vomp stun tests
- Don't trust stun responses about 3rd parties
- Only ack neighbour links via 1hop destinations (not multi-hop routes)
- Don't override network destinations that were manually supplied
2015-06-22 14:50:28 +09:30
Jeremy Lakeman
73c2c9e6fe Relax unreliable path tests for now 2015-06-22 12:15:49 +09:30
Jeremy Lakeman
d5e0835f21 Add explicit timeout parameter to mdp trace for slow links 2015-05-11 15:47:35 +09:30
Jeremy Lakeman
fea91f3f82 Use configured reachable timeout for network links, read dummy files even when not ticking 2015-03-30 17:38:40 +10:30
Jeremy Lakeman
943bca3bea Add transmit timeout config per network destination for low bandwidth links 2015-03-30 14:15:08 +10:30
Jeremy Lakeman
f7dbe06836 Rearrange interface config to support unicast settings 2015-03-23 13:35:22 +10:30
Jeremy Lakeman
6ab2cc5bb6 Only support one keyring pin per open file 2014-10-31 15:30:07 +10:30
Jeremy Lakeman
91d3f78f8e Revert slack ping delivery in routing tests 2014-10-01 15:53:18 +09:30
Jeremy Lakeman
c7e397cadf Trace network paths that are supposed to exist 2014-09-23 14:54:22 +09:30
Jeremy Lakeman
63f02607e6 Fix duplicate payload detection over unicast links 2014-06-26 17:20:06 +09:30
Jeremy Lakeman
ee37385ec7 Recalculate routing table after last neighbours is lost, or interface is down 2014-06-12 17:15:29 +09:30
Jeremy Lakeman
77be2c7ef3 Fix mdp trace assert 2014-06-04 17:13:08 +09:30
Jeremy Lakeman
b6de3fcd34 Only send rhizome sync packets when we have neighbours 2014-05-30 15:03:22 +09:30
Jeremy Lakeman
0c294079af Improve reliability of routing tests 2014-05-30 14:56:31 +09:30
Andrew Bettison
757e6c62ab Merge network simulator into development 2014-05-26 15:52:40 +09:30
Jeremy Lakeman
9f23b9bdcd Fix remove obsolete debug flags from test scripts 2014-05-26 14:16:35 +09:30
Jeremy Lakeman
3373d64079 Routing tests shouldn't care about prefer_unicast default value 2014-05-26 13:57:27 +09:30
Jeremy Lakeman
7420f46653 Create new AF_UNIX based network simulator 2014-05-23 10:47:22 +09:30
Jeremy Lakeman
4204973052 Allow for more duplicates in 2hop test 2014-05-09 11:21:16 +09:30
Jeremy Lakeman
8ddd256b5c Add more asserts for ping stats, with some slack 2014-05-05 14:35:31 +09:30
Jeremy Lakeman
ab915a13fc Use routing table to check if a node is unreachable 2014-05-05 13:22:36 +09:30
Andrew Bettison
459c5a2303 Improve "mdp ping" command
Packet stats now exclude duplicate pong replies

With <count> arg, exits immediately once a pong has been received for
every ping, unless new --wait-for-duplicates option given

Routing tests for unreliable links now assert all pongs received and
very few duplicates
2014-04-17 16:09:34 +09:30
Andrew Bettison
6371203703 Finish removing SLIP code and test case
More simplification of "serval.h"
2014-04-07 16:22:31 +09:30
Jeremy Lakeman
6f75d93460 Shift echo service to new internal api, ensure local services can respond to local clients 2014-02-19 16:34:47 +10:30
Jeremy Lakeman
6d942f8d4f Improve tests 2014-01-09 15:01:38 +10:30
Jeremy Lakeman
4bb3336b33 Generalise method for defining multiple interfaces 2014-01-09 15:01:38 +10:30
Jeremy Lakeman
506518ad06 Allow interfaces to use local unix addresses
- broadcast packets are sent to all sockets in the same folder
- switched most tests to use local sockets
2014-01-09 15:01:38 +10:30
Jeremy Lakeman
1b34c2dc13 Improve test reliability 2013-11-27 13:10:09 +10:30
Jeremy Lakeman
ad33264834 Rename mavlink to radio_link
- split link state from slip structures and encapsulate it completely
- allocate interface specific buffers on demand
2013-11-27 13:09:26 +10:30
Jeremy Lakeman
5ea19ab538 Better approximation of TDMA timing 2013-11-27 13:00:02 +10:30
Andrew Bettison
851dbb4d64 Add 'debug.subscriber' config option
Add debug logging to find_subscriber() function
2013-11-26 15:33:54 +10:30
Andrew Bettison
711364ad8d Merge branch 'meshextender' into 'development' 2013-11-21 17:05:03 +10:30
Andrew Bettison
bacba19dc1 Refactor manifest: specific setter functions
Replace generic rhizome_manifest_set() and rhizome_manifest_set_ll()
with per-field setter functions, eg, rhizome_manifest_set_filesize().
Struct rhizome_manifest elements for all known fields, to replace the
use of rhizome_manifest_get() and rhizome_manifest_get_ll() everywhere:
sender, recipient, service, name, date, bundle_key.

Add boolean validity flags for binary blob types, to avoid having to compare
with many bytes of all-zero to detect presence, eg, has_sender, has_recipient,
has_author, has_bundle_key.  These maintained by the setter functions.

Rename existing manifest struct elements to be the same as their field
names: fileLength -> filesize, journalTail -> tail.

More use of unsigned int, size_t and uint64_t for payload sizes, offsets, byte
counts, etc. especially in rhizome_store.c and meshms.c.  More uniform use of
size_t to dimension memory buffers.  Fix some printf(3) style format strings
for 64-bit correctness on 32-bit systems.  Use new constant RHIZOME_SIZE_UNSET
instead of -1 to indicate unknown dimension, and explicitly assert its absence
before comparisons and arithmetic, for safety.

Replace some 'int' loop variables with 'unsigned' where appropriate.

Fix bugs discovered in MeshMS bundle private/public key generation and
bundle secret key handling for export/extract commands.

Instrument the first MeshMS test case to aid debugging.

New debug config flag: debug.manifest logs all modifications to all manifest
fields by setter functions.

Rename debug config flag: debug.rhizome_bind -> debug.rhizome_sql_bind.
2013-11-04 19:17:49 +10:30
gardners
e9e0a1b4a4 allow setting of % of 252 byte RS protected packets that we want
to have delivered.  Adjust tests accordingly.  Create new test
for ~50% packet delivery on fakeradio in preparation for network
coding.
2013-10-23 19:45:50 -07:00
Jeremy Lakeman
d5d5737f1c Rename 'id revoke' to 'id relinquish' to match documentation 2013-10-15 14:52:07 +10:30
Jeremy Lakeman
b8ec568711 Send 3-way request to stop routing an identity 2013-10-14 14:40:19 +10:30
Jeremy Lakeman
0c1c767af0 Wait until sid from local keyring is unreachable before claiming ownership 2013-10-10 15:59:44 +10:30