Nicholas Humfrey [Sun, 15 Jan 2017 23:19:03 +0000 (23:19 +0000)]
Fix for "invalid suffix on literal" error in clang
Invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
Branden Archer [Fri, 23 Dec 2016 04:01:21 +0000 (23:01 -0500)]
Disable SIGFPE tests for Cygwin until fixed
The test_fpe and test_mark_point tests currently fail on Cygwin.
Instead of the test process receiving a SIGFPE it instead fails
with a SIGSEGV. The reason is not yet know. However, attempting a
simple program that installs a SIGFPE handler then does a
raise(SIGFPE) does result in the handler being called.
This tests need to be enabled again once the reason for the failures
is resolved.
Branden Archer [Thu, 22 Dec 2016 19:13:18 +0000 (14:13 -0500)]
Remove usage of "lg" in printf format
MinGW on Windows does not "lg". The reason is that MinGW mixes
GCC and the MSVC runtime. For GCC a long double is either
96-bit or 128-bit type for long double on x86 or x64 targets
(see http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html).
However, MSVC uses a 64-bit type
(see http://msdn.microsoft.com/en-us/library/9cx8xs15.aspx).
That means for MSVC "double" and "long double" are the same.
Because of this mismatch, the "l" in "lg", which is safely ignored
on Linux and BSD systems is not safely ignored in MSVC systems
where GCC is used to compile. This issue does not arise when using
VS compiler on Windows.
Branden Archer [Sun, 18 Dec 2016 16:47:46 +0000 (11:47 -0500)]
Change how a tmp dir is found
It was found that on Windows the TMPDIR environment variable was
honored, but for Linux/et al it was not. This resulted in files ending
up in the build directory (the present directory when the tests
were run). As the test may not have permission to write in the build
directory, attempt to honor the P_tmpdir macro or TMPDIR environment
variable.
Branden Archer [Mon, 7 Nov 2016 01:32:26 +0000 (20:32 -0500)]
Use ctest on VC builds to run unit tests
msbuild was running the unit tests, but if a failure was hit
the output of the unit tests was not printed. As a result,
there was no indication as to what actually failed in a given
unit test program. Using ctest (part of CMake) should
output the unit test program's output for better failure
diagnosis.
Branden Archer [Sat, 5 Nov 2016 04:27:58 +0000 (00:27 -0400)]
Better error reporting for check_check_sub failures
If a unit test covered in check_check_sub fails report
the specific test case and test name, as to better identify
which test is failing and under what environment.
Branden Archer [Sun, 6 Nov 2016 14:01:40 +0000 (09:01 -0500)]
List test names in the master_tests table
Sometimes it is tricky to track down a unit test failure
as it is difficult to see which test actually failed.
To help make this easier all unit tests in the master_tests
table will now have the test name recorded. This will be
verified at unit test time as well, to ensure the test name
is accurate.
Branden Archer [Sat, 5 Nov 2016 04:14:52 +0000 (00:14 -0400)]
Add call for retrieving test name
This will be used internally to determine the current running test
and recording it during the check_check_sub tests in order to make
unit test failure debugging easier. The call may also be useful
for users of Check.
Support arbitrary tagging and selection of testcases.
A testcase can optionally have a list of tags associated with it.
Srunner can be run with an optional include list of tags and an optional
exclude list of tags. These will have the effect of filtering testcases
that would otherwise be run.
Reduce Timeout Double Scaling Tests scale to avoid UT failures
The test "test_sleep2_fail" is occasionally passing (failing to fail)
in the jenkins UT - perhaps 1.6 seconds doesn't give enough leeway ?
Making it 1.5 seconds so its in exactly in the middle of sleep1_pass
and sleep2_fail.
Branden Archer [Wed, 29 Jun 2016 02:12:23 +0000 (22:12 -0400)]
Do not report failure line numbers if file not setup
When running the master suite failure line numbers are written to
a file. Usually this is fine. However, the check_mem_leak.c test
re-uses the same tests. As a result, every time a failure is hit
a SEGV occurs because the file is never setup.
The memory leak test does not check against the line numbers,
so omitting these are fine. This fix prevents lots of SEGV
failures when running check_mem_leak.c under valgrind.
Branden Archer [Sun, 19 Jun 2016 20:52:26 +0000 (16:52 -0400)]
Disallow a test case from being added to a suite twice
It was possible to add a test case to a suite more than
once. When the suite is freed later on the test case is
freed twice, causing a double free error.
Although is likely a bug from the test writer, this change
allows check to disallow double additions to prevent
double freeing a test case.