aboutsummaryrefslogtreecommitdiffstats
path: root/tests/sanity-test.c
Commit message (Collapse)AuthorAgeFilesLines
* tests: Capture the test client logAlexandros Frantzis2023-02-281-0/+61
| | | | | | | Capture the test client log to a temporary fd, so that is accessible by both the test server process and the test client process. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
* tests: Fix tc_client_fd_leaks_exec testDerek Foreman2022-01-101-1/+1
| | | | | | | | | | tc_client_fd_leaks and tc_client_fd_leaks_exec are currently the exact same test. It seems clear from the name that the latter was intended to spawn sanity_fd_leak_exec instead of sanity_fd_leak. Fixes #121 Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
* tests: Remove memory leak checking infrastructureDaniel Stone2018-08-291-63/+3
| | | | | | | | | | | | | There are far better ways to detect memory leaks, such as either valgrind or ASan. Having Meson makes it really easy to use these tools in our tests, and we can do that in CI as well. Having these local wrappers actually completely broke ASan usage, so remove them in favour of using the more powerful options. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
* tests: Use volatile pointer for NULL dereferenceDaniel Stone2018-08-291-1/+3
| | | | | | | | | | | | Clang warns that it can silently discard a non-volatile write to a NULL pointer (perhaps it constitutes undefined behaviour?), and recommends changing it to volatile. This patch slavishly complies with the demand of the unfeeling machine. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
* tests: disable coredumps on sanity-testPekka Paalanen2018-03-151-0/+18
| | | | | | | | | | | | SEGV and ABRT by default cause a core dump, which may create a file, launch crash handlers, and so on. sanity-test has 21 processes that are expected to crash like this. Disable core dumps on them all. I counted 21 entries in coredumpctl list, while only 16 functions needed patching. After this patch no entries appear in coredumpctl list. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com>
* tests: Pass argument to client mainJonas Ådahl2016-01-161-10/+10
| | | | | | | | | | | | Change the API to pass an "void *" argument to the client main function, allowing the caller to call the same main function with different input. A helper (client_create_noarg) is added for when no argument is passed, and the existing test cases are changed to use this function instead. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* add wl_abort private functionMarek Chalupa2015-11-161-1/+6
| | | | | | | | | On many places in the code we use wl_log + abort or wl_log + assert(0). Replace these with one call to wl_abort, so that we don't mix abort(), assert(0) and we'll save few lines Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* tests: Update boilerplate from MIT X11 license to MIT Expat licenseBryce Harrington2015-06-121-16/+19
| | | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* tests: add possibility to disable leak check for single testMarek Chalupa2015-01-281-0/+13
| | | | | | | | | | In tests that are using external libraries (i. e. pthread) we can get failure because of leaks in the external library. Until we have some better solution (if ever), let these (and only these) tests to disable leak checks. Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* tests: add tests for leak check in clientsMarek Chalupa2015-01-281-0/+75
| | | | | | | | | Sanity tests for leak checks in clients of test compositor and also check if the test-compositor itself is not leaking anything. Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* tests: add timeout testsMarek Chalupa2014-11-171-0/+67
| | | | | | | | | | | sanity tests for timeouts. v2: use test_sleep instead of sleep add few more test-cases Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* tests: ensure sanity leak check tests pass when leak checks are disabled.U. Artie Eoff2012-08-291-0/+8
| | | | | | | This finalizes Robert Bradfords patch to allow NO_ASSERT_LEAK_CHECK environment variable to disable leak checks in unit tests. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
* tests: fix make check for out-of-tree buildsDylan Noblesmith2012-06-301-1/+1
| | | | | | | | | | It was failing with missing include files. While here, destroy the ugly "../src/..." include paths used in the tests that was just hacking around this problem in the Makefile: sed -i s/..\\/src\\/// tests/*.c
* tests: silence warnings from pipe()Pekka Paalanen2012-04-251-3/+5
| | | | | | | warning: ignoring return value of ‘pipe’, declared with attribute warn_unused_result Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* tests: support testing fd inheritance over execPekka Paalanen2012-04-201-0/+22
| | | | | | | Add facility for testing how (many) file descriptors survive an exec. This allows implementing O_CLOEXEC tests. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* tests: detect fd leaksPekka Paalanen2012-04-201-0/+8
| | | | | | | | Detect file descriptor leaks in tests. Add a sanity test to verify that we catch the leaks. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* tests: Add more sanity test to make sure we catch different failure modesKristian Høgsberg2012-04-191-0/+33
|
* tests: Make sure unused malloc() doesn't get optimized awayKristian Høgsberg2012-04-191-0/+2
|
* tests: add sanity-testPekka Paalanen2012-04-191-0/+52
Test the testing framework itself, so that it catches the errors we expect it to. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>