summaryrefslogtreecommitdiffstats
path: root/tests/c-api
Commit message (Collapse)AuthorAgeFilesLines
* tests: Replace 'make extra-tests' with individual tests.Richard W.M. Jones2012-11-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 'make extra-tests' was a monolithic set of tests that did all sorts of things: valgrind, tests over local guests, tests with upstream qemu, tests with upstream libvirt, tests with the appliance attach method. This made it hard to perform individual tests, eg. just valgrind testing. It was also hard to maintain because the tests were not located in the same directories as the programs and sometimes duplicated tests that were run elsewhere. This commit splits up 'make extra-tests' into 5 separate targets: make check-valgrind # run a subset of tests under valgrind make check-valgrind-local-guests # test under valgrind with local guests make check-with-appliance # test with attach-method == appliance make check-with-upstream-qemu # test with an alternate/upstream qemu make check-with-upstream-libvirt # test with an alternate/upstream libvirt (You can also still run 'make extra-tests' which is now simply a rule that runs the above 5 targets in order). This replaces everything that was in the tests/extra directory, so that has now gone.
* lib: Add a test for environment parsing functions.Richard W.M. Jones2012-10-152-2/+107
| | | | This updates commit 9466060201600db47016133d80af22eb38091a49.
* syntax: Remove definitions of O_CLOEXEC, except in examples (thanks Jim ↵Richard W.M. Jones2012-09-172-8/+0
| | | | | | | Meyering). The gnulib <fcntl.h> replacement header will now define this symbol if it's not defined already.
* Replace mount-options with mount where appropriate.Richard W.M. Jones2012-08-182-2/+2
| | | | | | Since our minimum supported version is now 1.16 and mount was fixed in 1.13.16, it is now safe to replace mount-options + empty options with mount wherever it occurs.
* tests: Better way to ensure 'g' is used and return success or error.Richard W.M. Jones2012-07-112-4/+2
|
* tests: Reformat TESTS_ENVIRONMENT so all use a standard format.Richard W.M. Jones2012-06-281-2/+1
| | | | No functional change.
* 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