summaryrefslogtreecommitdiffstats
path: root/tests/queue-test.c
Commit message (Collapse)AuthorAgeFilesLines
* (multiple): Include stdint.hYong Bakos2016-07-251-0/+1
| | | | | | | | | | Some headers and source files have been using types such as uint32_t without explicitly including stdint.h. Explicitly include stdint.h where appropriate. Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* tests/queue-test: Add tests for proxy wrappersJonas Ådahl2016-04-291-0/+122
| | | | | | | | | | Test that doing wl_display.sync on a wrapped proxy with a special queue works as expected. Test that creating a wrapper on a destroyed but not freed proxy fails. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* tests: Pass argument to client mainJonas Ådahl2016-01-161-3/+3
| | | | | | | | | | | | 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>
* 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: split queue-test testcasesMarek Chalupa2014-12-011-1/+19
| | | | | | | | | All the test-cases are in one test atm. It doesn't matter for the outcome, but when it is split to more tests, the debugging and reading the output is simpler. Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* queue-test: put back timeoutMarek Chalupa2014-11-171-0/+2
| | | | | | | | In 93e654061b9 we removed call to alarm() that served as timeout in this test. Now when we have test_set_timeout() func, return the timeout back. Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
* queue-test: Add another assertionPhilip Withnall2014-11-051-1/+1
| | | | | | | | | Ensure that the round trip succeeds. Signed-off-by: Philip Withnall <philip at tecnocode.co.uk> Signed-off-by: Karsten Otto <ottoka at posteo.de> Reviewed-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* tests: use test compositor in queue-testMarek Chalupa2014-08-221-151/+29
| | | | | | | | | | | | | | | Most of the code of the queue-test is covered by the test compositor, so we can save few lines and use the test compositor instead. I think it's also more readable. This patch removes timeout from the test. We plan to add timeout to all tests later, though. v2. rebased to master Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* tests: remove unnecessary lines from queue-testMarek Chalupa2014-08-211-10/+0
| | | | | | | | | | | | | | | Earlier, the wl_display_dispatch_pending were setting number of thread that can dispatch events. This behaviour was removed later, so now these lines are redundant. Related commits: 385fe30e8b144a968aa88c6546c2ef247771b3d7 78cfa967681c965d23f6cbf76e080bbb0b564ff6 3c7e8bfbb4745315b7bcbf69fa746c3d6718c305 Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* tests: remove leaks from queue-testMarek Chalupa2014-08-211-0/+5
| | | | | | | Destroy all objects that we have created Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* tests: test the wl_display_roundtrip_queue() functionGiulio Camuffo2014-08-211-0/+74
| | | | | | | [Pekka Paalanen: moved variable declarations to before code. Added some comments, and added the re-arm to additionally test the opposite case.] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* queue-test: assert non-NULL return valuesU. Artie Eoff2014-01-151-0/+3
| | | | Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
* Replace two remaining wl_display_add_gloavl() occurencesKristian Høgsberg2013-07-091-2/+3
|
* queue-test: WEXITSTATUS() is undefined if WIFEXITED() is falseKristian Høgsberg2013-02-081-2/+3
| | | | | | If a child process dies from a signal, WIFEXITED() returns false and WEXITSTATUS() isn't well-defined. In this case, if the client segfaults, the status is 134 and WEXITSTATUS(134) is EXIT_SUCCESS, so we mask the error.
* tests: Add out of order delete_id queue testsJonas Ådahl2012-11-071-12/+96
| | | | | | | | Verify that when receiving the first of two synchronization callback events, destroying the second one doesn't cause any errors even if the delete_id event is handled out of order. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
* tests: Use a pipe for synchronization to avoid potential deadlockJonas Ådahl2012-11-071-24/+55
| | | | | | | Using signals in the previous way could potentially lead to dead locks if the SIGCONT was signalled before a listener was registered. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
* tests: Add queue test caseJonas Ådahl2012-11-051-0/+171
Check that after a callback removes a proxy that most likely will have several events queued up with the same target proxy, no more callbacks are invoked. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>