Commit Graph

2090 Commits

Author SHA1 Message Date
gardners
0268ccd21a setup serial port mode when opening packet radio interface.
(now reads bytes over serial line)
2013-02-20 15:36:20 +10:30
gardners
190a5e693f refactored packet radio code mostly into separate file.
began writing stateful packet decoder.
2013-02-20 15:36:20 +10:30
gardners
70af7fae0d initial work on implementing packet radio interface.
can open and read from TTY.
doesn't do anything with the data yet.
doesn't write proper packets to the interface yet.
doesn't use bitrate config option yet.
2013-02-20 15:36:19 +10:30
Andrew Bettison
cf13a4b51e Add 'rhizome.clean_on_open' config option 2013-02-20 14:43:20 +10:30
Andrew Bettison
8f707f4cdb Fix bug in strbuf_puts(), not always appending nul 2013-02-20 14:28:06 +10:30
Andrew Bettison
81bed5ab33 More progress on Rhizome mirror script 2013-02-18 17:24:01 +10:30
Andrew Bettison
ce788eaeec Improve command-line parser: "\word" forces label
This allows the same function to be used with different commands.
Recent improvements to the parser stopped adding labels for bare words
"word" in the CLI schema, to reduce the chance of label conflicts, eg {
"get", "file", "<file>" }.  Now a backslash-prepended word in the schema
"\word" will cause the matched argument to be labelled "word", just like
"[word]" does except "\word" is not optional.
2013-02-18 17:13:30 +10:30
Andrew Bettison
0bcfaccc2b First cut at rhizome_mirror script -- incomplete 2013-02-15 19:46:16 +10:30
Andrew Bettison
c176d23726 Add 'sid:' field to output of "reverse lookup"
Use sid_t in more places
2013-02-15 19:34:24 +10:30
Andrew Bettison
682d1ecfb3 Fix bug in cli_uint() 2013-02-15 19:33:44 +10:30
Andrew Bettison
788b3e37b2 Fix JNI argv parsing: throw exception on NULL
Add new 'jni' test case to ensure this works
2013-02-15 19:33:12 +10:30
Andrew Bettison
e856cafc97 Quieten overlay_link.c DEBUG statements
Make them conditional on config.debug.overlayrouting, like other DEBUG
statements in the same source file
2013-02-15 10:30:23 +10:30
Andrew Bettison
c42260f5f9 Replace "add did" command with improved "keyring add did"
Output is same format as "keyring add" command

Fixed minor bug in rolling a random DID -- last byte was not random

Some code improvements, including better support for sid_t
2013-02-14 16:06:01 +10:30
Andrew Bettison
433f49551a Cosmetic improvements to 'routing' test script 2013-02-14 16:02:09 +10:30
Andrew Bettison
2d4133315d Improve cli_arg() diagnostic log messages 2013-02-14 16:00:47 +10:30
Andrew Bettison
e86a129d49 Refactor: rename some cli.h structs
Now all symbols defined in cli.h start with or contain "cli_"
2013-02-13 17:43:24 +10:30
Andrew Bettison
f66a894a63 Improve keyring PIN handling
Replace explicit [<pin,pin...>] command-line arguments with --entry-pin=<pin>
options.  Update test scripts accordlingly.

Add --keyring-pin=<pin> option (with one test case).
2013-02-13 16:49:52 +10:30
Andrew Bettison
7f52ac0ae3 Improve command-line parser
Support prefix<any>, prefix=<any>, prefix <any>, [prefix<any>], [prefix=<any>]
and [prefix <any>] argument syntax forms.

Support [arg]... optional repeated argument syntax.
2013-02-13 15:55:00 +10:30
Andrew Bettison
5013424ab1 New "str.h" functions: strn_str_cmp(), strn_str_casecmp() 2013-02-13 15:52:44 +10:30
Andrew Bettison
fcb6600cd6 Rewrite command-line parser
Now supports optional args followed by non-optional.
2013-02-12 18:00:37 +10:30
Andrew Bettison
46513bf192 Add keyring tests to 'all' test script 2013-02-11 18:43:12 +10:30
Andrew Bettison
b2923744b0 Add 'keyring' test script with three basic tests 2013-02-11 18:41:36 +10:30
Andrew Bettison
2eb930b94c Improve Rhizome Direct stress test
Reduce log verbosity, report extra files received by nodes, re-order
push/pull/sync process start order to increase chance of cross-fetching.
2013-02-11 18:39:46 +10:30
Andrew Bettison
9ec6a12b47 Improve Rhizome test defs: rhizome_list_dump
New rhizome_list_dump() reads a Rhizome list on standard input and formats the
output for easy reading in test logs, including only the columns named by its
arguments.

The assert_rhizome_list() function now sets the $rhizome_list_file_count global
variable.
2013-02-11 18:22:10 +10:30
Andrew Bettison
b8e32bdd66 Improve test framework: tfw_quietly, tfw_multicolumn
New tfw_quieten() is similar to tfw_nolog(), but only silences the chatty log
output for asserts and other actions that succeed.  Failures are still logged.

New tfw_multicolumn() encapsulates an awk(1) script to format a list into
columns that fit into $COLUMNS width.

Improve exit status handling for test ERROR and FAIL conditions.
2013-02-11 18:18:04 +10:30
Andrew Bettison
cb288d8b9c Fix new Rhizome Direct stress test
Now PASSES with Jeremy's recent fix, but FAILED before
2013-02-08 19:24:03 +10:30
Andrew Bettison
b5a55c8c08 Add Rhizome Direct stress test
Use new test framework fork() support to run several rhizome direct
push/pull/sync processes at once to a single server.

Speed up setup for Rhizome Transfer stress test.
2013-02-08 18:46:30 +10:30
Andrew Bettison
3e2b1524bb Improve test framework: fork concurrent processes
Add fork(), forkKillAll() and forkWaitAll() framework primitives for running
many concurrent background processes within a single test case.
2013-02-08 18:46:30 +10:30
Jeremy Lakeman
6ddf840541 Read the entire response before processing it. Issue #45. 2013-02-08 13:46:15 +10:30
Andrew Bettison
7a8323b31d Improve Rhizome stress tests
Rename tests to start with "Stress" prefix

Refactor StressRhizomeAdd test to use conventional utilities and be more
readable.  Remove trailing "sleep 10".
2013-02-08 12:08:24 +10:30
Andrew Bettison
2ca7bab7c0 Improve test framework: create_file --append 2013-02-08 12:07:56 +10:30
Andrew Bettison
a6b6209c6c Improve Rhizome Direct tests
Push/pull three bundles of varying sizes each way instead of one 64 byte
bundle each way
2013-02-08 10:39:41 +10:30
Andrew Bettison
b3a0b0e965 Improve test framework: fix Mac OS X bugs
Mac OS X sort(1) does not support -V (version number compare), and sed(1) does
not support the \+ regex operator.
2013-02-07 17:24:28 +10:30
Andrew Bettison
819e9bb8b2 Improve test framework: fix job control bugs
The non-deterministic bug of "job %N terminated without result" is now fixed.
The cause was that Bash job numbers are allocated as max(current job numbers) +
1, so if the most recent job exited was not harvested before the next job was
started, then the job number would get re-used, deleting the un-harvested job's
result file.

SIGINT (ctrl-C interrupt) handling has been improved for the -j (parallel) and
non-parallel cases.

Test case execution in the non-parallel case is faster, by fixing a bug that
waited for a one-second timeout before starting each test job.
2013-02-07 17:06:30 +10:30
Andrew Bettison
e01b2cacd8 Improve test framework: duplicate test names
Now that tests can be included from other scripts, there is a possibility of
test name collision, so the main loop logic now uses the test sequence number
instead of the name internally to identify the test.
2013-02-07 09:44:44 +10:30
Andrew Bettison
c804b9d5ce Fix copyright messages in test scripts 2013-02-06 18:55:31 +10:30
Andrew Bettison
248e2b7096 Add new 'all' test script
Runs all tests except Rhizome stress tests.
2013-02-06 18:51:01 +10:30
Andrew Bettison
3e35cf33d2 Improve test framework: includeTests() function
Support for test scripts to aggregate other test scripts.
2013-02-06 18:49:29 +10:30
Andrew Bettison
cfe4da687c New hton_in_addr() function
To silence warnings in struct in_addr assignments on Solaris, whose struct
in_addr definition is a monstrosity.
2013-02-05 16:56:37 +10:30
Andrew Bettison
ac18b895e3 Improve test framework: better progress output 2013-01-31 13:52:57 +11:00
Andrew Bettison
7b984bbd92 Improve test framework: one log directory per test case
Log file is now in testlog/SCRIPTNAME/N.TESTNAME.RESULT/log.text

Add tfw_preserve() function to copy files/directories into log directory
2013-01-31 12:39:46 +11:00
Jeremy Lakeman
340003ed99 Don't keep sql blob open from http server 2013-01-30 11:46:10 +11:00
Jeremy Lakeman
78f7a293d1 Don't transfer files via mdp broadcast if the interface prefers unicast 2013-01-29 13:12:34 +11:00
Jeremy Lakeman
b35c1aca43 Specify that unicast traffic should use unicast UDP packets 2013-01-29 11:57:13 +11:00
Jeremy Lakeman
88f7fef992 Reduce priority of rhizome on MDP, stop sooner when packet queues fill 2013-01-28 13:35:24 +11:00
Jeremy Lakeman
fec19eee58 Increase vomp dial timeout 2013-01-26 13:08:38 +10:30
Andrew Bettison
9327b30c41 Improve Debian init.d script and default file 2013-01-24 13:24:11 +10:30
Andrew Bettison
48fd3d2322 Remove some unnecessary executable mode bits 2013-01-23 17:18:51 +10:30
Andrew Bettison
7e0f8a9a78 Fix bug in Debian init.d script 2013-01-23 16:28:19 +10:30
Andrew Bettison
365cfe076b Improve Debian /etc/init.d script and /etc/default file 2013-01-23 16:20:40 +10:30