summaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2009-06-11Use a more "natural" way of writing argument lists in extra-opts tests.Thomas Guyot-Sionnest3-173/+137
2009-06-01Fix the memory allocation for the thresholds dataHolger Weiss1-1/+3
Allocate the appropriate amount of memory for storing the thresholds data. Before, we allocated the amount of memory required for storing a _pointer_ to the thresholds data. This crashed (at least) check_mysql when using its "-S" option on FreeBSD/amd64 (as reported and analyzed by Nikita Kalabukhov - 2797757). Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
2009-05-28check_snmp: Make use of standard threshold functionsThomas Guyot-Sionnest1-0/+3
This patch makes use of standard threshold functions. This allows using doubles as thresholds. Since SNMP supports only integers, double precision numbers are only printed when parsed from a STRING type. In addition, support for printing properly Timeticks type has been added, and the code has been thoroughly cleaned.
2009-01-26Make extract_value more generic:Thomas Guyot-Sionnest3-28/+34
Add a separator argument passed using defines.
2009-01-24Remove the commented out blocksThomas Guyot-Sionnest2-66/+0
The die tests are implemented in the test_*3.t files
2009-01-24Fix paths in test_ini testsThomas Guyot-Sionnest2-4/+4
2009-01-23Add die tests for parse_iniThomas Guyot-Sionnest6-5/+76
2009-01-22Return UNKNOWN if none of the default files can be found.Thomas Guyot-Sionnest2-9/+17
It makes no sense to return unknown if an implicit section is not found, but go on if the file is missing
2009-01-22Add die tests for extra-optsThomas Guyot-Sionnest5-10/+72
2009-01-21Move check_ntp's extract_value to utils_base.c.Thomas Guyot-Sionnest3-1/+145
This function can also be used to parse performance data strings which could be useful in the future.
2009-01-21Accidentally included built executables - also updated .gitignoreThomas Guyot-Sionnest2-0/+0
2009-01-21Some platform are missing setenvThomas Guyot-Sionnest8-98/+168
Instead of adding the gnulib module for solving tests only I split the test in two, setting environment from Perl for the later.
2009-01-21Fix (or try at least) for IRIX compile to tap testsThomas Guyot-Sionnest1-1/+1
Gnulib says: "$(LTLIBINTL) when linking with libtool, $(LIBINTL) otherwise" Everywhere else we use LTLIBINTL so I assume the tests should use it as well.
2009-01-18Re-apply "Cleanup; fix the way libraries are linked; Make-It-Simple(tm)"Thomas Guyot-Sionnest1-33/+4
This reverts commit 7449b16b1781c645751e2c05b93893e93630fb2a.
2009-01-15TypoThomas Guyot-Sionnest1-1/+2
2009-01-13Make /lib before /lib/tests to satisfy dependencies (building tests fails on ↵Thomas Guyot-Sionnest1-1/+1
IRIX)
2009-01-09Fix test from last commitThomas Guyot-Sionnest1-1/+1
2009-01-09basename check in test_utils.c was accidentaly added again.Thomas Guyot-Sionnest1-4/+0
In 538b97c I reverted a serie of libtap patch by Ton Voon; it included the removal of the useless basename check. Relevant portion of the changelog from which it was removed (f31cd40): Removed basename test as we should use base_name from GNUlib which is tested separately
2009-01-09Revert "Cleanup; fix the way libraries are linked; Make-It-Simple(tm)"Thomas Guyot-Sionnest2-5/+34
Trying to see if this has any relation to the tinderbox failure. I doubt it and will revert back as soon as it's tested. This reverts commit a97e5fbda21a05574b0e3c5a5118402ebfbbd13c.
2009-01-08Try to make IRIX happy (this fixes a similar warning in Solaris)Thomas Guyot-Sionnest1-1/+1
2009-01-07Cleanup; fix the way libraries are linked; Make-It-Simple(tm)Thomas Guyot-Sionnest2-34/+5
lib/Makefile.am | 2 +- lib/tests/Makefile.am | 37 ++++--------------------------------- 2 files changed, 5 insertions(+), 34 deletions(-)
2008-11-29Add Libtap as a bundled library (does not change any behaviour without ↵Thomas Guyot-Sionnest1-20/+29
--enable-libtap) Detects system library as pre-1.4.13 and does not install the built-in library anymore Tested on: - Linux x86_64, with and without local libtap (System libtap installed) - Linux x86, with and without local libtap (System libtap NOT installed) - Solaris SPARC, with and without local libtap, with and without system libtap installed
2008-11-28Revert inclusion of libtap into nagiospluginsThomas Guyot-Sionnest10-60/+85
(except for the NEWS file) This reverts the following commits (latest first): f3e0909, 9f16b54, be8df51, f31cd40, 5270c7d, a25083f, f1bfe40, c503d85 and 6c476db
2008-11-23Removing CVS/SVN tags and replacing with git-based versioningThomas Guyot-Sionnest13-29/+0
For contrib/, full tags have been imported from subversion git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2091 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-19Bulk EOL cleanupThomas Guyot-Sionnest3-9/+9
$ git diff --ignore-space-change|diffstat 0 files changed git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2087 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-19check_disk: rerpopulate the mount list after doing a stat() on paths ↵Thomas Guyot-Sionnest1-10/+9
specified with -p for better automount support. NB: There's a memory leak here - properly freeing the mount list would invlove much more work - there's many other places where leaks can happen so it should be a project on its own. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2085 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-05Need to add in the libgnu.la for Solaris and other platformsTon Voon1-1/+1
where missing functions have been replaced by GNUlib git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2071 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-05Fix calculation of extra-opts parameters.Thomas Guyot-Sionnest2-4/+3
By reading the current list instead of the additional one when counting parameters, extra-opts calculation was allocating insuficient space for the final array if later sections contained more arguments than the sum of all previously parsed sections. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2069 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-04Fixed the test (not the bug yet) and added similar one to test_ini (that one ↵Thomas Guyot-Sionnest2-12/+13
works) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2066 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-04Corrected test_opts planThomas Guyot-Sionnest1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2065 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-04Adding extra-opts check that crash on my prod servers (*** glibc detected ↵Thomas Guyot-Sionnest2-0/+31
*** malloc(): memory corruption: 0x0804e248 ***) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2064 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-04Make extra-opts (C plugins) behave more like N::P:Thomas Guyot-Sionnest2-5/+7
N::P allows both '#' and ';' for comments. Extra-opts used to allow only '#', it now allows both (';' is the standard for ini files) Extra-opts does not allow trailing comments anymore (like N::P) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2063 f882894a-f735-0410-b71e-b25c423dba1c
2008-08-21Correctly link to included libtap. Simplify invoking test scripts.Ton Voon10-84/+58
Removed basename test as we should use base_name from GNUlib which is tested separately git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2042 f882894a-f735-0410-b71e-b25c423dba1c
2008-08-21Typos in commentsThomas Guyot-Sionnest3-6/+6
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2035 f882894a-f735-0410-b71e-b25c423dba1c
2008-07-08check_procs captures stderr and adds to plugin output. This isTon Voon2-0/+19
from a merge of branch nagiosplug/branches/new_threshold_syntax 1979:1982 git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2019 f882894a-f735-0410-b71e-b25c423dba1c
2008-07-02Use tap.h from the libtap directoryTon Voon1-3/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2017 f882894a-f735-0410-b71e-b25c423dba1c
2008-06-26Adding libtap into distribution to help run C based testsTon Voon1-7/+9
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2013 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-04make parse_ini die like in N::P if section isn't foundThomas Guyot-Sionnest4-26/+26
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1976 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-02Delete obsolete filesThomas Guyot-Sionnest2-8/+0
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1974 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-02- Add --enable-extra-opts configure option for compiling extra-opts supportThomas Guyot-Sionnest5-7/+23
- Auto-update po/pot files git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1973 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-01fix the obvious...Thomas Guyot-Sionnest1-3/+3
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1972 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-01np_extra_opts now retain pointers from argv so that plugins can still ↵Thomas Guyot-Sionnest2-4/+4
overwrite sensitive options git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1971 f882894a-f735-0410-b71e-b25c423dba1c
2008-03-31Fix bug with --extra-opts as last argument with no valueThomas Guyot-Sionnest2-4/+16
Fix problem with duplicate function name (function should eventually move to /lib) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1969 f882894a-f735-0410-b71e-b25c423dba1c
2008-03-31Fix for last commit - I accidentaly broke my local Makefile and tests ↵Thomas Guyot-Sionnest6-17/+21
weren't being re-compiled. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1968 f882894a-f735-0410-b71e-b25c423dba1c
2008-03-30- Remove the last argument of np_extra_optsThomas Guyot-Sionnest3-86/+75
- Code cleanups and comments git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1967 f882894a-f735-0410-b71e-b25c423dba1c
2008-03-26write ini-file lookup function + testsThomas Guyot-Sionnest4-17/+138
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1962 f882894a-f735-0410-b71e-b25c423dba1c
2008-03-24Add extra-opts argument parsing with testsThomas Guyot-Sionnest5-0/+398
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1961 f882894a-f735-0410-b71e-b25c423dba1c
2008-03-24Replace broken usage of NAGIOS_CONFIG_PATH with a stub function (that will ↵Thomas Guyot-Sionnest2-9/+71
try to find a config file in the future...) Allow NULL locator (default file/section) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1960 f882894a-f735-0410-b71e-b25c423dba1c
2008-03-16Add tests:Thomas Guyot-Sionnest3-1/+42
- DOS-newline ini file - section defined twice git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1951 f882894a-f735-0410-b71e-b25c423dba1c
2008-03-15parse_ini now reads the default section if the request one can't be found.Thomas Guyot-Sionnest1-7/+12
All tests should return ok now. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1950 f882894a-f735-0410-b71e-b25c423dba1c