]> granicus.if.org Git - check/log
check
10 years agotests: escape % before passing string to ck_abort_msg()
brarcher [Wed, 30 Jul 2014 03:09:09 +0000 (03:09 +0000)]
tests: escape % before passing string to ck_abort_msg()

ch_abort_msg() expects printf arguments. Passing in a constant
string that happens to have '%' in it will not end as expected,
as the underlying vsnprintf will attempt to format them.

As some unit tests now attempt to have improper output involving
'%' in expressions, it is now possible that the failure message
which is expected during Check's unit tests involve '%'. As such,
only a properly escaped string should be passed to ck_abort_msg().

This change will force the string passed to ck_abort_msg() in the
test_check_failure_msgs unit test to properly escape any '%'
found, so that if a failure did happen the correct text is printed
to the screen.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1182 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoweb: add instructions for building on Solaris
brarcher [Sun, 27 Jul 2014 01:50:34 +0000 (01:50 +0000)]
web: add instructions for building on Solaris

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1181 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoNEWS: restore in development header
brarcher [Sat, 26 Jul 2014 15:21:54 +0000 (15:21 +0000)]
NEWS: restore in development header

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1180 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoweb: update release version on main page
brarcher [Sat, 26 Jul 2014 15:21:53 +0000 (15:21 +0000)]
web: update release version on main page

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1179 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUpdate for release
brarcher [Sat, 26 Jul 2014 04:31:17 +0000 (04:31 +0000)]
Update for release

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1177 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoweb: add link to solaris buildbot
brarcher [Sat, 26 Jul 2014 03:37:51 +0000 (03:37 +0000)]
web: add link to solaris buildbot

An automated build has been setup for the Check project on
OpenCSW's BuildBot, which builds for Solaris. The link leads
to the latest build status of Check on several architectures.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1176 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years ago* update for release
brarcher [Sat, 26 Jul 2014 03:37:48 +0000 (03:37 +0000)]
* update for release

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1175 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agocmake: include getline.c into libcompat if getline() is missing
brarcher [Thu, 3 Jul 2014 18:43:49 +0000 (18:43 +0000)]
cmake: include getline.c into libcompat if getline() is missing

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1174 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautotools: remove AIX fix for broken xlc v6 compiler
brarcher [Tue, 24 Jun 2014 13:00:29 +0000 (13:00 +0000)]
autotools: remove AIX fix for broken xlc v6 compiler

The issue with the xlc v6 compiler on AIX seems to be a compiler
bug which is resolved in future releases of the compiler.

This fix, as it turns out, did not properly detect the bug
or resolve the issue. Unless it becomes really important,
the attempt to get around the bug is removed from Check.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1173 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoProvide getline() if unavailable
brarcher [Tue, 24 Jun 2014 04:45:07 +0000 (04:45 +0000)]
Provide getline() if unavailable

getline() is POSIX.1-2008, but is unavailable on several platforms,
including MinGW and Solaris 10.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1172 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUse casts when assigning a void*
brarcher [Mon, 23 Jun 2014 04:13:57 +0000 (04:13 +0000)]
Use casts when assigning a void*

The changes are necessary for Check to compile with a c++ compiler.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1171 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoChange name 'new' to something else
brarcher [Mon, 23 Jun 2014 04:13:55 +0000 (04:13 +0000)]
Change name 'new' to something else

Change necessary for compiling on c++ compiler, as
'new' is a reserved name.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1170 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoAdd comment for why test should be CK_FORK mode only
brarcher [Mon, 23 Jun 2014 04:13:54 +0000 (04:13 +0000)]
Add comment for why test should be CK_FORK mode only

Some of these tests, now that checked fixtures can be used
with CK_NOFORK mode, may be enabled regardless of fork()
availability. This specific test, however, will not work as is
without fork().

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1169 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agorework how line numbers are verified in check_check_sub.c
brarcher [Mon, 23 Jun 2014 04:13:52 +0000 (04:13 +0000)]
rework how line numbers are verified in check_check_sub.c

Line number checking failures in check_check_sub.c are broken
and were broken since r527 (2009-02-02).

_STR(__LINE__) as is evaluates to "__LINE__", which results in -1
being returned from atoi. A -1 means to not check the line
number of the failure. As a result, no line numbers were checked
since r527. Checking with strtol finds the conversion failure,
which is what identified this bug.

Note that more redirection can be used to convert __LINE__ to a string,
e.g.:
   #define LINE_TO_STRING(Y) #Y
   #define _LINE_TO_STRING(Y) LINE_TO_STRING(Y)
   #define _STR(Y) _LINE_TO_STRING(Y)

However, then the line converted to a string is the line which references
the macro. I.e., not the line number of the test, which was expected.

The tests of the failure line numbers are valuable. To fix them,
instead of determining the values at compile time, they are determined
at run time. Whenever a test should fail, record_failure_line_num()
will be used to record the line number to a temporary file.
This in several cases required splitting up a test which was used
to induce a success and a failure. For such functions, there is
now a clear function to use when a success is required (no call
to record_failure_line_num()) and one to use when a failure
is required at a specific location (to call record_failure_line_num()).

The FILE pointer is created at the setup of the sub suite, and
deleted on the cleanup. The test_check_failure_lnos test then
will, for each failure, read the next line in the file and make
sure it matches the value reported by Check.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1168 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUse proper storage type for print_output
brarcher [Mon, 23 Jun 2014 04:13:50 +0000 (04:13 +0000)]
Use proper storage type for print_output

This fix was necessary to get Check compiling with a c++ compiler.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1167 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoPass in print_output to srunner_run_all in test_null
brarcher [Mon, 23 Jun 2014 04:13:48 +0000 (04:13 +0000)]
Pass in print_output to srunner_run_all in test_null

Change was necessary to get Check to compile on a c++
compiler

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1166 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoCast to ck_result_ctx in test_pack_ctx_limit
brarcher [Mon, 23 Jun 2014 04:13:46 +0000 (04:13 +0000)]
Cast to ck_result_ctx in test_pack_ctx_limit

This change was necessary to get Check compiling on a c++
compiler.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1165 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoPass in proper arguments for upack in test_pack_abuse
brarcher [Mon, 23 Jun 2014 04:13:44 +0000 (04:13 +0000)]
Pass in proper arguments for upack in test_pack_abuse

Even those the test 'abuses' upack, passing in a non-pointer
to a pointer argument is a bad idea.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1164 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoMove sub_nfailed/ntests vars inside check_check_master.c
brarcher [Mon, 23 Jun 2014 04:13:42 +0000 (04:13 +0000)]
Move sub_nfailed/ntests vars inside check_check_master.c

The header file check_check.h declaring these resulted in
multiple files creating storage but for duplicate names.

Only one of these (sub_ntests) was ever used outside of
check_check_master.c. Now it is accessable via an extern
declaration.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1163 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agocast upack_int() to goal container
brarcher [Mon, 23 Jun 2014 04:13:39 +0000 (04:13 +0000)]
cast upack_int() to goal container

Needed to get Check to compile on a c++ compiler

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1162 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoCase void* to pthread_mutex_t before passing to unlock
brarcher [Mon, 23 Jun 2014 04:13:37 +0000 (04:13 +0000)]
Case void* to pthread_mutex_t before passing to unlock

This change was necessary to get Check to compile on a
c++ compiler

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1161 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoCase void* to goal container for logging callbacks
brarcher [Mon, 23 Jun 2014 04:13:35 +0000 (04:13 +0000)]
Case void* to goal container for logging callbacks

These changes were necessary to get Check to compile on
a c++ compiler

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1160 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agocast value sent to srunner_set_fork_status to fork_status
brarcher [Mon, 23 Jun 2014 04:13:32 +0000 (04:13 +0000)]
cast value sent to srunner_set_fork_status to fork_status

The change is necessary for compiling Check with a c++ compiler.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1159 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoFix data type of internal fork_status variable
brarcher [Mon, 23 Jun 2014 04:13:29 +0000 (04:13 +0000)]
Fix data type of internal fork_status variable

This was necessary to compile Check with a c++ compiler.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1158 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoCase void* to goal container after using Check's lists
brarcher [Mon, 23 Jun 2014 04:13:21 +0000 (04:13 +0000)]
Case void* to goal container after using Check's lists

These changes were necessary to get Check to compile with
a c++ compiler.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1157 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoCase void* to goal container after emalloc()
brarcher [Mon, 23 Jun 2014 04:13:18 +0000 (04:13 +0000)]
Case void* to goal container after emalloc()

These changes were necessary to get Check to compile with
a c++ compiler.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1156 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoAllow checked fixtures when compiled without fork().
brarcher [Mon, 23 Jun 2014 04:13:16 +0000 (04:13 +0000)]
Allow checked fixtures when compiled without fork().

Previously such setup/teardown functions were disabled, as the
full contract for checked fixtures could not be honored. Checked
fixtures in CK_NOFORK mode are now closer to the contract, and are
now enabled.

Besides, it was possible to use checked fixtures if the system
had fork() but the tests were configured to run in CK_NOFORK mode.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1155 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUse US_PER_SEC instead of magic number
brarcher [Mon, 23 Jun 2014 04:13:13 +0000 (04:13 +0000)]
Use US_PER_SEC instead of magic number

Patch provided by Michael Piszczek

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1154 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoAdd DurationMsg to CheckMsg union
brarcher [Mon, 23 Jun 2014 04:13:11 +0000 (04:13 +0000)]
Add DurationMsg to CheckMsg union

As the CheckMsg union is passed around to the various
pack/upack functions, and a DurationMsg is valid to be
passed around, include it in the union just in case
the DurationMsg is or becomes larger than the other
members.

Patch provided by Michael Piszczek

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1153 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoInitialize buf before use
brarcher [Mon, 23 Jun 2014 04:13:09 +0000 (04:13 +0000)]
Initialize buf before use

Patch provided by Michael Piszczek

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1152 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoRemove unused declaration
brarcher [Mon, 23 Jun 2014 04:13:06 +0000 (04:13 +0000)]
Remove unused declaration

Patch provided by Michael Piszczek

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1151 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoFix checked teardown calls going into infinate loop in CK_NOFORK mode
brarcher [Mon, 23 Jun 2014 04:13:03 +0000 (04:13 +0000)]
Fix checked teardown calls going into infinate loop in CK_NOFORK mode

A test can be created with a checked teardown, where the teardown
would call some Check asserts. If the test was run in CK_NOFORK
mode and one of the asserts in the teardown failed, longjmp()
would be called, which would result in the setjmp() being returned
to which monitored the test function, and the checked teardowns
executed again. This lead to an infinate loop.

The fix* for this is to execute the checked teardowns in their
own setjmp() block. A test is added to ensure that CK_NOFORK
with a failed checked teardown does not go into an infinate loop.

In addition, the comments for the checked and unchecked
fixture API are updated to be more clear as to what occurs
for CK_FORK and CK_NOFORK mode.

* This reveals another problem: a failed checked teardown
reacts differently for CK_FORK and CK_NOFORK mode.

CK_FORK: the test is marked as failed
CK_NOFORK: the test is marked as passed

More work will need to be done to allow CK_NOFORK mode to also
cause a test to fail if the checked teardown fails.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1150 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoCombine checked and unchecked setup handling
brarcher [Mon, 23 Jun 2014 04:13:00 +0000 (04:13 +0000)]
Combine checked and unchecked setup handling

The code for checked and unchecked was very similar, and
was combined to simplify things.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1149 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoFix spacing
brarcher [Mon, 23 Jun 2014 04:12:58 +0000 (04:12 +0000)]
Fix spacing

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1148 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautotools: change check for floor() and __floor()
brarcher [Mon, 23 Jun 2014 04:12:55 +0000 (04:12 +0000)]
autotools: change check for floor() and __floor()

The reason AIX is having difficulty with floor() is that the
   AC_CHECK_LIB([m], [floor])
finds floor() in libm, however due to some header file stuff
(maybe) floor() cannot be used directly. Instead, there is likely
a definition for __floor() -> floor().

To check for this, floor() is detected in libm as normal. After,
determine if floor() can be used directly. If not, check if __floor()
is defined (not necessarily a function). If floor() is usable, do
that. If not but __floor() is available, try using that.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1147 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUpdate AUTHORS file
brarcher [Mon, 23 Jun 2014 04:12:53 +0000 (04:12 +0000)]
Update AUTHORS file

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1146 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUse env to find shell to use
brarcher [Thu, 19 Jun 2014 01:53:32 +0000 (01:53 +0000)]
Use env to find shell to use

On at least one platform (Solaris), the shell located at /bin/sh is
not a compliant shell. Using env as a form of redirection to find
a sh program, the PATH can be changed to find a compliant sh
to use. On platforms where /bin/sh is compliant, env should work
just fine.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1145 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautotools: fix floor() check
brarcher [Thu, 19 Jun 2014 01:53:30 +0000 (01:53 +0000)]
autotools: fix floor() check

The floor check did not work properly on Solaris.

The check yields this in config.h:

   #define HAVE_FLOOR $HAVE_FLOOR

which results in the following build failure:

   "libcompat.h", line 127: token not allowed in directive: $

This fix is provided by Georg Sauthoff.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1144 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautotools: include flag for AIX only if on AIX
brarcher [Sun, 15 Jun 2014 23:15:10 +0000 (23:15 +0000)]
autotools: include flag for AIX only if on AIX

Also, correcting comment about this being for Solaris.
It is for AIX instead.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1143 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautoconf: attempt to find __floor() if floor() is unavailable
brarcher [Sun, 15 Jun 2014 23:15:07 +0000 (23:15 +0000)]
autoconf: attempt to find __floor() if floor() is unavailable

On the AIX platform, floor() is not in libm, but
__floor() is an internal function in the compiler.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1142 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoRestore development header in NEWS
brarcher [Sat, 31 May 2014 00:45:48 +0000 (00:45 +0000)]
Restore development header in NEWS

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1141 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUpdate for release
brarcher [Sat, 31 May 2014 00:45:45 +0000 (00:45 +0000)]
Update for release

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1140 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUpdate for release
brarcher [Sat, 31 May 2014 00:09:01 +0000 (00:09 +0000)]
Update for release

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1138 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautoconf: add cflag for Solaris to enable c99 features
brarcher [Mon, 26 May 2014 21:03:09 +0000 (21:03 +0000)]
autoconf: add cflag for Solaris to enable c99 features

Without this flag, Solaris will fail to compile in check.h when
it hits the variable macros.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1137 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agochange first arg of timer_create to clockid_t
brarcher [Mon, 26 May 2014 21:03:06 +0000 (21:03 +0000)]
change first arg of timer_create to clockid_t

The clock id argument should have been of type
clockid_t.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1136 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoonly declare atexit() test if fork is available
brarcher [Wed, 21 May 2014 12:07:44 +0000 (12:07 +0000)]
only declare atexit() test if fork is available

The test is already disabled if fork is disabled.
No need to compile the code.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1135 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agouse atexit() instead of on_exit() for test
brarcher [Wed, 21 May 2014 03:28:07 +0000 (03:28 +0000)]
use atexit() instead of on_exit() for test

atexit() is POSIX, whereas on_exit() is not.
Specifically, on_exit() does not exist on
OpenBSD (and perhaps other platforms)

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1134 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUse env to find shell to use
brarcher [Mon, 12 May 2014 01:38:24 +0000 (01:38 +0000)]
Use env to find shell to use

On at least one platform (Solaris), the shell located at /bin/sh is
not a compliant shell. Using env as a form of redirection to find
a sh program, the PATH can be changed to find a compliant sh
to use. On platforms where /bin/sh is compliant, env should work
just fine.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1133 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoremove warnings about prototypes
brarcher [Fri, 9 May 2014 12:48:05 +0000 (12:48 +0000)]
remove warnings about prototypes

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1132 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautotools: find compliant sed to use
brarcher [Fri, 9 May 2014 12:41:02 +0000 (12:41 +0000)]
autotools: find compliant sed to use

On Solaris the default sed program in the PATH may not work
very well. Attempt to find a better one with the AC_PROG_SED macro

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1131 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUpdate AUTHORS file
brarcher [Fri, 9 May 2014 12:41:00 +0000 (12:41 +0000)]
Update AUTHORS file

For the changes that Georg is helping with

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1130 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoadd comment about not using -pedantic flag due to solaris issue
brarcher [Wed, 7 May 2014 11:03:17 +0000 (11:03 +0000)]
add comment about not using -pedantic flag due to solaris issue

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1129 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoupon test failure, invoke _exit() instead of exit()
brarcher [Wed, 7 May 2014 10:59:33 +0000 (10:59 +0000)]
upon test failure, invoke _exit() instead of exit()

exit() will call atexit handlers, which may try to
clean up things or wait for things to get cleaned up,
which we don't want or need. We just want to stop
and let the parent know about the failure as quickly
as possible in case fork() is used.

Fixes timeouts on assert failures in checks where
an exit handler waits for things to stop, but they
don't stop because they haven't been shut down,
and they haven't been shut down because there's no
simple way to do so on failures.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1128 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUpdate NEWS with bug#96 fix
brarcher [Wed, 7 May 2014 01:37:11 +0000 (01:37 +0000)]
Update NEWS with bug#96 fix

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1127 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agofix formatting for ck_assert_(u)int_* calls if using % operator
brarcher [Wed, 7 May 2014 01:32:50 +0000 (01:32 +0000)]
fix formatting for ck_assert_(u)int_* calls if using % operator

If an expression is used in any of the ck_assert_(u)int_* calls
that uses the % operator, for example:

ck_assert_int_eq(fs.write.slot % fs.slots_per_sector, i+1);

the result was the "% f" would be interpreted as a format string.

This fix prevents the issue by passing the entire expression as a
string, and feeding the underlying printf a "%s" argument instead.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1126 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years ago* add LT_INIT to configure.ac to build .la files
cpickett [Mon, 7 Apr 2014 16:16:46 +0000 (16:16 +0000)]
* add LT_INIT to configure.ac to build .la files

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1125 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: use pkg-config to find check
brarcher [Wed, 5 Mar 2014 02:19:32 +0000 (02:19 +0000)]
example: use pkg-config to find check

Moving away from the deprecated AM_PATH_CHECK to the
not-deprecated PKG_CHECK_MODULES

Based on patch submitted by Julien Godin

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1124 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoinclude signal.h in exit tests
brarcher [Wed, 19 Feb 2014 02:39:54 +0000 (02:39 +0000)]
include signal.h in exit tests

technically this should have been here before. However, the
autotools build did not need it, so it was not caught.
The CMake build requires it be in place to get the definition
of the SIGSEGV signal.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1123 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoadd test for tcase_add_loop_test_raise_signal
brarcher [Mon, 17 Feb 2014 12:07:52 +0000 (12:07 +0000)]
add test for tcase_add_loop_test_raise_signal

There was originally no test for this

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1122 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agofix spelling issue in test
brarcher [Sun, 16 Feb 2014 16:22:40 +0000 (16:22 +0000)]
fix spelling issue in test

The code changed 'occured' -> 'occurred', but the tests needed
to be changed as well.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1121 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agospacing
brarcher [Sun, 16 Feb 2014 05:20:41 +0000 (05:20 +0000)]
spacing

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1120 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoremove @since tag from fork_status enum
brarcher [Sun, 16 Feb 2014 05:20:39 +0000 (05:20 +0000)]
remove @since tag from fork_status enum

The intention was to have the @since tags on the
functions instead.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1119 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoMaking doxygen API page is now part of the release
brarcher [Sun, 16 Feb 2014 04:59:03 +0000 (04:59 +0000)]
Making doxygen API page is now part of the release

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1118 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoweb: reference new API page
brarcher [Sun, 16 Feb 2014 04:59:01 +0000 (04:59 +0000)]
web: reference new API page

The API page is Doxygen documentation refering to Check's
API in check.h

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1117 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: include doxygen config used to create API web page
brarcher [Sun, 16 Feb 2014 04:59:00 +0000 (04:59 +0000)]
doc: include doxygen config used to create API web page

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1116 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoFix a few spelling issues in check.h.in
brarcher [Sun, 16 Feb 2014 04:58:57 +0000 (04:58 +0000)]
Fix a few spelling issues in check.h.in

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1115 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoRemove documentation at top of check.h.in
brarcher [Sun, 16 Feb 2014 04:58:55 +0000 (04:58 +0000)]
Remove documentation at top of check.h.in

This documentation is captured better in other places, including
Check's documentation and examples.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1114 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoMake check.h.in Doxygen friendly
brarcher [Sun, 16 Feb 2014 04:58:52 +0000 (04:58 +0000)]
Make check.h.in Doxygen friendly

All prototypes and enums are now documented using javadoc.
Doxygen is able to convert this file into a web page displaying
Check's API. This will be used on Check's web page to display
what API is available and when it was introduced.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1113 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoconfigure.ac: add comment regarding not using -ansi
brarcher [Fri, 14 Feb 2014 10:59:03 +0000 (10:59 +0000)]
configure.ac: add comment regarding not using -ansi

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1112 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoconfigure.ac: print summary at end of configure
brarcher [Fri, 14 Feb 2014 10:59:00 +0000 (10:59 +0000)]
configure.ac: print summary at end of configure

The reason for the summary is mostly for convenience, when
trying Check out on different platforms.

This includes most of the possible configurable options.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1111 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: add info on using Valgrind to find memory leaks
brarcher [Sat, 8 Feb 2014 07:01:42 +0000 (07:01 +0000)]
doc: add info on using Valgrind to find memory leaks

This was prompted from a discussion on Check's user mailing
list.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1110 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: fix a few spelling mistakes
brarcher [Sat, 8 Feb 2014 07:01:35 +0000 (07:01 +0000)]
doc: fix a few spelling mistakes

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1109 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoweb: mention logging formats in Check description
brarcher [Sat, 8 Feb 2014 07:01:30 +0000 (07:01 +0000)]
web: mention logging formats in Check description

For some people, the logging format (e.g. TAP) is also important
to know.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1108 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoNEWS: Mention example now works with CMake
brarcher [Wed, 5 Feb 2014 16:08:57 +0000 (16:08 +0000)]
NEWS: Mention example now works with CMake

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1107 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoNEWS: mention fix for check_stdint.h for CMake builds
brarcher [Wed, 5 Feb 2014 16:08:53 +0000 (16:08 +0000)]
NEWS: mention fix for check_stdint.h for CMake builds

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1106 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoNEWS: Indent last entry
brarcher [Wed, 5 Feb 2014 16:08:50 +0000 (16:08 +0000)]
NEWS: Indent last entry

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1105 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: Mention that was tested on Windows 7 with CMake
brarcher [Wed, 5 Feb 2014 16:08:44 +0000 (16:08 +0000)]
example: Mention that was tested on Windows 7 with CMake

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1104 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: add info on config.h.in, which is part of the CMake example
brarcher [Wed, 5 Feb 2014 16:08:40 +0000 (16:08 +0000)]
example: add info on config.h.in, which is part of the CMake example

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1103 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: update docs to mention CHECK_INSTALL_DIR var
brarcher [Wed, 5 Feb 2014 16:08:36 +0000 (16:08 +0000)]
example: update docs to mention CHECK_INSTALL_DIR var

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1102 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoremove trailing white space
brarcher [Wed, 5 Feb 2014 16:08:31 +0000 (16:08 +0000)]
remove trailing white space

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1101 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: declare variables at top, for MSVC
brarcher [Wed, 5 Feb 2014 16:08:26 +0000 (16:08 +0000)]
example: declare variables at top, for MSVC

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1100 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: include stdint.h
brarcher [Wed, 5 Feb 2014 16:08:21 +0000 (16:08 +0000)]
example: include stdint.h

Without this, the intmax_t and uintmax_t definitions will not
be available on MSVC

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1099 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: include config.h
brarcher [Wed, 5 Feb 2014 16:08:15 +0000 (16:08 +0000)]
example: include config.h

Without it, the pid_t definition will be missed, which is needed
by check.h

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1098 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: add note about CHECK_INSTALL_DIR
brarcher [Wed, 5 Feb 2014 16:08:10 +0000 (16:08 +0000)]
example: add note about CHECK_INSTALL_DIR

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1097 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: provide intmax_t and uintmax_t if missing
brarcher [Wed, 5 Feb 2014 16:08:05 +0000 (16:08 +0000)]
example: provide intmax_t and uintmax_t if missing

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1096 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: Add CHECK_INSTALL_DIR override for FindCheck.cmake
brarcher [Wed, 5 Feb 2014 16:08:00 +0000 (16:08 +0000)]
example: Add CHECK_INSTALL_DIR override for FindCheck.cmake

If pkg-config is not installed on the system, then the
FindCheck.cmake script may fail. This is especially likely
on Windows. In this case, we expect that the variable
CHECK_INSTALL_DIR points to the install location of Check.

If this variable is not defined, then the find_path() and
find_library() functions will try to locate Check the
best that it can.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1095 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agocmake: install the check_stdint.h header
brarcher [Wed, 5 Feb 2014 16:07:55 +0000 (16:07 +0000)]
cmake: install the check_stdint.h header

This header is needed by check.h, but was not installed.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1094 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: fix typo in check.texi
brarcher [Tue, 4 Feb 2014 00:36:15 +0000 (00:36 +0000)]
doc: fix typo in check.texi

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1093 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: update check.texi with CMake tutorial
brarcher [Tue, 4 Feb 2014 00:36:12 +0000 (00:36 +0000)]
doc: update check.texi with CMake tutorial

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1092 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: MSVC wants the var decl at the top
brarcher [Tue, 4 Feb 2014 00:36:04 +0000 (00:36 +0000)]
example: MSVC wants the var decl at the top

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1091 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agocmake: install a check.cmake file to help configure projects
brarcher [Tue, 4 Feb 2014 00:35:56 +0000 (00:35 +0000)]
cmake: install a check.cmake file to help configure projects

If CMake was used to compile and install Check, then a check.cmake
file was generated and installed along with the library. If a project
wants to link against Check in this situation, then the project
will need to include that check.cmake file.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1090 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: add CMake based example
brarcher [Tue, 4 Feb 2014 00:35:43 +0000 (00:35 +0000)]
example: add CMake based example

This example does the same thing, just with CMake instead
of autotools.

Note that it uses a FindCheck.cmake file to locate
libcheck on the system using pkg-config. This file is
originally from the opensync project. Attribution and info
on how to find the original are included.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1089 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: clarify the autotools based example
brarcher [Tue, 4 Feb 2014 00:35:24 +0000 (00:35 +0000)]
example: clarify the autotools based example

there will be a CMake example later

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1088 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agosource test_output_strings from src tree tests dir
brarcher [Mon, 27 Jan 2014 04:41:52 +0000 (04:41 +0000)]
source test_output_strings from src tree tests dir

If Check is built out of tree, then the test_output_strings
file was expected to be in the build tree, which is not
where it is; it is in the source tree.

Now find the file in the same directory that the script is in.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1087 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoInclude test_output_strings in EXTRA_DIST
brarcher [Mon, 27 Jan 2014 04:41:50 +0000 (04:41 +0000)]
Include test_output_strings in EXTRA_DIST

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1086 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: mention setting '-' as filename to log to stdout
brarcher [Mon, 27 Jan 2014 03:18:47 +0000 (03:18 +0000)]
doc: mention setting '-' as filename to log to stdout

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1085 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoNEWS: Mention logging to stdout if file name is "-"
brarcher [Mon, 27 Jan 2014 03:18:45 +0000 (03:18 +0000)]
NEWS: Mention logging to stdout if file name is "-"

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1084 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoNEWS: start heading for ongoing development
brarcher [Mon, 27 Jan 2014 03:18:44 +0000 (03:18 +0000)]
NEWS: start heading for ongoing development

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1083 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoTODO: Update with info on previous and next release
brarcher [Mon, 27 Jan 2014 03:18:42 +0000 (03:18 +0000)]
TODO: Update with info on previous and next release

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1082 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoRun indent on source
brarcher [Mon, 27 Jan 2014 03:18:40 +0000 (03:18 +0000)]
Run indent on source

The indent program was run against the source, to enforce a consistent
layout and spacing. The following arguments were used:

--blank-lines-after-declarations --blank-lines-after-procedures
--brace-indent0 --case-indentation4 --case-brace-indentation0
--no-space-after-function-call-names --no-space-after-casts
--declaration-indentation1 --no-blank-lines-after-commas
--braces-after-struct-decl-line --braces-after-func-def-line
--continue-at-parentheses --preprocessor-indentation0  --indent-level4
--no-tabs --dont-break-procedure-type --no-space-after-parentheses
--no-space-after-for --no-space-after-if --no-space-after-while

Note that this was not run againt the test files for two reasons:
1) some of the tests depend on the failures occuring on specific lines,
and I did not want to go through and fix that for each test.
2) indent does not know what to do with END_TEST, and thinks it is a
type modifier for the function that follows.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1081 64e312b2-a51f-0410-8e61-82d0ca0eb02a