Andrew Bettison
208a95a233
Replace validateSid() with str_is_subscriber_id()
2012-07-12 16:14:25 +09:30
Andrew Bettison
d111f763c7
Fix bugs revealed by 'rhizomeprotocol' test
...
Was not transmitting actual HTTP server port in rhizome announcements, was
always transmitting port 4110.
When trying for a free HTTP server port, sometimes bind() succeeds but listen()
fails with EADDRINUSE, so new logic to deal with that.
2012-07-12 12:10:59 +09:30
Andrew Bettison
e69abc3198
Add 'rhizomeprotocol' multi-transfer test
2012-07-11 17:42:30 +09:30
Andrew Bettison
bdd0bb357f
Improve logging config options
...
Rename config option "logfile" to "log.file"
Add "log.show_pid" boolean
Add "log.show_time" boolean
2012-07-11 17:09:50 +09:30
Andrew Bettison
f50da147d6
Fix log.c: open_logging() sets log_pid and log_time vars
2012-07-11 16:59:08 +09:30
Andrew Bettison
ff2c98afb3
Add "rhizome.fetch_interval_ms" config option
2012-07-11 16:51:30 +09:30
Andrew Bettison
218e7883ce
Improve test scripts: use new 'wait_until' primitive
2012-07-11 16:51:29 +09:30
Andrew Bettison
cc39a02443
Improve test framework
...
Add 'wait_until' primitive
Improve option parsing
2012-07-11 16:51:29 +09:30
Jeremy Lakeman
51d66f5d9e
Fix compilation for android
2012-07-11 16:05:03 +09:30
Andrew Bettison
38a5717789
Fix 'rhizomeprotocol' test to always PASS
2012-07-11 14:51:25 +09:30
Andrew Bettison
6b1becd328
Fix bug in 'rhizomeprotocol' test
...
Now it passes about 30% of the time!
2012-07-11 14:22:55 +09:30
Andrew Bettison
4eb3910dc1
Fix bug in Rhizome fetch - byte order of sin_port
...
Also improve some debug logging
2012-07-11 14:21:49 +09:30
Andrew Bettison
6556637251
Add HH:MM:SS.mmm timestamp to non-Android log entries
2012-07-11 14:18:36 +09:30
Andrew Bettison
a15a9146c3
Improve toprint() and alloca_toprint()
2012-07-11 14:17:53 +09:30
Andrew Bettison
9eeaeb9dab
DEBUG_IO logging for all poll() invocations
2012-07-11 14:15:02 +09:30
Andrew Bettison
c7488de510
Add strbuf_helpers.[ch]
...
Functions to help assemble strbuf contents.
2012-07-11 14:11:59 +09:30
Andrew Bettison
63d1792863
Fix bugs in strbuf_ncat(), strbuf_puts() and strbuf_putc()
...
Were not advancing the 'current' pointer the entire length of the appended text
2012-07-11 11:41:15 +09:30
Andrew Bettison
69ff860b4f
Add rhizome sync logging to 'rhizomeprotocol' test
2012-07-10 20:00:20 +09:30
Andrew Bettison
42744da371
Improve log diagnostics related to rhizome HTTP
2012-07-10 19:59:46 +09:30
Andrew Bettison
e8eab5b27e
Improve diagnostics from write_all(), write_nonblock() etc.
...
Add toprint() function and alloca_toprint() macro.
2012-07-10 19:57:56 +09:30
Andrew Bettison
2c1c44c4fe
Add strbuf_trunc() primitive, fix bug in strbuf_substr()
2012-07-10 19:36:25 +09:30
Andrew Bettison
7c2090e61c
Improve error reports for write_str() etc.
...
Now write_str(), write_nonblock(), write_all(), set_nonblock() etc. report the
file/line/function of their caller, rather than the function in net.c. Done
using macros, similar in style to WHY() etc.
2012-07-10 18:51:41 +09:30
Andrew Bettison
86eb482ed9
Replace macros with functions
...
SET_NONBLOCKING(), SET_BLOCKING(), WRITE_STR() are now set_nonblock(),
set_block() and write_str() respectively, all of which log an error before
returning -1. There are other useful methods: write_all() treats anything less
than all bytes written as an error; write_nonblock() treats EAGAIN and EINTR as
zero bytes written, and a combination: write_all_nonblock().
2012-07-10 16:33:39 +09:30
Andrew Bettison
2758af36ee
Silence strict-aliasing warnings
2012-07-10 14:33:14 +09:30
Jeremy Lakeman
624be364bf
fix android log spam
2012-07-10 14:33:07 +09:30
Andrew Bettison
aa29e1ad8c
First cut of 'rhizomeprotocol' tests
...
Currently fails because it looks like HTTP request is failing
2012-07-06 14:39:25 +09:30
Andrew Bettison
572fa591e2
Refactor test utilities from 'rhizomeops' into testdefs_rhizome.sh
2012-07-06 13:32:21 +09:30
Andrew Bettison
438cdd8b47
Rename 'rhizome' test to 'rhizomeops'
2012-07-06 13:20:37 +09:30
Andrew Bettison
17733c631c
Improve test framework: clearer log messages
2012-07-06 13:18:43 +09:30
Andrew Bettison
d2898ee22c
Add output fields to 'keyring add' command
2012-07-06 13:17:53 +09:30
Andrew Bettison
735d9a42cc
Clean up compile warnings and fix bugs
...
In monitor_process_command() for "call" command, was not handling SID "*" case
properly, nor checking validity of hex SID.
2012-07-06 10:14:39 +09:30
Jeremy Lakeman
07c507017a
Fix audio stuffing test so it doesn't repeat the same payload
2012-07-05 16:36:11 +09:30
Jeremy Lakeman
de8da93e7b
Fix android build process
2012-07-05 16:09:50 +09:30
Jeremy Lakeman
7b8e82baea
Refactor vomp call processing to reduce latency
2012-07-05 16:09:33 +09:30
Jeremy Lakeman
ef8c1dd981
Simplify next interface tick calculation
2012-07-05 15:56:42 +09:30
Andrew Bettison
a80da50636
Finish rewriting configuration and logging code
...
Fix endless recursion if error or debug logged while reading config file
Fix 'config del' logic
Log messages made before log file can be opened are buffered and written
once the file is open
Do not log to file in ANDROID version, just to Android's log system
2012-07-05 14:59:50 +09:30
Andrew Bettison
bbdfda2ce4
Improve strbuf API
...
Add STRUCT_STRBUF_EMPTY initialisation constant
Add strbuf_is_empty() primitive
Fix documentation comments in strbuf.h
2012-07-05 14:58:28 +09:30
Andrew Bettison
8cdae125e7
Fix 'dnaprotocol' tests broken by earlier refactor
2012-07-05 14:57:28 +09:30
Andrew Bettison
ab64b08ceb
Rewrite config file code
...
Gets rid of rotor in confValueGet() and duplicate config file parsing code
Currently fails three tests
2012-07-04 18:57:02 +09:30
Andrew Bettison
7eb4293491
Improve test framework: receive TFW_LOGDIR env var
...
Always place test logs in servald build root, regardless of current
working directory
2012-07-04 14:54:37 +09:30
Andrew Bettison
0cece65417
Refactor multi-instance server start code into test defs
2012-07-04 14:12:36 +09:30
Andrew Bettison
68ef34c119
Add 'id allpeers' command to facilitate testing
2012-07-04 12:06:15 +09:30
Andrew Bettison
48bbe6fcbf
Improve overlay routing debug logging
2012-07-04 12:03:27 +09:30
Andrew Bettison
451e517c02
Clean up last #warning compiler message
2012-07-04 10:49:31 +09:30
Andrew Bettison
a90c0156ed
New DEBUG_MDPREQUESTS debug flag
...
Use it to instrument the MDP_GETADDRS request, to investigate cause of
test 'dnaprotocol' fixture failure
2012-07-04 10:32:38 +09:30
Andrew Bettison
72769e162b
Replace overlay_render_sid_prefix() with alloca_tohex()
...
To eliminate timebomb bugs caused by rotor wraparound
2012-07-04 10:30:46 +09:30
Andrew Bettison
d72e4d20ea
Fix compiler warnings
2012-07-03 18:00:52 +09:30
Andrew Bettison
2c87039307
Replace overlay_render_sid() with alloca_tohex_sid()
...
To eliminate timebomb bugs caused by rotor wraparound
2012-07-03 17:59:30 +09:30
Andrew Bettison
b1c78f9fa3
Tighten up overlay socket initialisation and peer listing
2012-07-03 17:38:54 +09:30
Andrew Bettison
30d51f0314
Tighten up tests and code relating to peer discovery
2012-07-03 17:38:54 +09:30