Commit Graph

9545 Commits

Author SHA1 Message Date
Tobias Brunner 20c99edab9 android: Remove dependency on libvstr 2013-11-13 11:40:47 +01:00
Tobias Brunner 334f44cd29 unit-tests: Initialize tests with a callback 2013-11-06 10:31:07 +01:00
Tobias Brunner 8d2450d8b8 plugin-loader: Convenience function added to add plugin dirs in build tree 2013-11-06 10:31:07 +01:00
Martin Willi 09d0c9030a unit-tests: Separate test runner to a library, reusable by other tests
Other users may make use of the noinst libtest.la helper library to implement
unit tests. For libstrongswan, tests.[ch] provide the configuration for test
runner to perform unit tests in a simple manner.
2013-11-06 10:31:07 +01:00
Martin Willi 5a3230a250 unit-tests: Use some include magic to define test suite constructors
Avoid editing of several files when creating test suites by using a single
header file to define test suite constructor functions.
2013-11-06 10:31:07 +01:00
Martin Willi d9d0eef92b unit-tests: Check printing of strings having zero length 2013-11-06 10:31:07 +01:00
Martin Willi 61934203e2 unit-tests: Add some basic tests if PRI* printf specifiers work as expected 2013-11-06 10:31:06 +01:00
Martin Willi a4cbda35ce unit-tests: Add a semaphore wait cancel test 2013-11-06 10:31:06 +01:00
Martin Willi fae1b85223 unit-tests: Add a semaphore absolute timed wait test 2013-11-06 10:31:06 +01:00
Martin Willi a14935ea4b unit-tests: Add a semaphore timed wait test case 2013-11-06 10:31:06 +01:00
Martin Willi ffab2e0c95 unit-tests: Add a simple semaphore test 2013-11-06 10:31:06 +01:00
Martin Willi b1bfe59560 unit-tests: Add a spinlock test case 2013-11-06 10:31:06 +01:00
Martin Willi 478dc0257c unit-tests: Add a rwlock condvar thread cancel test 2013-11-06 10:31:05 +01:00
Martin Willi b92c173b28 unit-tests: Add a rwlock condvar absolute timed wait test 2013-11-06 10:31:05 +01:00
Martin Willi af19213c54 unit-tests: Add a rwlock condvar wait test 2013-11-06 10:31:05 +01:00
Martin Willi 1032f52d68 unit-tests: Add a rwlock condvar broadcast test 2013-11-06 10:31:05 +01:00
Martin Willi f644b9e853 unit-tests: Add a rwlock condvar test 2013-11-06 10:31:05 +01:00
Martin Willi dac31fe1a0 unit-tests: Add a rwlock test case 2013-11-06 10:31:05 +01:00
Martin Willi 8b25b5c36f unit-tests: Add a condvar test where wait gets cancelled 2013-11-06 10:31:04 +01:00
Martin Willi b7db393d01 unit-tests: Add a condvar test working on a recursive mutex 2013-11-06 10:31:04 +01:00
Martin Willi 8699a32b74 unit-tests: Add a condvar absolute timed wait test 2013-11-06 10:31:04 +01:00
Martin Willi 31f9f777b3 unit-tests: Add a condvar timed wait test 2013-11-06 10:31:04 +01:00
Martin Willi 9a0a891e6b unit-tests: Add condvar broadcast test 2013-11-06 10:31:04 +01:00
Martin Willi 13183a74d4 unit-tests: Add a simple condvar test 2013-11-06 10:31:04 +01:00
Martin Willi 21df985148 unit-tests: Add a thread local storage cleanup test 2013-11-06 10:31:03 +01:00
Martin Willi 0b00e63e49 unit-tests: Add a thread local storage fuzzer test 2013-11-06 10:31:03 +01:00
Martin Willi fd26b7ff1b unit-tests: Add a thread cleanup pop test 2013-11-06 10:31:03 +01:00
Martin Willi 4aec0c5543 unit-tests: Add cleanup test cases for different thread exit situations 2013-11-06 10:31:03 +01:00
Martin Willi e5b34086f1 unit-tests: Add a test for thread_cancellation_point() 2013-11-06 10:31:03 +01:00
Martin Willi 49e6848bd0 unit-tests: Add thread cancellability testing 2013-11-06 10:31:03 +01:00
Martin Willi 855747eab7 unit-tests: Add a simple thread_cancel() test 2013-11-06 10:31:02 +01:00
Martin Willi c320c61160 unit-tests: Add thread_exit() tests to both join and detach test cases 2013-11-06 10:31:02 +01:00
Martin Willi 274e6beb00 unit-tests: Add a simple thread detach test 2013-11-06 10:31:02 +01:00
Martin Willi 5d4a882f45 unit-tests: Add a simple thread join() test 2013-11-06 10:31:02 +01:00
Martin Willi b942528419 unit-tests: Add test suite for streams and services 2013-11-06 10:31:02 +01:00
Martin Willi 8eda87af86 unit-tests: Add a few test cases for watcher 2013-11-06 10:31:02 +01:00
Martin Willi 23b8f9bf86 unit-tests: Support testing multi-threaded code 2013-11-06 10:31:01 +01:00
Martin Willi f23fd4c59b unit-tests: Use a home-brew thread barrier to remove pthread dependency 2013-11-06 10:31:01 +01:00
Martin Willi b74b8addf8 unit-tests: Show how many test vectors have failed on test failure 2013-11-06 10:31:01 +01:00
Martin Willi b4d43a542f unit-tests: Skip fmemopen() based printf() tests if not available 2013-11-06 10:31:01 +01:00
Martin Willi 45766923b8 unit-tests: Avoid name clash with clone() from <sched.h> 2013-11-06 10:31:01 +01:00
Martin Willi 1254ad01b9 unit-tests: Fix a compiler warning in identification tests 2013-11-06 10:31:01 +01:00
Martin Willi 382fa8b419 unit-tests: Clean up memory in new asn1 unit tests
Test runner checks for leaks when leak detective is enabled.
2013-11-06 10:31:00 +01:00
Martin Willi 712940d161 unit-tests: Pass linked_list->invoke* varargs as uintptr_t
Passing integers of unspecified length may result in passing an integer shorter
than uintptr_t. When reading them back, we might get more data than passed,
resulting in a failure.
2013-11-06 10:31:00 +01:00
Martin Willi f7b8396af0 unit-tests: Initialize backtracing before printing any backtraces 2013-11-06 10:31:00 +01:00
Martin Willi bbb62267e0 thread: Note that tread_cancellation_point temporarily activates cancelability 2013-11-06 10:31:00 +01:00
Martin Willi 7a13990964 backtrace: Support backtracing even if library is not initialized
But of course backtracing must be initialized anyway using backtrace_init().
2013-11-06 10:31:00 +01:00
Martin Willi a5860cddae unit-tests: Enable libstrongswan tests even if --enable-unit-tests not set
As we don't depend on the check framework anymore, we can enable the unit tests
by default. These are built/executed with "make check" only, so it makes no
sense to disable them.
2013-11-06 10:31:00 +01:00
Martin Willi 35e8eb93a0 unit-tests: Implement testing framework without "check" 2013-11-06 10:30:59 +01:00
Martin Willi 56866ecf3d leak-detective: Call {gm,local}time_r() to allocate static buffer
On OS X Mavericks, these functions use a static allocation and are hard
to whitelist using other means.
2013-11-06 10:30:59 +01:00