about summary refs log tree commit diff
path: root/support/check.h
Commit message (Collapse)AuthorAgeFilesLines
* support: Implement <support/descriptors.h> to track file descriptorsFlorian Weimer2018-12-061-0/+4
|
* support: Implement TEST_COMPARE_STRINGFlorian Weimer2018-11-071-0/+13
|
* support: Add TEST_COMPARE_BLOB, support_quote_blobFlorian Weimer2018-05-161-0/+22
| | | | | | | The declaration of support_test_compare_blob uses unsigned long int, to avoid including <stddef.h>. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* support: Increase usability of TEST_COMPAREFlorian Weimer2018-01-081-24/+11
| | | | | | | | | | | | | | | | | | | | | The previous implementation of the TEST_COMPARE macro would fail to compile code like this: int ret = res_send (query, sizeof (query), buf, sizeof (buf)); TEST_COMPARE (ret, sizeof (query) + 2 /* Compression reference. */ + 2 + 2 + 4 + 2 /* Type, class, TTL, RDATA length. */ + 1 /* Pascal-style string length. */ + strlen (expected_name)); This resulted in a failed static assertion, "integer conversions may alter sign of operands". A user of the TEST_COMPARE would have to add a cast to fix this. This patch reverts to the original proposed solution of a run-time check, making TEST_COMPARE usable for comparisons of numbers with types with different signedness in more contexts.
* support: Define support_static_assert for use with C and C++Florian Weimer2018-01-081-9/+16
| | | | And update TEST_COMPARE to use it, to make it usable from C++.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* support: Add TEST_COMPARE macroFlorian Weimer2017-12-041-0/+61
|
* support: Expose TEST_VERIFY_EXIT behavior to GCC optimizersFlorian Weimer2017-06-091-3/+7
| | | | | | | Previously, the implementation would conditionally exit based on the status argument, which GCC did not know about. This leads to false uninitialized variable warnings when data is accessed after a TEST_VERIFY_EXIT failure (from code which would never execute).
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* support: Use support_record_failure consistentlyFlorian Weimer2016-12-311-3/+7
| | | | | | | | This causes more test programs to link in the support_record_failure function, which triggers an early call to mmap from an ELF constructor, but this should not have side effects intefering with the functionality actually under test (unlike, say, a call to malloc).
* Add SYSV message queue testAdhemerval Zanella2016-12-281-0/+5
| | | | | | | | | | This patch adds a simple SYSV message queue test to check for correct argument passing on kernel. The idea is neither to be an extensive testing nor to check for any specific Linux test. * sysvipc/Makefile (tests): Add test-sysvmsg. * sysvipc/test-sysvmsg.c: New file. * test-skeleton.c (FAIL_UNSUPPORTED): New define.
* support: Add support for delayed test failure reportingFlorian Weimer2016-12-281-1/+37
| | | | | | The new functions support_record_failure records a test failure, but does not terminate the process. The macros TEST_VERIFY and TEST_VERIFY_EXIT check that a condition is true.
* support: Introduce new subdirectory for test infrastructureFlorian Weimer2016-12-091-0/+49
The new test driver in <support/test-driver.c> has feature parity with the old one. The main difference is that its hooking mechanism is based on functions and function pointers instead of macros. This commit also implements a new environment variable, TEST_COREDUMPS, which disables the code which disables coredumps (that is, it enables them if the invocation environment has not disabled them). <test-skeleton.c> defines wrapper functions so that it is possible to use existing macros with the new-style hook functionality. This commit changes only a few test cases to the new test driver, to make sure that it works as expected.