summaryrefslogtreecommitdiffstats
path: root/web/input/doc/faq/libtap.md
blob: c592030cef4f8524d10d50334fcf289935519398 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
title: libtap
parent: FAQ
---

# How do I prove the C routines work?

We use [libtap][libtap] to test C routines that are in `lib/utils_*.c`.  The
tests are in `lib/tests/test_*.c`.

The latest libtap version is currently 1.01.  However, there is a bug with the
thread implementation.  To workaround, run:

    $ CPPFLAGS="-UHAVE_LIBPTHREAD" ./configure
    $ make
    $ make check
    $ make install

Now when you run the Nagios Plugins `./configure` script, it should find the
libtap library and compile the tests and run them when you run `make` `test`.

*Update:* These days, the Nagios Plugins tarball includes a copy of libtap
which is used if you run `./configure` `--enable-libtap`.

[libtap]: http://jc.ngo.org.uk/trac-bin/trac.cgi/wiki/LibTap "libtap"

<!--% # vim:set filetype=markdown textwidth=78 joinspaces: # %-->