libnagios: Add tests for and fix bugs in iobroker_strerror()

Having such easily tested functions untested was just plain dumb,
which was proven quite quickly.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@1991 5f96b256-904b-4d8d-8c98-d829582c6739
.gitignore gcov files

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@1992 5f96b256-904b-4d8d-8c98-d829582c6739
lib/squeue: Avoid name clashes with pqueue()

This lets us include the pqueue.c file directly into tests alongside
squeue.c if we want to.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@1993 5f96b256-904b-4d8d-8c98-d829582c6739
lib/test-iobroker: Stop #include'ing iocache.c

It messes up coverage reports for iocache.c, so we'd best avoid it.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@1994 5f96b256-904b-4d8d-8c98-d829582c6739
lib/Makefile.in: Use debugging flags when building coverage tests

And also make test-suit fail hard if some tests don't pass.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@1995 5f96b256-904b-4d8d-8c98-d829582c6739
lib/test-squeue: Test squeue_add_[mu]sec() and pqueue_is_valid()

This increases coverage somewhat, which is nice.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@1996 5f96b256-904b-4d8d-8c98-d829582c6739
lib/test-squeue: Compute expected event priority after adding

The squeue library can (and does) sometimes change the time we pass
it as for when the event is supposed to run, which would cause a
failed testrun about once in 100 runs (probably due to the internal
clock switching second).

This patch fixes it, using the adjustments the squeue api does for
us to calculate the expected priority.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@1997 5f96b256-904b-4d8d-8c98-d829582c6739
Revert "Add #define NSCGI to all cgi programs"

This reverts commit e12af74551f8a897f6fb60c6d918b00447b56ebe. Since
NSCGI is defined on command-line when building things, we just got
a ton of warnings from this change.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@1998 5f96b256-904b-4d8d-8c98-d829582c6739
libnagios.h: Add the new api's

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@1999 5f96b256-904b-4d8d-8c98-d829582c6739
lib/kvvec: Fix pair counting

Previously we used to count the end-of-message marker as two
separate key/value pairs as well. With this patch, we avoid that
by disallowing nul bytes at the start of keys.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2000 5f96b256-904b-4d8d-8c98-d829582c6739
lib/test-kvvec: Add test for variable counts

Even though the kvvec tests are the crappiest of them all and
a proper testing toolkit is becoming pretty necessary, it's good
to have this written down so we get it tested once the toolkit is
in place.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2001 5f96b256-904b-4d8d-8c98-d829582c6739
lib/iocache: Make iocache_use_delim() properly mark all data used

It makes no sense to force callers to fiddle with adding or
subtracting the delimiter, so we remove it from the size calculation
and make sure we just pass the delimiter length along when marking
data as used in the io cache.

Tests are naturally fixed to reflect the new world order.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2002 5f96b256-904b-4d8d-8c98-d829582c6739
lib/Makefile.in: Add build dependencies for tests

Automagic one, almost certainly requiring GNU make, but since it's
for testing only we don't really care all that much.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2003 5f96b256-904b-4d8d-8c98-d829582c6739
Need to initialize check_result_info before SERVICECHECK_INITIATE for some NEBs
core: Broker the end of a timed event as well as the beginning
core: Trust dlopen to do the right thing. It isn't 1994 anymore.
Merge branch 'master' of github.com:cuitsyseng/nagioscore