Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | unit-tests: Re-align identification_create_from_string() unit test table data | Martin Willi | 2014-10-30 | 1 | -52/+52 | |
| | ||||||
* | threading: Add a more explicit rwlock try_write_lock() testing | Martin Willi | 2014-10-30 | 1 | -0/+44 | |
| | ||||||
* | unit-tests: Fix internet checksum tests on big-endian systems | Tobias Brunner | 2014-10-23 | 1 | -4/+9 | |
| | | | | | | | We actually need to do a byte-swap, which ntohs() only does on little-endian systems. Fixes #747. | |||||
* | process: Don't use the shells built-in echo in tests | Martin Willi | 2014-10-14 | 1 | -1/+1 | |
| | | | | On OS X, the /bin/sh built-in echo does not support -n. | |||||
* | process: Don't use absolute path names for true/false/cat in unit tests | Martin Willi | 2014-10-14 | 1 | -4/+10 | |
| | | | | | But use the (builtin) shell commands instead, as on OS X true/false are under /usr/bin. | |||||
* | process: Add a wrapper to invoke a command under the system default shell | Martin Willi | 2014-10-06 | 1 | -0/+16 | |
| | ||||||
* | process: Port child process spawning to the Windows platform | Martin Willi | 2014-10-06 | 1 | -0/+32 | |
| | ||||||
* | process: Provide an abstraction to spawn child processes with redirected I/O | Martin Willi | 2014-10-06 | 3 | -0/+175 | |
| | ||||||
* | unit-tests: Give worker threads time to clean up when testing thread_t.detach() | Tobias Brunner | 2014-09-09 | 1 | -2/+4 | |
| | ||||||
* | unit-tests: Add option to exclude specific test suites | Tobias Brunner | 2014-09-09 | 2 | -14/+32 | |
| | | | | | Listing test suites in TESTS_SUITES_EXCLUDE allows excluding specific test suites from running. | |||||
* | chunk: Add function to calculate Internet Checksums according to RFC 1071 | Tobias Brunner | 2014-07-22 | 1 | -0/+49 | |
| | ||||||
* | settings: Allow spaces in time settings before the optional unit | Martin Willi | 2014-07-07 | 1 | -2/+2 | |
| | ||||||
* | settings: Be more strict in converting settings to specific data types | Martin Willi | 2014-07-07 | 1 | -20/+15 | |
| | | | | | | | As the behavior was inconsistent for empty strings or strings with characters appended to a number, testing the code failed on some platforms. The new rules are more strict, returning the default if additional characters or an empty string was found for a setting. | |||||
* | unit-tests: Add tests for DH factory | Tobias Brunner | 2014-06-20 | 1 | -0/+157 | |
| | ||||||
* | unit-tests: Add test for crypto_factory_t's rng_create method | Tobias Brunner | 2014-06-20 | 3 | -0/+157 | |
| | ||||||
* | unit-tests: Make fixture functions optional | Tobias Brunner | 2014-06-19 | 1 | -2/+8 | |
| | ||||||
* | identification: Only use either , or / to separate RDNs | Tobias Brunner | 2014-06-18 | 1 | -4/+4 | |
| | | | | | If a DN starts with a slash (or whitespace and a slash) slashes will be used, otherwise commas. | |||||
* | windows: Use WINAPI call convention for Windows API callbacks | Martin Willi | 2014-06-06 | 1 | -2/+2 | |
| | | | | | For x86_64 it does not actually matter, but for i686 builds the call convention is different with WINAPI. | |||||
* | unit-tests: Zero-initialize chunk to avoid free on non-successful fetch | Martin Willi | 2014-06-04 | 1 | -1/+1 | |
| | | | | | If the fetch fails, the fetcher is not required to return an empty chunk. Avoid the resulting invalid free() by initializing data.ptr to NULL. | |||||
* | unit-tests: Support testable functions on Windows, avoid weak GCC symbols | Martin Willi | 2014-06-04 | 1 | -28/+5 | |
| | | | | | | | Instead of using weak symbols, we use dlsym() on Windows to find an arbitrary symbol in libtest to detect its linkage. Instead of creating the associated hashtable in the test runner, we maintain it in libstrongswan, making it significantly simpler. | |||||
* | unit-tests: Seed chunk_hash() only once, but before creating any hashtables | Martin Willi | 2014-06-04 | 1 | -0/+3 | |
| | | | | | | | Due to the removal of pthread_once, we manually create the seed for chunk_hash(). With the new testable functions interface, this won't work for the hashtable initiated using __attribute__((constructor)). Enforce seeding before creating that hashtable. | |||||
* | unit-tests: Force a CET/CEST timezone Windows understands | Martin Willi | 2014-06-04 | 1 | -0/+4 | |
| | | | | | | As it is currently unclear what the "three-letter-timezone" for CEST is, we use the German timezone, which actually is CET/CEST. SetEnvironmentVariable() "TZ" does not seem to affect localtime(), so we use _putenv() instead. | |||||
* | unit-tests: Adapt settings tests for Windows | Martin Willi | 2014-06-04 | 1 | -2/+13 | |
| | ||||||
* | utils: Provide a path_absolute() function to check path for non-relativeness | Martin Willi | 2014-06-04 | 1 | -38/+53 | |
| | | | | The usually used trivial '/' check won't work on Windows platforms. | |||||
* | utils: Support Windows path separators in path_basename/dirname | Martin Willi | 2014-06-04 | 1 | -0/+19 | |
| | ||||||
* | windows: Provide a sched_yield() implementation | Martin Willi | 2014-06-04 | 2 | -2/+0 | |
| | ||||||
* | library: Change init/deinit order to allow utils to depend on threading | Martin Willi | 2014-06-04 | 1 | -0/+3 | |
| | ||||||
* | unit-tests: Don't test Unix socket stream/services on Windows | Martin Willi | 2014-06-04 | 1 | -1/+2 | |
| | ||||||
* | unit-tests: Use send/recv on socket in watcher tests | Martin Willi | 2014-06-04 | 1 | -4/+4 | |
| | | | | Windows does not support read/write on sockets. | |||||
* | unit-tests: Use Windows path for chunk tests, and socket functions if required | Martin Willi | 2014-06-04 | 1 | -2/+10 | |
| | ||||||
* | unit-tests: Don't depend on sockaddr_un to test invalid host_t family | Martin Willi | 2014-06-04 | 1 | -2/+2 | |
| | ||||||
* | unit-tests: Add support for Windows build | Martin Willi | 2014-06-04 | 2 | -27/+198 | |
| | | | | | Instead of signals we catch Windows exceptions. Currently not supported are timers, which is more a convenience thing anyway. | |||||
* | unit-tests: Sync threads with main thread in test_cleanup_cancel() | Tobias Brunner | 2014-05-19 | 1 | -0/+5 | |
| | | | | | Without synchronization threads could get canceled before they could disable their cancelability. | |||||
* | unit-tests: Allow some HTTP write operations to fail | Tobias Brunner | 2014-05-19 | 1 | -7/+12 | |
| | | | | | | Because CURLOPT_FAILONERROR is enabled in the curl plugin an error code will often (not always) cause the client to close the TCP connection before the server has written the complete response. | |||||
* | unit-tests: Add a test case for HTTP response codes | Tobias Brunner | 2014-05-19 | 1 | -8/+57 | |
| | ||||||
* | unit-tests: Defer failures by worker threads | Tobias Brunner | 2014-05-19 | 2 | -5/+36 | |
| | | | | | | | | | | | In some cases the main thread is not ready to immediately call siglongjmp(), e.g. if it currently holds a mutex that is later required during shutdown. Therefore, we delay handling errors in worker threads until the main thread performs the next check itself (or the test function ends). The same issue remains with SIGALRM. | |||||
* | unit-tests: Make sure plugins in the builddir are loaded | Tobias Brunner | 2014-05-19 | 1 | -1/+1 | |
| | | | | | | When running the tests in GDB the working directory apparently is different. With the relative path used previously the plugins would not be found and those installed on the system would get used. | |||||
* | unit-tests: Don't assert failures for unreadable settings files as root | Tobias Brunner | 2014-05-16 | 1 | -5/+8 | |
| | | | | The file can still be read by root even if nobody has read privileges. | |||||
* | enum: Return boolean result for enum_from_name() lookup | Martin Willi | 2014-05-16 | 1 | -21/+30 | |
| | | | | | | | | | | | Handling the result for enum_from_name() is difficult, as checking for negative return values requires a cast if the enum type is unsigned. The new signature clearly differentiates lookup result from lookup value. Further, this actually allows to convert real -1 enum values, which could not be distinguished from "not-found" and the -1 return value. This also fixes several clang warnings where enums are unsigned. | |||||
* | enum: Don't directly include enum.h | Martin Willi | 2014-05-16 | 1 | -1/+0 | |
| | | | | | To allow enum.h to depend on utils.h definitions, avoid its direct inclusion. Instead include utils.h, which includes enum.h as well. | |||||
* | settings: Adopt the new order of sections and settings when replacing configs | Tobias Brunner | 2014-05-15 | 1 | -1/+83 | |
| | ||||||
* | settings: Only purge sections if necessary | Tobias Brunner | 2014-05-15 | 1 | -0/+29 | |
| | | | | | Instead of removing and caching all values of a previous config, we only do this for actually removed sections/settings. | |||||
* | settings: Maintain order of sections and settings while enumerating | Tobias Brunner | 2014-05-15 | 1 | -57/+24 | |
| | ||||||
* | settings: Don't overwrite values in-place | Tobias Brunner | 2014-05-15 | 1 | -7/+16 | |
| | | | | | | | This is not thread safe. If threads are reading from pointers to existing values they could get a partially updated invalid value. Refactored assignment to a separate function. | |||||
* | unit-tests: Update settings tests to match new parser | Tobias Brunner | 2014-05-15 | 1 | -59/+124 | |
| | | | | | Empty settings are now ignored, strings are supported, newlines are handled properly (e.g. at the end of files) etc. | |||||
* | settings: Move to a separate folder | Tobias Brunner | 2014-05-15 | 1 | -1/+1 | |
| | ||||||
* | unit-tests: Document the supported env variables | Martin Willi | 2014-04-30 | 1 | -1/+7 | |
| | ||||||
* | unit-tests: Support strongswan.conf defined plugin list and base directory | Thomas Egerer | 2014-04-30 | 1 | -2/+8 | |
| | | | | | | | tests.load and tests.plugindir to allow the specification of the plugins to be loaded and the directory to load them from. Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com> | |||||
* | unit-tests: Allow configuration of libstrongswan via config | Thomas Egerer | 2014-04-30 | 1 | -10/+14 | |
| | | | | | | | | By setting the environment variable TESTS_STRONGSWAN_CONF, the unit tests can be asked to load a configuration file, thus enabling the tester to make use of the usual configuration settings. Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com> | |||||
* | unit-tests: Add a ck_assert_chunk_eq() convenience macro | Martin Willi | 2014-04-30 | 1 | -0/+18 | |
| |