]> granicus.if.org Git - check/log
check
9 years agoUpdate release process for GitHub
Branden Archer [Thu, 24 Dec 2015 20:19:28 +0000 (15:19 -0500)]
Update release process for GitHub

9 years agoRemove mention of SVN from HACKING
Branden Archer [Thu, 24 Dec 2015 20:14:27 +0000 (15:14 -0500)]
Remove mention of SVN from HACKING

9 years agoMerge pull request #4 from brarcher/master
brarcher [Thu, 24 Dec 2015 18:33:40 +0000 (13:33 -0500)]
Merge pull request #4 from brarcher/master

Deleting .cvsignore

9 years agoDeleting .cvsignore
brarcher [Thu, 24 Dec 2015 15:53:43 +0000 (10:53 -0500)]
Deleting .cvsignore

No longer need this, not in cvs anymore

9 years agoRemove information about packages in README
Branden Archer [Thu, 24 Dec 2015 03:39:23 +0000 (22:39 -0500)]
Remove information about packages in README

This information is likely no longer relevant or important

9 years agoMention new project page in README
Branden Archer [Thu, 24 Dec 2015 03:38:57 +0000 (22:38 -0500)]
Mention new project page in README

9 years agoweb: update webpage to point to github instead of sourceforge
Branden Archer [Thu, 24 Dec 2015 03:28:51 +0000 (22:28 -0500)]
web: update webpage to point to github instead of sourceforge

9 years agocheckmk: use double slash in regular expression
brarcher [Wed, 23 Dec 2015 16:59:04 +0000 (16:59 +0000)]
checkmk: use double slash in regular expression

For many awk implementations using both a single and double slash
escapes in regex expressions in strings works correctly. However,
it was observed on Solaris that a single slash results in the
literal value being added to the string (e.g. \n was a newline)
and only the double slash works as expected.

As there should be no harm, updating the regex expressions to use
double slashes.

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

9 years agotests: fix expected strings for output tests when fork is unavailable
brarcher [Mon, 14 Sep 2015 02:11:58 +0000 (02:11 +0000)]
tests: fix expected strings for output tests when fork is unavailable

There were a few discrepancies with the expected output and the
actual output for the special characters test.

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

9 years agotests: properly emit issue in log output test
brarcher [Mon, 14 Sep 2015 01:25:16 +0000 (01:25 +0000)]
tests: properly emit issue in log output test

The expected string was in ${2}, but ${expected} was used.

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

9 years agotests: if xmllint exists, also run xml output through it
brarcher [Mon, 14 Sep 2015 01:25:14 +0000 (01:25 +0000)]
tests: if xmllint exists, also run xml output through it

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

9 years agoEmit only valid XML characters
brarcher [Mon, 14 Sep 2015 01:25:13 +0000 (01:25 +0000)]
Emit only valid XML characters

Previously output XML files could contain illegal characters.
Some of these characters could be encoded, and others should
not be output at all.

This change will attempt to encode characters if they are not
printable or are special. Note that if a test contains a UTF-8
charater it will not be printed out accurately.

In order to get the tests for encoding XML characters to work,
the characters separating fields in a shell variable needed to
be changed. Originally white space would separate fields,
meaning shell would eat the extra whitespace in the tests.
Because of the change, the xml output test needed to be
reworked to not rely on white space field separators.
Additionally, the printf program is used to properly un-escape
strings used in the tests.

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

9 years agouse filterdiff tool if available to strip timestamps from example
brarcher [Sun, 13 Sep 2015 21:55:50 +0000 (21:55 +0000)]
use filterdiff tool if available to strip timestamps from example

The diff tool will emit a timestamp along with the diff. This
timestamps prevents build output from being consistent between
builds.

If the filterdiff tool is detected, use it to strip the timestamp
and allow for reproducible build output.

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

9 years agoUpdate FSF address in LGPL headers
brarcher [Sun, 13 Sep 2015 16:39:09 +0000 (16:39 +0000)]
Update FSF address in LGPL headers

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

9 years agoAdd LGPL header to files without the header
brarcher [Sun, 13 Sep 2015 16:39:05 +0000 (16:39 +0000)]
Add LGPL header to files without the header

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

9 years agoAdd development header back to NEWS
brarcher [Sun, 2 Aug 2015 19:49:55 +0000 (19:49 +0000)]
Add development header back to NEWS

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

9 years agoUpdate release information on website 0.10.0
brarcher [Sun, 2 Aug 2015 19:49:53 +0000 (19:49 +0000)]
Update release information on website

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

9 years agoUpdate for release
brarcher [Sun, 2 Aug 2015 19:22:58 +0000 (19:22 +0000)]
Update for release

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

9 years agoUpdate for release
brarcher [Sun, 2 Aug 2015 19:21:14 +0000 (19:21 +0000)]
Update for release

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

9 years agoconfigure: Remove duplicated use of AC_USE_SYSTEM_EXTENSIONS
brarcher [Sun, 2 Aug 2015 16:59:36 +0000 (16:59 +0000)]
configure: Remove duplicated use of AC_USE_SYSTEM_EXTENSIONS

Either the first or the second one is redundant so one should be
removed but beware, there's a bug introduced in automake 1.14
(fixed in 1.15) that would potentially cause trouble if you put it
before AM_INIT_AUTOMAKE.

More info about this automake bug here:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15981

https://sourceforge.net/p/check/bugs/109

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

9 years agotests: adjust expected line number due to previous commit
brarcher [Mon, 6 Jul 2015 23:29:02 +0000 (23:29 +0000)]
tests: adjust expected line number due to previous commit

A header was added to the program under test, which adjusted the
line numbers.

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

9 years agotests: include missing libcompat header
brarcher [Mon, 6 Jul 2015 13:20:31 +0000 (13:20 +0000)]
tests: include missing libcompat header

This header is necessary one some platforms where some portions
of check.h are unrecognized. For example, using the MSVC compiler
on Windows the pid_t usage in check.h results in a compiler error.

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

9 years agotests: define variable at top of block
brarcher [Mon, 6 Jul 2015 13:20:28 +0000 (13:20 +0000)]
tests: define variable at top of block

Some compilers may be picky about defining variables at the
beginning of the block.

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

9 years agoreplace // comments with /* */ comments
brarcher [Mon, 6 Jul 2015 13:20:26 +0000 (13:20 +0000)]
replace // comments with /* */ comments

Some compilers are strict with only accepting C style
block comments

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

9 years agodoc: Change "Variables" -> "Variables" for consistency
brarcher [Mon, 6 Jul 2015 13:20:24 +0000 (13:20 +0000)]
doc: Change "Variables" -> "Variables" for consistency

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

9 years agodoc: Add appendix containing all environment variables
brarcher [Mon, 6 Jul 2015 03:28:35 +0000 (03:28 +0000)]
doc: Add appendix containing all environment variables

Bug#33

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

9 years agoconfigure: fix check micro version
brarcher [Sun, 14 Jun 2015 16:07:03 +0000 (16:07 +0000)]
configure: fix check micro version

This was not updated during the last release. Although it is technically
still out of date (as this is now check 0.9.14+), it is at least
a little more correct.

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

9 years agoconfigure: output check version in summary
brarcher [Sun, 14 Jun 2015 16:07:02 +0000 (16:07 +0000)]
configure: output check version in summary

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

9 years agoconfigure: do not use echo -n option in summary print out
brarcher [Sun, 14 Jun 2015 15:55:09 +0000 (15:55 +0000)]
configure: do not use echo -n option in summary print out

OSX's version of echo does not support the -n option, and thus the
summary output looked incorrect.

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

9 years agotests: remove unused variables from main()
brarcher [Sun, 14 Jun 2015 15:55:08 +0000 (15:55 +0000)]
tests: remove unused variables from main()

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

9 years agotests: fix compiler warning regarding improper prototype
brarcher [Sun, 14 Jun 2015 15:55:05 +0000 (15:55 +0000)]
tests: fix compiler warning regarding improper prototype

Clang warned that this prototype was not proper as it had
no parameter list, and insisted on 'void'.

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

9 years agocmake: Include time.h on several checks to prevent false negatives
brarcher [Sun, 14 Jun 2015 15:55:02 +0000 (15:55 +0000)]
cmake: Include time.h on several checks to prevent false negatives

The clock_t, clockid_t and timer_t types are deemed not found when they
are actually available if time.h is included. Include the header during
the checks.

Patch#53

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

9 years agoCatch SIGINT and SIGTERM and kill running tests
brarcher [Thu, 7 May 2015 03:16:26 +0000 (03:16 +0000)]
Catch SIGINT and SIGTERM and kill running tests

Tests are forked and placed into their own process group.
If the test runner process receives a terminal signal it
exits but the test continue running. This could result
in test processes running indefinitely if they do not
exit themselves.

This changes catches SIGINT and SIGTERM signals and kills
the test processes.

Note that other signals, such as SIGSEGV and SIGFPE will still
result in test processes being leaked.

This code is based on that in patch #52.

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

9 years agoChange behavior of calls for fork() on non-fork() platforms
brarcher [Thu, 7 May 2015 03:16:23 +0000 (03:16 +0000)]
Change behavior of calls for fork() on non-fork() platforms

It was requested by users of Windows (e.g. non-fork() supporting
platforms) that calls to set CK_FORK mode be ignored if fork()
is not supported. This is to avoid the need to detect the
current platform and conditionally compile unit test code.

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

9 years agoupdate AUTHORS file
brarcher [Sun, 15 Mar 2015 02:23:38 +0000 (02:23 +0000)]
update AUTHORS file

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

9 years agoUpdate NEWS
brarcher [Thu, 12 Mar 2015 13:02:04 +0000 (13:02 +0000)]
Update NEWS

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

9 years agoadd extra space around comparison operators for assert messages
brarcher [Thu, 12 Mar 2015 12:58:57 +0000 (12:58 +0000)]
add extra space around comparison operators for assert messages

The following argument was made in the report of bug #102 to
include extra space around the comparison operator in
assert messages:

When ck_assert_int_gt(1 + 2, 3 + 4) fails, it outputs a string like this:

   Assertion '1 + 2>3 + 4' failed: 1 + 2==3, 3 + 4==7

This doesn’t look nice, since most programmers write spaces around comparison operators.
Therefore, the assertion message should do the same.

   Assertion '1 + 2 > 3 + 4' failed: 1 + 2 == 3, 3 + 4 == 7

For condensed code, it would look like this:

   Assertion '1+2 > 3+4' failed: 1+2 == 3, 3+4 == 7

I think the versions with the spaces look nicer than those without.

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

9 years agoDo not remove check.info during 'clean' target
brarcher [Thu, 12 Mar 2015 02:50:43 +0000 (02:50 +0000)]
Do not remove check.info during 'clean' target

It was observed that if one does not have texinfo installed
and invoked "make clean" then a subsequent build will fail
because the docs cannot be built. The issue is that
"make clean" will remove check.info and require it be rebuilt.

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

9 years agoUse mkstemp() if available instead of tmpfile() or tempnam()
brarcher [Thu, 12 Mar 2015 02:31:57 +0000 (02:31 +0000)]
Use mkstemp() if available instead of tmpfile() or tempnam()

This is based on patch #51 submitted by Neos3452 from Sourceforge.

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

10 years agotests: expect location of file based on srcdir
brarcher [Fri, 28 Nov 2014 15:35:33 +0000 (15:35 +0000)]
tests: expect location of file based on srcdir

Otherwise, when the test is run out of the source tree
the test will fail.

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

10 years agoadd test_check_nofork_teardown.sh to EXTRA_DIST
brarcher [Fri, 28 Nov 2014 06:05:42 +0000 (06:05 +0000)]
add test_check_nofork_teardown.sh to EXTRA_DIST

Otherwise, the prereleasecheck target will fail

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

10 years agoChange spacing.
brarcher [Fri, 28 Nov 2014 05:50:23 +0000 (05:50 +0000)]
Change spacing.

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

10 years agoreport correct error if teardown after failure in no fork mode
brarcher [Fri, 28 Nov 2014 05:50:22 +0000 (05:50 +0000)]
report correct error if teardown after failure in no fork mode

In nofork mode, the location of a failed assertion within a test
case is lost if that test case has a checked teardown fixture
(even if that fixture function is empty).

The reason why this happens is this: the end of the message sequence
coming down the pipe is CK_MSG_LOC (location of failing test),
CK_MSG_FAIL, CK_MSG_CTX (TEARDOWN). It is this final message that
confuses things, because rcvmsg_update_ctx() updates rmsg->lastctx
(which I suspect is the right thing for it to do), which is the ctx
value used by the first 'if' body in construct_test_result() in its
call to tr_set_loc_by_ctx().

The solution is to initialize tr->ctx to rmsg->failctx if
it is not CK_CTX_INVALID.

Bug #99.

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

10 years agoautotools: change automake requirement to 1.11.2
brarcher [Tue, 23 Sep 2014 01:29:02 +0000 (01:29 +0000)]
autotools: change automake requirement to 1.11.2

The AM_PROG_AR macro was introduced into Automake 1.11.2
(Dec 2011), which is used in Check's configure script and
in the example's. Check for this version of Automake
instead.

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

10 years agodoc: change 'mimick' -> 'mimic'
brarcher [Tue, 19 Aug 2014 12:22:56 +0000 (12:22 +0000)]
doc: change 'mimick' -> 'mimic'

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

10 years agodoc: mention that the output from "make check" depends on Automake version
brarcher [Tue, 19 Aug 2014 12:22:54 +0000 (12:22 +0000)]
doc: mention that the output from "make check" depends on Automake version

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

10 years agoupdate online docs during updateweb
brarcher [Tue, 19 Aug 2014 12:22:52 +0000 (12:22 +0000)]
update online docs during updateweb

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

10 years agodoc: change phrasing on request for corrections to docs.
brarcher [Tue, 19 Aug 2014 01:21:37 +0000 (01:21 +0000)]
doc: change phrasing on request for corrections to docs.

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

10 years agodoc: update docs to deprecate AM_PATH_CHECK, mention CMake
brarcher [Tue, 19 Aug 2014 01:21:35 +0000 (01:21 +0000)]
doc: update docs to deprecate AM_PATH_CHECK, mention CMake

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

10 years agodoc: update copyright on docs
brarcher [Tue, 19 Aug 2014 01:21:30 +0000 (01:21 +0000)]
doc: update copyright on docs

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

10 years agotests: cast output of malloc() to goal type
brarcher [Wed, 30 Jul 2014 12:49:11 +0000 (12:49 +0000)]
tests: cast output of malloc() to goal type

clang++ did not like casting void* to char* implicitly.

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

10 years agotests: add prototype for escape_percent()
brarcher [Wed, 30 Jul 2014 12:49:08 +0000 (12:49 +0000)]
tests: add prototype for escape_percent()

clang++ emitted an error if the prototype was not present

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

10 years agoDo not vsnprintf expression string passed to ck_abort()
brarcher [Wed, 30 Jul 2014 03:09:12 +0000 (03:09 +0000)]
Do not vsnprintf expression string passed to ck_abort()

If ck_abort() detects a failure, the expression which was
evaluated is passed to _ck_assert_failed to print.
However, the previous behavior was to send the expression
to vsnprintf(), which would expect it to be properly formatted.

If the expression in ck_abort() contained % characters, such as:
   ck_abort(bar%foo == 0)
the "%f" portion would be printed as some non-existent floating
point number.

Now, if there is no message passed (and the expression is to
be used) simply report the expression as is. Only format
something with vsnprintf() if there is actual data that
expects formatting.

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

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