summaryrefslogtreecommitdiffstats
path: root/tests/c-api
Commit message (Collapse)AuthorAgeFilesLines
* tests: Add ./run --test option.Richard W.M. Jones2012-06-261-2/+1
| | | | | | | This option, when added via TESTS_ENVIRONMENT = [...] $(top_builddir)/run --test allows us to run the tests and only print the full output (including debugging etc) when the test fails.
* tests: Fix broken workarounds for missing O_CLOEXEC.Richard W.M. Jones2012-06-222-2/+2
|
* Remove obsolete valgrind rule from C API tests.Richard W.M. Jones2012-04-181-5/+0
|
* test: Thread function is a candidate for attribute noreturn.Richard Jones2012-03-291-3/+1
| | | | | The start_test_thread function never returns, it is always cancelled by the main thread.
* Use O_CLOEXEC / SOCK_CLOEXEC for almost all file descriptors.Richard W.M. Jones2012-03-142-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | The presumption is that all file descriptors should be created with the close-on-exec flag set. The only exception are file descriptors that we want passed through to exec'd subprocesses (mainly pipes and stdin/stdout/stderr). For open calls, we pass O_CLOEXEC as an extra flag, eg: fd = open ("foo", O_RDONLY|O_CLOEXEC); This is a Linux-ism, but using a macro we can easily make it portable. For sockets, similarly: sock = socket (..., SOCK_STREAM|SOCK_CLOEXEC, ...); For accepted sockets, we use the Linux accept4 system call which allows flags to be supplied, but we use the Gnulib 'accept4' module to make this portable. For dup, dup2, we use the Linux dup3 system call, and the Gnulib modules 'dup3' and 'cloexec'.
* tests: Remove/fix unused variables warnings.Richard W.M. Jones2012-03-122-0/+2
|
* Test header file under C++.Richard W.M. Jones2012-03-042-0/+48
|
* test-user-cancel: Add \n to fprintf error messages.Richard W.M. Jones2012-02-151-6/+6
|
* Tempus fugit.Richard W.M. Jones2012-01-181-1/+1
| | | | Update all copyright dates to 2012.
* Allow /dev/null to be added multiple times.Richard W.M. Jones2012-01-101-29/+3
| | | | | | | | Change the test for duplicate drives so that you're allowed to add /dev/null multiple times. This corresponds to traditional usage. This amends commit be47b66c3033105a2b880dbc10bfc2b163b7eafe.
* launch: don't add a drive twiceWanlong Gao2012-01-091-3/+29
| | | | | | | | | | | | | | 1. Change the g->path to restore a absolute path instead of the mixed. 2. Check that if the adding drive is duplicated with the added drive. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> RWMJ: - Make sure abs_path is NULL before it is assigned, so freeing it will work along the error path. - Fix the test which added /dev/null multiple times.
* tests: Rename capitests -> tests/c-api.Richard W.M. Jones2011-12-2211-0/+1292