Commit graph

18 commits

Author SHA1 Message Date
Dag-Erling Smørgrav
944782f506 Remove unnecessary headers. 2017-08-23 13:19:59 +02:00
Dag-Erling Smørgrav
3917a6dfd7 Annotate t_add_test() as printf()-like and fix the fallout. 2017-03-14 15:07:02 +01:00
Dag-Erling Smørgrav
f70dac496f Mechanically bump copyright dates to the date of the latest commit. 2017-02-19 20:07:43 +01:00
Dag-Erling Smørgrav
d8e26bc5bb Solve further asprintf() issues by sweeping them under the rug.
All further instances of asprintf() or vasprintf() in our codebase are either in libcryb-test or in individual unit tests, and in all cases, the only consequence of a failed call is that the result will say "no description" instead of either a description of the test or an explanation of how it failed.  Therefore, we can simply ignore the problem and cast the call to void to satisfy gcc.
2016-09-18 22:40:48 +02:00
Dag-Erling Smørgrav
e276f2b407 Ensure that we always have off_t and ssize_t in scope.
POSIX requires <stdio.h> and <unistd.h> to define off_t and ssize_t like <sys/types.h> does, but not all platforms respect that.  Play it safe by always including <sys/types.h>.
2016-09-15 10:15:00 +02:00
Dag-Erling Smørgrav
401465d8ea Move main() from libcryb-test to the test program.
Instead of having libcryb-test provide main() and assume that the test program defines t_prepare() and t_cleanup(), have libcryb-test provide a t_main() function which the test program calls with pointers to its prepare and cleanup functions.
2016-03-15 14:29:44 +01:00
Dag-Erling Smørgrav
f8ebdbc14d Move the test framework into its own subdirectory 2015-10-04 07:49:48 +00:00
Dag-Erling Smørgrav
8351719b84 Simplify test cases by a) using C99 VLAs and b) removing error checks for
allocation failures which are either harmless (e.g. failing to allocate
the test description string) or will trigger a segfault which the driver
now catches, allowing subequent test cases to run.
2015-08-19 11:27:48 +00:00
Dag-Erling Smørgrav
56eccb99fe Add two utility functions which check if a string contains something that
can be interpreted as either true or false.  Use this instead of a basic
non-NULL test for the CRYB_PERFTEST check.
2014-12-29 13:22:53 +00:00
Dag-Erling Smørgrav
37973b8705 Use CLOCK_MONOTONIC instead of the non-standard CLOCK_MONOTONIC_PRECISE.
Use librt if required for clock_gettime(2).
2014-10-30 12:56:47 +00:00
Dag-Erling Smørgrav
479ffbba4a Remove author and sponsor tags; we'll deal with that some other way.
Remove $Cryb$ tags as it is likely that the code will move to git.
2014-08-01 14:31:07 +00:00
Dag-Erling Smørgrav
8c9c5f26e4 Take advantage of t_compare_mem(). 2014-07-11 22:26:23 +00:00
Dag-Erling Smørgrav
729e501b79 Mechanical whitespace cleanup 2014-07-11 13:40:06 +00:00
Dag-Erling Smørgrav
cd10966e07 Make the performance tests conditional on a run-time environment variable
rather than a build-time option.
2014-07-11 00:18:34 +00:00
Dag-Erling Smørgrav
dff909ba65 Spell the name of the University of Oslo in English. 2014-07-10 17:15:54 +00:00
Dag-Erling Smørgrav
6da2e5388a Unbreak the performance tests. 2014-07-10 13:30:48 +00:00
Dag-Erling Smørgrav
601403cba3 Use custom keywords. 2014-07-04 11:20:46 +00:00
Dag-Erling Smørgrav
ae99587ba4 initial code drop 2014-07-04 11:18:53 +00:00