tests: Add a negative riemann_attribute_free() test case

The new test case checks that riemann_attribute_free() will set a
correct errno when called with a NULL pointer.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
tests: New negative test for riemann_client_connect()

When network tests are enabled, try connecting to a non-existant host
too, to test the behaviour on the error path.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
tests: Add a negative test for riemann_client_recv_message()

Make sure that riemann_client_recv_message() with a NULL pointer returns
the appropriate errno.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
tests: Add a few more negative and double tests for Events

When testing events, make sure to cover error cases, and overwriting
existing values too. This is to catch leaks, among other things.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
tests: More message tests

When testing messages, test error cases for correct return values, and
overwriting existing parts of a message, to catch leaks.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
tests: Improved query tests

When testing queries, also test error cases, and overwriting the query
string, to catch possible memory leaks.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Improve and add tests for the various _free() functions

The various riemann_*_free() functions should all set errno to EINVAL
when called with a NULL pointer.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
tests: Add a test for riemann_client_disconnect()

Calling riemann_client_disconnect() on a NULL pointer should return
-ENOTCONN.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Makefile.am: Add a coverage target

The coverage target assumes that the library was compiled with coverage
support (--coverage in CFLAGS and LDFLAGS), and lcov is installed. It
generates test coverage information for the library itself, generated
protocolbuffer things excluded.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>