| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Listing test suites in TESTS_SUITES_EXCLUDE allows excluding specific
test suites from running.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
If a DN starts with a slash (or whitespace and a slash) slashes will
be used, otherwise commas.
|
|
|
|
|
| |
For x86_64 it does not actually matter, but for i686 builds the call convention
is different with WINAPI.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
The usually used trivial '/' check won't work on Windows platforms.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Windows does not support read/write on sockets.
|
| |
|
| |
|
|
|
|
|
| |
Instead of signals we catch Windows exceptions. Currently not supported are
timers, which is more a convenience thing anyway.
|
|
|
|
|
| |
Without synchronization threads could get canceled before they could
disable their cancelability.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
The file can still be read by root even if nobody has read privileges.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
To allow enum.h to depend on utils.h definitions, avoid its direct inclusion.
Instead include utils.h, which includes enum.h as well.
|
| |
|
|
|
|
|
| |
Instead of removing and caching all values of a previous config, we only
do this for actually removed sections/settings.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Empty settings are now ignored, strings are supported, newlines are
handled properly (e.g. at the end of files) etc.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
|
|
|
|
| |
This reduces the chances of arbitrary test failures if the memory area
already got overwritten.
|
|
|
|
|
|
| |
The test runner deinit function often cancels all threads from the pool. This
operation might hang on error conditions, hence we should include that hook in
the test timeout to fail properly.
|
|
|
|
|
|
| |
A worker raises SIGUSR1 to inform the main thread that the test fails. The main
thread then starts cancelling workers, but the offending thread should be
terminated immediately to prevent it from test continuation.
|
|
|
|
|
| |
In case of sizeof(void*) == 8 and sizeof(int) == 4 on big-endian hosts
the tests failed as the actual integer value got cut off.
|