Commit Graph

1967 Commits

Author SHA1 Message Date
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
Jeremy Lakeman
b8737125eb Fix RETURN macro usage 2013-01-23 15:37:17 +10:30
Andrew Bettison
546fccc794 Support relative log.file config option
As already documented in doc/Servald-Configuration.md
2013-01-23 14:54:25 +10:30
Jeremy Lakeman
dbd4cb1771 Fix jni tests on osx & with new interface 2013-01-23 14:43:50 +10:30
Jeremy Lakeman
521c9471d4 Fix tests for new rhizome list column 2013-01-23 14:43:50 +10:30
Jeremy Lakeman
3a93fee8a5 New JNI interface to better support cursor result sets 2013-01-23 14:43:50 +10:30
Andrew Bettison
03536301f8 Debian init script to start/stop system-wide servald 2013-01-23 14:06:56 +10:30
Jeremy Lakeman
e9d283f3f6 Allow name to be missing 2013-01-17 11:45:45 +10:30
Jeremy Lakeman
ad01836d0e Use database query to respond to rhizome list, add name argument 2013-01-17 11:45:45 +10:30
Jeremy Lakeman
6dcc434541 Add more manifest fields as database columns 2013-01-16 10:56:09 +10:30
Jeremy Lakeman
89fac207fe Remove timing from mdp client library 2013-01-15 16:15:36 +10:30
Jeremy Lakeman
b25ff45438 Importing the same bundle twice returns duplicate flag 2013-01-15 10:32:48 +10:30
Jeremy Lakeman
2d66a150b8 Output manifest version for consistency 2013-01-14 09:23:29 +10:30
Jeremy Lakeman
7f9b5f0e4f Fix build when strlcpy is present 2013-01-11 14:43:37 +10:30
Jeremy Lakeman
5a82bfcf31 Add support for importing and exporting a file with an appended manifest 2013-01-11 14:30:52 +10:30
Jeremy Lakeman
7825f9dbd2 Combine manifest and file extraction into one method that can also do both 2013-01-11 14:30:51 +10:30
Jeremy Lakeman
6de54bc0f1 Restart announcements when new bundles added, use more efficient sql, remember position per interface 2013-01-11 14:30:51 +10:30
Jeremy Lakeman
c155ebeef2 Remove dead code 2013-01-11 14:30:46 +10:30
Jeremy Lakeman
b47d27dfe6 Log an error when a bundle secret can't be verified 2013-01-11 14:29:41 +10:30
Jeremy Lakeman
9d6b1ae660 Treat empty bsk the same as null 2013-01-11 14:29:40 +10:30
Andrew Bettison
5ac394a3c1 Maybe fix tests/server:NoZombie occasional failure
Introduced a two-second wait for the KILLed process to die.
2013-01-10 12:12:51 +10:30
Andrew Bettison
b77df878c1 Improve test framework: wait_until [ ! ]* command 2013-01-10 12:11:24 +10:30
Andrew Bettison
b0f0262e18 Fix compiler warnings, Linux gcc 4.7.2 2013-01-08 17:20:42 +10:30
Jeremy Lakeman
09617b9ce0 Set sqlite temp directory explicitly, increase database timeout 2013-01-06 19:43:14 +10:30