Commit Graph
56 Commits
Author SHA1 Message Date
Tobias Brunner 84693a3d79 linked-list: Remove barely used has_more() method
This required some refactoring when handling encrypted payloads.

Also changed log messages so that "encrypted payload" is logged instead
of "encryption payload" (even if we internally still call it that) as
that's the name used in RFC 5996.
2013-07-17 17:42:53 +02:00
Tobias Brunner 1a9528f916 linked-list: Don't require an argument for the item when enumerating 2013-07-17 17:42:53 +02:00
Tobias Brunner cf4172637a linked-list: Remove unused clone_function() method 2013-07-17 17:42:53 +02:00
Tobias Brunner 0f3ddbd189 linked-list: Remove barely used find_last() method 2013-07-17 17:42:53 +02:00
Tobias Brunner be3c09d020 linked-list: Remove unused replace() method
Its functionality can be replicated by calling insert_before() followed
by remove_at().  Not the other way around, though, because remove_at()
changes the enumerator position.
2013-07-17 17:42:53 +02:00
Martin Willi 4730c4b32b unit-tests: implement tests for array collection 2013-07-17 17:20:17 +02:00
Tobias Brunner ed235dbbf2 chunk: Add predictable hash function
Since chunk_hash() is randomized its output is not predictable, that is,
it is only within the same process.
2013-06-28 17:00:29 +02:00
Tobias Brunner b18a531715 plugin-loader: Removed unused path argument of load() method
Multiple additional search paths can be added with the add_path()
method.
2013-06-28 10:44:15 +02:00
Tobias Brunner fcc33c0cd4 unit-tests: Print loaded plugins 2013-06-27 11:27:13 +02:00
Tobias Brunner a6357a62b4 unit-tests: RSA key generation might take longer than 4 seconds
Check uses a default timeout of 4 seconds for each test case, generating
keys of 6 different key sizes might take longer than that.
2013-06-27 11:06:47 +02:00
Tobias Brunner 65d23c7c90 tests: Properly load plugins from build directory
Calling load() incrementally does not really work as dependencies
wouldn't be resolved properly if a required feature was to be provided
by a plugin that is loaded later with a separate call to load().
2013-06-27 11:06:47 +02:00
Martin Willi ef687db734 unit-tests: load plugins in test-runner from build directory 2013-06-21 10:53:23 +02:00
Martin Willi b950fc48da unit-tests: link test-runner against -lpthread 2013-06-21 10:53:23 +02:00
Martin Willi df1a1a0901 unit-tests: add RSA test cases, very similar to ECDSA 2013-06-21 10:53:23 +02:00
Martin Willi eabf4af0f8 unit-tests: test with /dev/urandom if random plugin is in use 2013-06-21 10:53:22 +02:00
Martin Willi d0c09c84a5 unit-tests: test supported ECDSA schemes only 2013-06-21 10:53:22 +02:00
Martin Willi 2bedb0f270 Move test-runners has_feature() function to plugin loader 2013-06-21 10:53:22 +02:00
Martin Willi df76881f11 unit-tests: enforce CET/CEST timezone to properly test non-UTC time formatting 2013-06-21 10:53:22 +02:00
Martin Willi 44886a0667 unit-tests: don't use ck_assert() to test a cleared chunk, as it allocates data
The new allocation might be in the freed area, affecting the test result.
2013-06-21 10:53:22 +02:00
Martin Willi 52bff13848 unit-tests: define 64-bit constats with ULL, fixing compiler warning on 32-bit 2013-06-21 10:53:22 +02:00
Martin Willi a88cab095d unit-tests: test some zeroed ECDSA signatures that never should succeed 2013-06-21 10:53:21 +02:00
Martin Willi 7e23f53242 unit-tests: perform signing/validation with keys ECDSA keys generated or loaded 2013-06-21 10:53:21 +02:00
Martin Willi eabb0befdc unit-tests: add an ECDSA test case loading keys 2013-06-21 10:53:21 +02:00
Martin Willi d18ff88faf unit-tests: perform a first ECDSA test case if ECDSA is supported 2013-06-21 10:53:21 +02:00
Martin Willi 200f38ad4c unit-tests: add a helper function checking if a plugin feature is available 2013-06-21 10:53:21 +02:00
Martin Willi cb1745f7a6 unit-tests: add a test case checking if all test vectors have been passed 2013-06-21 10:53:20 +02:00
Martin Willi 3714979427 unit-tests: load all libstrongswan plugins in test-runner 2013-06-21 10:53:20 +02:00
Tobias Brunner bde35a6fb2 Suppress log messages during tests 2013-06-11 11:03:13 +02:00
Tobias Brunner f2eeb54e8b Remove explicit leak detective checks as these are now done for all tests 2013-06-11 11:03:13 +02:00
Tobias Brunner 95e9915074 Enable leak detective for all test cases 2013-06-11 11:03:13 +02:00
Tobias Brunner 2b4902973b Added tests for bio_writer_t 2013-06-11 11:03:13 +02:00
Tobias Brunner b4029a4aae Added tests for bio_reader_t 2013-06-11 11:03:13 +02:00
Tobias Brunner 80d9a9b722 Added tests for utils/enum.c 2013-06-11 11:03:13 +02:00
Tobias Brunner 06f6d80245 Additional tests for identification_t added 2013-06-11 11:03:13 +02:00
Tobias Brunner af67613ed6 Added tests for utils/utils.[ch] 2013-06-11 11:03:12 +02:00
Tobias Brunner c2dba63bd4 Additional tests for chunk_t 2013-06-11 11:03:12 +02:00
Tobias Brunner ab73ae67d3 Also capture coverage data for tests but filter them from the result
Otherwise calls from test cases to static inline functions are not captured.
2013-06-11 11:03:12 +02:00
Tobias Brunner 9a8c873e90 Add tests for lib->get|set 2013-06-11 11:03:12 +02:00
Tobias Brunner 7e9f6b276b Additional and improved enumerator_t tests 2013-06-11 11:03:11 +02:00
Tobias Brunner 0713c90927 Test remove and remove_at of hashtable_t if all items are in the same bucket 2013-06-11 11:03:11 +02:00
Tobias Brunner c721d6b6a3 Add test cases for invoke_* and clone_* of linked_list_t 2013-06-11 11:03:11 +02:00
Tobias Brunner afb6d9c301 Improve tests for linked_list_t.replace() 2013-06-11 11:03:11 +02:00
Tobias Brunner cca70ed331 Add additional tests for linked_list_t 2013-06-11 11:03:11 +02:00
Tobias Brunner bc90b3dd0a Improved test for linked_list_t.insert_before() 2013-06-11 11:03:11 +02:00
Tobias Brunner 01a3ba9e0f Enable coverage report for libstrongswan 2013-06-11 11:03:11 +02:00
Tobias Brunner 952073b8a7 Use proper type for enumerator_t/linked_list_t tests
Worked with -O2 but not with -O0.
2013-06-11 11:03:11 +02:00
Tobias Brunner de42bf35f9 Converted test for recursive mutex_t 2013-06-11 11:03:11 +02:00
Tobias Brunner 1255de5a20 Adding chunk_mac() which calculates a 64-bit MAC using SipHash-2-4 2013-06-11 11:03:11 +02:00
Tobias Brunner 4e67f19528 Converted tests for chunk_t 2013-06-11 11:03:11 +02:00
Tobias Brunner e09461bf77 Converted and added tests for hashtable_t 2013-06-11 11:03:10 +02:00