Commit Graph

28 Commits

Author SHA1 Message Date
Andrew Bettison
390655580d Add 'rhizome delete' and 'rhizome clean' commands
sqlite_void_exec() and its ilk now return the count of changed rows, not
just zero, on success

sqlite_exec_prepared() and its ilk now return the count of rows (number
of step results SQLITE_ROW), instead of just zero, on success

rhizome_clean() function now produces an optional report of its changes

rhizome_fail_write() and rhizome_finish_write() now log WARNings not
ERRORs if the SQL DELETE FROM FILES or DELETE FROM FILEBLOBS statements
fail

Refactor rhizome_open_read() to use sqlite_exec_int64()

Ensure that 'rhizome extract' and 'rhizome dump' commands return exit
status of 1 in "not found" conditions, not 255, which is reserved for
errors

Test cases for four new commands: 'rhizome delete bundle', 'rhizome
delete manifest', 'rhizome delete payload' and 'rhizome delete file'
(no test case for 'rhizome clean' yet)
2013-02-20 15:37:09 +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
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
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
48fd3d2322 Remove some unnecessary executable mode bits 2013-01-23 17:18:51 +10:30
Jeremy Lakeman
521c9471d4 Fix tests for new rhizome list column 2013-01-23 14:43:50 +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
28a05baa54 Enable encryption of rhizome payloads 2013-01-03 16:12:24 +10:30
Jeremy Lakeman
8b045dd1a6 Extract files based on the manifest id
Renamed rhizome extract file to rhizome dump file
Added rhizome extract file [manifest] [filepath] [pins]
Modified tests to use the appropriate command, assuming that MeshMS payloads will be encrypted
2013-01-02 12:58:05 +10:30
Jeremy Lakeman
26a4034688 Only assert the file hash matches the file if the payload is not encrypted 2012-12-31 13:07:52 +10:30
Andrew Bettison
54d0e49a1d Improve Rhizome test defs: bundle_received_by()
Introduce per-instance server cache directory and use it to suppress duplicate
log messages from bundle_received_by().
2012-11-05 14:43:57 +10:30
Andrew Bettison
03f71dcccf Improve rhizome stress test
Generate test files from 2KiB to 32MiB in size, instead of all about 13 bytes
in size.  Guess what?  Found a bug!
2012-10-31 18:17:06 +10:30
Andrew Bettison
839de7557c Merge branch 'rhizomestress' into 'master' 2012-10-18 17:57:10 +10:30
Andrew Bettison
af1a6c4297 Split Rhizome stress test into separate file 2012-10-18 17:46:17 +10:30
gardners
499c4018bf Imported ref10/ implementation of crypto_sign from supercop-20120525
as recommended a while back by Dan Bernstein as offering the fastest
implementation of the crypto_sign() primitives for ARM.
Indeed this implementation IS faster. See comparison below for a
Rock 500 handset (800MHz(?) ARM6, no NEON):

Original ref/ implementation on an R500 stock rom (non-rooted)::
mean signature generation time = 96.80ms
mean signature verification time = 272.20ms

ref10/ implementations on an R500 stock rom (non-rooted):
mean signature generation time = 4.00ms
mean signature verification time = 13.00ms

Approximately 20x speed up, just like that :)
2012-10-18 17:26:48 +10:30
Andrew Bettison
7317f9b56c Add a new 'rhizomeprotocol' test case: stress test
Refactored some testdefs.sh and testdefs_rhizome.sh, not yet complete.
2012-10-17 18:10:39 +10:30
Andrew Bettison
3678522872 Issue #17, add AUTHOR column to Rhizome MANIFESTS table
Replace ".selfsigned" column with ".author" and ".fromhere" columns in
output of "rhizome list" command.  (Note that a "sender" column is
already present.)

Add 'author' field to struct rhizome_manifest.

Log all fully rendered SQL statements on DEBUG_RHIZOME.

Update 'rhizomeops' test cases and improve the assert_rhizome_list()
test function to be able to assert authorship of files.
2012-10-09 17:48:06 +10:30
Andrew Bettison
aca4e8eda9 Fix shell 'eval' metacharacter bug in test defs 2012-10-09 14:03:59 +10:30
Andrew Bettison
7ee5266998 Issue #25, fix sed(1) statement for Mac OS X
Seems that OS X sed(1) does not support the compound '{cmd;cmd}' syntax in the
same way as GNU sed(1).
2012-10-09 10:05:00 +10:30
Andrew Bettison
f18d7ba9af Re-instate .selfsigned check in assert_rhizome_list()
Also add checks for the "version", "date" and ".inserttime" columns, that they
match the corresponding manifest or are at least well formed.

Issue #9.
2012-10-04 14:22:06 +09:30
gardners
1c72778c50 fixed problem with rhizome direct push / manifest import where
signatures were not being recorded.  Also fixed separate issue
where rhizomeprotocols tests expected selfsigned to be 1 on
receiver end, when it will never be, because the BK doesn't match.
rhizome direct push test in rhizomeprotocols now passes. #9
2012-10-03 12:28:23 +02:00
Andrew Bettison
5b8194eae0 Refactor test definitions
Cherry picked from commit e994626429, conflicts
in testdefs.sh resolved manually (start_servald_instances() sets DUMMYx
variable).

Move create_rhizome_identities() from testdefs_rhizome.sh to
create_identities() in testdefs.sh

Rename create_identity() in testdefs.sh to create_single_identity(), uses
create_identities() to do its work.
2012-09-28 12:05:22 +09:30
Andrew Bettison
1f4688db99 #16 Fix 'rhizomeops' tests that fail on Solaris 2012-09-13 14:08:52 +09:30
Andrew Bettison
b3f9e437b3 Issue #9, add test case for local HTTP add 2012-08-27 17:57:41 +09:30
Andrew Bettison
41680ff663 Move functions from testdefs.sh to testdefs_rhizome.sh
... where they should have been in the first place.

Also, clean up the RHIZOME HTTP SERVER START log message.

Issue #9.
2012-08-27 17:07:44 +09:30
Andrew Bettison
c31d360b7a Improve 'rhizomeprotocol' tests
New test case for big payload (1 MB + 2 bytes)
Check that received payloads are identical to sent ones
Refactored test code
2012-07-17 14:09:35 +09:30
Andrew Bettison
d59378961c Improve rhizome test defs
Handle manifests with empty payloads:
 - assert_manifest_complete() asserts for a filehash field if the
   filesize is non zero, otherwise asserts for NO filehash field
 - assert_stdout_add_file() ditto
 - unpack_manifest_for_grep() allows an empty name if payload also empty

create_rhizome_identities() sets SID and SID{I} vars

assert_rhizome_list() dumps stderr if any assert fails
2012-07-16 18:40:30 +09:30
Andrew Bettison
572fa591e2 Refactor test utilities from 'rhizomeops' into testdefs_rhizome.sh 2012-07-06 13:32:21 +09:30