the ltmain.sh script, generated by libtoolize, does not seem to honor the AC_CONFIG_AUX_DIR parameter. As a
result, the configure script will fail. To work around this, remove the AC_CONFIG_AUX_DIR option
to place all generated scripts into the current directory.
This is half an issue report and half a pull request.
The reason for this is that while autoreconf -fi works for most of the
needed scripts it doesn't copy ltmain.sh into build-aux which results
the following ./configure failure:
configure.ac:137: error: required file 'build-aux/ltmain.sh' not found
This patch, which is a similar one I've provided to cloog[0] which
allows ./configure to at least complete.
I'm not sure what you think since obviously the directory was used for
some reason, likely to reduce top-level directory clutter, but this at
least works for me.
Joshua D. Boyd [Tue, 22 Mar 2016 04:50:34 +0000 (00:50 -0400)]
In cmake build, use mkstemp when present
This fixes this error, seen when building with cmake:
check/src/check_msg.c:247: warning: the use of 'tempnam' is dangerous, better use `mkstemp'
CMakeLists.txt checks for mkstemp being present and sents a cmake
variable HAVE_MKSTEMP. The check_msg.c file will use mkstemp if
HAVE_MKSTEMP is true, but the cmake variable wasn't causing HAVE_MKSTEMP
to be defined for the C compiler.
lib/strsignal.c: strsignal() should be not be declared const
POSIX requires strsignal() to return a pointer to a char, not a pointer
to a const char. [1] On uClibc, and possibly other libcs, this causes
problems with the correct declaration in string.h.
[1] man 3 strsignal
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Jan Pokorný [Tue, 1 Mar 2016 17:41:58 +0000 (18:41 +0100)]
Fix segfault when memmoving with negative/enormous n
I observed a segmentation fault caused by trying to memmove by -15,
which makes 18446744073709551601 on my 64-bit platform after an argument
type promotion (from int into size_t). In my case, this was connected
with filling up disk during the test facilitated by check, hence I derive
that the main issue was that not enough bytes for particular type of
message was actually read (and previously written, for that matter) and
because of this incompleteness, get_result happily consumed more bytes
than was read.
Additional debugging info at the point of segfault (src/check_pack.c):
> 468│ /* Move remaining data in buffer to the beginning */
> 469├> memmove(buf, buf + n, nparse);
> 470│ /* If EOF has not been seen */
> 471│ if(nread > 0)
>
> (gdb) p nparse
> $1 = -15
> (gdb) p n
> $2 = 23
> (gdb) p nread
> $3 = 0
Georg Sauthoff [Tue, 29 Dec 2015 17:10:52 +0000 (18:10 +0100)]
Use only POSIX conforming features of printf
This fixes 3 test failures on Solaris 10.
POSIX standardized printf, but the hex style \xHH sequences
aren't included in the standard. POSIX printf does understand
octal style \NNN sequences, though.
This should also work with shells where printf is a builtin (e.g.
on Lubuntu which probably uses dash).
Tested with xpg4-sh on Solaris 10 and bash/zsh/dash on Linux.
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.
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.
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
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.
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.
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.
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.
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.
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.