Code

sysdb.git
10 years agoplugin: Split sdb_plugin_load() into multiple functions.
Sebastian Harl [Sat, 19 Apr 2014 09:33:47 +0000 (11:33 +0200)]
plugin: Split sdb_plugin_load() into multiple functions.

… to make it easier to reuse parts of the function.

10 years agoplugin: Fixed detection of plugins loaded twice.
Sebastian Harl [Sat, 19 Apr 2014 09:22:17 +0000 (11:22 +0200)]
plugin: Fixed detection of plugins loaded twice.

This was missing in commit fdfe2a68ba1838cdb1c34d3275d129fb217fbd9d.

10 years agoplugin: Keep a global reference of a plugin context if it's still in use.
Sebastian Harl [Fri, 18 Apr 2014 12:59:09 +0000 (14:59 +0200)]
plugin: Keep a global reference of a plugin context if it's still in use.

D'oh!

10 years agoplugin: Increment ref-count for a context stored in the TSD.
Sebastian Harl [Fri, 18 Apr 2014 12:50:11 +0000 (14:50 +0200)]
plugin: Increment ref-count for a context stored in the TSD.

… and release it when removing it from the TSD. While this shouldn't matter
when everything is done right, this ensures that memory management is done
right.

10 years agoplugin: Only log a message when actually unloading a module.
Sebastian Harl [Fri, 18 Apr 2014 12:42:08 +0000 (14:42 +0200)]
plugin: Only log a message when actually unloading a module.

10 years agoplugin: Unload (dlclose) a plugin when it's no longer used.
Sebastian Harl [Fri, 18 Apr 2014 12:35:35 +0000 (14:35 +0200)]
plugin: Unload (dlclose) a plugin when it's no longer used.

Do so, if the init callback failed.

10 years agoplugin: Name the plugin context after the actual module name.
Sebastian Harl [Fri, 18 Apr 2014 12:31:24 +0000 (14:31 +0200)]
plugin: Name the plugin context after the actual module name.

That is, the name as specified by the user without '::' replaced by '/'.
The latter is only used for loading the shared object by file-name.

10 years agosysdbd: Fixed a config parser error message.
Sebastian Harl [Fri, 18 Apr 2014 12:27:52 +0000 (14:27 +0200)]
sysdbd: Fixed a config parser error message.

10 years agoplugin: Keep a usage counter for each plugin.
Sebastian Harl [Fri, 18 Apr 2014 11:57:00 +0000 (13:57 +0200)]
plugin: Keep a usage counter for each plugin.

Also, let plugin_load return early if the plugin is already loaded.
This is mostly in preparation for future improvements around plugin handling.

10 years agosysdbd: Moved main loop handling into a separate function.
Sebastian Harl [Thu, 17 Apr 2014 06:51:09 +0000 (08:51 +0200)]
sysdbd: Moved main loop handling into a separate function.

This will allow for easier restart of the main loop.

10 years agollist_test: Removed "llist" from all test names.
Sebastian Harl [Mon, 14 Apr 2014 17:50:51 +0000 (19:50 +0200)]
llist_test: Removed "llist" from all test names.

No need to use overly long names.

10 years agollist utils: Added sdb_llist_remove_by_name().
Sebastian Harl [Mon, 14 Apr 2014 17:49:22 +0000 (19:49 +0200)]
llist utils: Added sdb_llist_remove_by_name().

This function removes the first entry with the specified name.

10 years agollist_test: Removed "sdb" from test names.
Sebastian Harl [Mon, 14 Apr 2014 17:39:29 +0000 (19:39 +0200)]
llist_test: Removed "sdb" from test names.

10 years agofrontend: Force-close the connection in sdb_connection_close().
Sebastian Harl [Fri, 11 Apr 2014 07:18:28 +0000 (09:18 +0200)]
frontend: Force-close the connection in sdb_connection_close().

Previously, it would still be kept open if someone else referenced the object.

10 years agoFrontend: Improve debug log when destroying a connection.
Sebastian Harl [Fri, 11 Apr 2014 07:15:56 +0000 (09:15 +0200)]
Frontend: Improve debug log when destroying a connection.

The file-descriptor associated with the connection might not be open any more
and, thus, be -1. Instead of using that in the message, use the connection's
object name which includes the file-descriptor as used when accepting the
connection.

10 years agofrontend: Fixed a memory leak in the connection context handler.
Sebastian Harl [Fri, 11 Apr 2014 07:13:55 +0000 (09:13 +0200)]
frontend: Fixed a memory leak in the connection context handler.

Previously, the ownership was not taken away from the thread-specific data
aftter removing the connection from the current context, thus leaking each
connection object.

10 years agoMerged branch 'master' of git://git.tokkee.org/sysdb.
Sebastian Harl [Fri, 11 Apr 2014 06:44:10 +0000 (08:44 +0200)]
Merged branch 'master' of git://git.tokkee.org/sysdb.

10 years agosysdbd: Ignore SIGPIPE (e.g. when a client connection was aborted).
Sebastian Harl [Thu, 10 Apr 2014 20:16:26 +0000 (22:16 +0200)]
sysdbd: Ignore SIGPIPE (e.g. when a client connection was aborted).

10 years agofrontend: Be more robust in case of failed connections.
Sebastian Harl [Thu, 10 Apr 2014 20:15:03 +0000 (22:15 +0200)]
frontend: Be more robust in case of failed connections.

Make sure not to write to a failed connection, most notably, don't try to log
to a failed connection.

10 years agofrontend: Close a connection when receiving an exception of the fd.
Sebastian Harl [Thu, 10 Apr 2014 19:44:18 +0000 (21:44 +0200)]
frontend: Close a connection when receiving an exception of the fd.

10 years agosysdb: Added support for the -c <cmd> option.
Sebastian Harl [Thu, 10 Apr 2014 19:13:18 +0000 (21:13 +0200)]
sysdb: Added support for the -c <cmd> option.

This option (which may be specified multiple times) may be used to send
commands to the server in a non-interactive way. After handling the reply from
the last command, the process exits.

10 years agosock.h: Fixed documentation of sdb_client_send() return values.
Sebastian Harl [Thu, 10 Apr 2014 19:05:31 +0000 (21:05 +0200)]
sock.h: Fixed documentation of sdb_client_send() return values.

10 years agocore: Allow objects to have the same size as sdb_object_t.
Sebastian Harl [Thu, 10 Apr 2014 15:57:44 +0000 (17:57 +0200)]
core: Allow objects to have the same size as sdb_object_t.

That is, allow minimalistic objects which only have a name.

10 years agosysdb: Let sdb_command_print_reply() accept client instead of input objects.
Sebastian Harl [Thu, 10 Apr 2014 15:50:53 +0000 (17:50 +0200)]
sysdb: Let sdb_command_print_reply() accept client instead of input objects.

This is more flexible.

10 years agoTravis: Only run coveralls when using gcc.
Sebastian Harl [Thu, 10 Apr 2014 14:02:11 +0000 (16:02 +0200)]
Travis: Only run coveralls when using gcc.

We don't have any gcov information in any other case.

10 years agoTravis: Don't use 'coveralls --verbose'.
Sebastian Harl [Thu, 10 Apr 2014 13:59:49 +0000 (15:59 +0200)]
Travis: Don't use 'coveralls --verbose'.

coveralls reports work fine now, so we don't need this anymore.

10 years agoREADME: Added links to travis-ci and coveralls.
Sebastian Harl [Thu, 10 Apr 2014 13:51:02 +0000 (15:51 +0200)]
README: Added links to travis-ci and coveralls.

10 years agosysdbd(1): Fixed typo.
Sebastian Harl [Thu, 10 Apr 2014 13:48:11 +0000 (15:48 +0200)]
sysdbd(1): Fixed typo.

10 years agoAdded sysdb(1) manpage and updated sysdb help output.
Sebastian Harl [Thu, 10 Apr 2014 13:45:37 +0000 (15:45 +0200)]
Added sysdb(1) manpage and updated sysdb help output.

10 years agoTravis: Don't use --use-mirrors with pip.
Sebastian Harl [Thu, 10 Apr 2014 13:11:21 +0000 (15:11 +0200)]
Travis: Don't use --use-mirrors with pip.

It's been deprecated and I think we don't need it ;-)

10 years agoTravis; Pass --build-root to coveralls.
Sebastian Harl [Thu, 10 Apr 2014 10:59:21 +0000 (12:59 +0200)]
Travis; Pass --build-root to coveralls.

Else, it cannot find the right source files.

10 years agoTravis: Display information about cpp-coveralls after installing it.
Sebastian Harl [Thu, 10 Apr 2014 10:59:00 +0000 (12:59 +0200)]
Travis: Display information about cpp-coveralls after installing it.

10 years agot/coverage.sh: Restore t/cibuild.sh in the temp directory.
Sebastian Harl [Wed, 9 Apr 2014 16:06:22 +0000 (18:06 +0200)]
t/coverage.sh: Restore t/cibuild.sh in the temp directory.

This is to avoid the version being marked as dirty.

10 years agostore_lookup_test: Added a more complex parser/lookup test.
Sebastian Harl [Wed, 9 Apr 2014 16:02:38 +0000 (18:02 +0200)]
store_lookup_test: Added a more complex parser/lookup test.

10 years agostore_lookup: Added "tostring" methods for matcher objects.
Sebastian Harl [Wed, 9 Apr 2014 15:34:56 +0000 (17:34 +0200)]
store_lookup: Added "tostring" methods for matcher objects.

This is meant for logging and debugging. For now, it's used in tests to check
parsed and compiled matchers.

10 years agostore_lookup_test: Fixed user-data passed to the lookup callback.
Sebastian Harl [Wed, 9 Apr 2014 14:25:29 +0000 (16:25 +0200)]
store_lookup_test: Fixed user-data passed to the lookup callback.

10 years agoparser: Make sure that each comparator matcher is a host matcher.
Sebastian Harl [Wed, 9 Apr 2014 14:19:44 +0000 (16:19 +0200)]
parser: Make sure that each comparator matcher is a host matcher.

So far, 'NOT (service|attribute).<attr> <cmp> <value>' matches did not work
correctly, because the object matcher was not correctly wrapped into a host
matcher. Since we do not currently support querying any object types besides
hosts, this was wrong.

The respective code has been moved into sdb_store_matcher_parse_cmp() which
also implements and checks the restriction on matching host objects only.

A new set of tests has been introduced which exposed this problem and which
(roughly) verifies the result of a lookup using a parsed matcher.

10 years agofrontend/parser_test: Cover more basic expressions.
Sebastian Harl [Tue, 8 Apr 2014 12:29:07 +0000 (14:29 +0200)]
frontend/parser_test: Cover more basic expressions.

10 years agoplugin: Removed obsolete TODO note.
Sebastian Harl [Mon, 7 Apr 2014 07:05:30 +0000 (09:05 +0200)]
plugin: Removed obsolete TODO note.

10 years agofrontend: Actually implement support for the NOT operator.
Sebastian Harl [Sun, 6 Apr 2014 17:57:07 +0000 (19:57 +0200)]
frontend: Actually implement support for the NOT operator.

10 years agocore, frontend: Added !=, !~, and NOT operators.
Sebastian Harl [Sun, 6 Apr 2014 17:42:43 +0000 (19:42 +0200)]
core, frontend: Added !=, !~, and NOT operators.

10 years agostore_lookup: Added sdb_store_inv_matcher().
Sebastian Harl [Sun, 6 Apr 2014 17:17:51 +0000 (19:17 +0200)]
store_lookup: Added sdb_store_inv_matcher().

This creates a matcher objects which matches the inverse (logical NOT) of the
specified matcher.

10 years agofrontend: Let the parser support brackets in matcher expressions.
Sebastian Harl [Sun, 6 Apr 2014 12:17:55 +0000 (14:17 +0200)]
frontend: Let the parser support brackets in matcher expressions.

10 years agofrontend: Fixed memory holes in the parser.
Sebastian Harl [Sun, 6 Apr 2014 12:04:48 +0000 (14:04 +0200)]
frontend: Fixed memory holes in the parser.

10 years agostore: Don't change the interval if the new interval is zero.
Sebastian Harl [Sun, 6 Apr 2014 11:46:37 +0000 (13:46 +0200)]
store: Don't change the interval if the new interval is zero.

If the interval is zero, multiple updates happened at the same time. This does
not affect the interval at which the object is updated in the backend, though.

10 years agoparser_test: Check operator precedence.
Sebastian Harl [Sun, 6 Apr 2014 11:38:27 +0000 (13:38 +0200)]
parser_test: Check operator precedence.

10 years agoparser_test: Check matcher type returned by sdb_fe_parse_matcher().
Sebastian Harl [Sun, 6 Apr 2014 11:35:32 +0000 (13:35 +0200)]
parser_test: Check matcher type returned by sdb_fe_parse_matcher().

10 years agofrontend parser: Added support for AND and OR matchers.
Sebastian Harl [Sun, 6 Apr 2014 11:28:21 +0000 (13:28 +0200)]
frontend parser: Added support for AND and OR matchers.

10 years agofrontend: Updated unit-tests for expression related parsing.
Sebastian Harl [Sat, 5 Apr 2014 18:20:13 +0000 (20:20 +0200)]
frontend: Updated unit-tests for expression related parsing.

10 years agofrontend: Accept compare matchers as expressions.
Sebastian Harl [Sat, 5 Apr 2014 18:06:28 +0000 (20:06 +0200)]
frontend: Accept compare matchers as expressions.

… replacing the current placeholder.

For now, this is specific to '=' (equal) and '=~' (regex) comparison.

10 years agofrontend: Don't ignore single characters in the scanner.
Sebastian Harl [Sat, 5 Apr 2014 17:49:47 +0000 (19:49 +0200)]
frontend: Don't ignore single characters in the scanner.

This would lead to those characters be silently ignored at any place in the
input stream.

10 years agostore: Added sdb_store_matcher_parse_cmp().
Sebastian Harl [Sat, 5 Apr 2014 16:42:06 +0000 (18:42 +0200)]
store: Added sdb_store_matcher_parse_cmp().

This function parses simple matcher compare expressions (<obj_type>.<attr>
<op> <value>).

10 years agostore: Moved matcher types to store-private.h.
Sebastian Harl [Sat, 5 Apr 2014 16:41:26 +0000 (18:41 +0200)]
store: Moved matcher types to store-private.h.

10 years agocollectd::unixsock backend: Simplified host updates.
Sebastian Harl [Fri, 4 Apr 2014 10:44:13 +0000 (12:44 +0200)]
collectd::unixsock backend: Simplified host updates.

Also, don't do duplicate updates in a single iteration. This caused bad
startup effects for the interval calculation.

Later, we should make the core more robust in that respect, I guess.

10 years agostore_test: Added a test for interval calculation.
Sebastian Harl [Thu, 3 Apr 2014 14:03:59 +0000 (16:03 +0200)]
store_test: Added a test for interval calculation.

10 years agostore: Include update interval in the JSON serialization.
Sebastian Harl [Thu, 3 Apr 2014 13:28:00 +0000 (15:28 +0200)]
store: Include update interval in the JSON serialization.

10 years agocore/time: Added sdb_strfinterval().
Sebastian Harl [Thu, 3 Apr 2014 13:04:30 +0000 (15:04 +0200)]
core/time: Added sdb_strfinterval().

This function formats a time interval using the format 1Y2M3D4h5m6.7s.

10 years agostore: Fixed a conversion warning reported by GCC.
Sebastian Harl [Thu, 3 Apr 2014 08:24:48 +0000 (10:24 +0200)]
store: Fixed a conversion warning reported by GCC.

10 years agostore: Calculate and store each objects update interval.
Sebastian Harl [Wed, 2 Apr 2014 10:37:10 +0000 (12:37 +0200)]
store: Calculate and store each objects update interval.

The interval is calculated as the moving average of the incoming update
intervals. This should also work fine for out-of-order updates or updates from
multiple sources.

10 years agofrontend: Let LIST not include details.
Sebastian Harl [Wed, 2 Apr 2014 10:23:37 +0000 (12:23 +0200)]
frontend: Let LIST not include details.

Now that we have FETCH and LOOKUP, list should only provide basic information
(name and last_update).

10 years agoparser_test: Added simple LOOKUP parser tests.
Sebastian Harl [Tue, 1 Apr 2014 21:03:43 +0000 (23:03 +0200)]
parser_test: Added simple LOOKUP parser tests.

10 years agofrontend: Added LOOKUP support to the connection handler.
Sebastian Harl [Tue, 1 Apr 2014 21:00:44 +0000 (23:00 +0200)]
frontend: Added LOOKUP support to the connection handler.

For now, the wire format is: <CONNECTION_LOOKUP>;<len>;<expression>

10 years agofrontend: Added simple 'LOOKUP <type> WHERE <expression>' query.
Sebastian Harl [Tue, 1 Apr 2014 20:45:19 +0000 (22:45 +0200)]
frontend: Added simple 'LOOKUP <type> WHERE <expression>' query.

This query command may be used to retrieve a list of detailed host information
for each host matching the specified expression. For now, querying hosts is
supported only.

10 years agostore: Let sdb_store_matcher_matches return true if it matches.
Sebastian Harl [Tue, 1 Apr 2014 20:09:26 +0000 (22:09 +0200)]
store: Let sdb_store_matcher_matches return true if it matches.

Rather than using 0 for matches and -1 else.

10 years agostore: Added sdb_store_lookup().
Sebastian Harl [Tue, 1 Apr 2014 19:52:39 +0000 (21:52 +0200)]
store: Added sdb_store_lookup().

This function looks up objects from the store which match a user-specified
matcher. For each such object, a user-specified callback is executed.

10 years agostore: Added sdb_store_iterate().
Sebastian Harl [Tue, 1 Apr 2014 19:34:23 +0000 (21:34 +0200)]
store: Added sdb_store_iterate().

This function iterates over all (host, for now) objects in the store and calls
a user-specified callback for each.

10 years agogrammar.y: Added some (very) short documentation for each statement.
Sebastian Harl [Tue, 1 Apr 2014 05:15:39 +0000 (07:15 +0200)]
grammar.y: Added some (very) short documentation for each statement.

10 years agoparser_test: Fixed a sign-compare warning/error on GCC.
Sebastian Harl [Mon, 31 Mar 2014 21:54:53 +0000 (23:54 +0200)]
parser_test: Fixed a sign-compare warning/error on GCC.

10 years agofrontend: Require strings instead of identifiers.
Sebastian Harl [Mon, 31 Mar 2014 21:39:38 +0000 (23:39 +0200)]
frontend: Require strings instead of identifiers.

… for host names and name matchers. Identifiers were used as an early
work-around but they are not valid in those places.

10 years agofrontend: Added very simple single-quoted string support.
Sebastian Harl [Mon, 31 Mar 2014 21:35:23 +0000 (23:35 +0200)]
frontend: Added very simple single-quoted string support.

No escape sequences whatsoever are supported so far but except for that any
single-quoted strings which do not contain single quotes, can be used.

FETCH now supports host names specified as strings as well.

10 years agofrontend: Free dynamically allocated memory in the parser.
Sebastian Harl [Mon, 31 Mar 2014 21:34:58 +0000 (23:34 +0200)]
frontend: Free dynamically allocated memory in the parser.

10 years agofrontend: Added FETCH support to the connection handler.
Sebastian Harl [Mon, 31 Mar 2014 21:21:54 +0000 (23:21 +0200)]
frontend: Added FETCH support to the connection handler.

The wire format is: <CONNECTION_FETCH>;<len>;<host>

10 years agoparser_test: Check the node's command type.
Sebastian Harl [Mon, 31 Mar 2014 21:18:37 +0000 (23:18 +0200)]
parser_test: Check the node's command type.

10 years agofrontend: Added 'FETCH <name>' query command.
Sebastian Harl [Mon, 31 Mar 2014 21:17:34 +0000 (23:17 +0200)]
frontend: Added 'FETCH <name>' query command.

For now, <name> may only be a simple identifier.

10 years agoobject: Added sdb_object_create_dT() macro.
Sebastian Harl [Mon, 31 Mar 2014 20:47:46 +0000 (22:47 +0200)]
object: Added sdb_object_create_dT() macro.

This may be used to create a simple dynamic object of a specified type.
Dynamic type means that it uses a destructor.

10 years agoobject: Let create_simple() accept an optional destructor.
Sebastian Harl [Mon, 31 Mar 2014 20:41:37 +0000 (22:41 +0200)]
object: Let create_simple() accept an optional destructor.

This is still simple but it allows for some more dynamic.

10 years agofrontend: Let the parser not accept other grammars in default mode.
Sebastian Harl [Thu, 20 Mar 2014 07:36:54 +0000 (08:36 +0100)]
frontend: Let the parser not accept other grammars in default mode.

10 years agoutils llist: Let llist_get() increment the reference count.
Sebastian Harl [Fri, 7 Mar 2014 13:52:59 +0000 (14:52 +0100)]
utils llist: Let llist_get() increment the reference count.

This feels more consistent.

10 years agofrontend parser: Added support for parsing single expressions.
Sebastian Harl [Fri, 7 Mar 2014 11:47:06 +0000 (12:47 +0100)]
frontend parser: Added support for parsing single expressions.

The parser has been extended to support different modes. In SDB_PARSE_EXPR
mode, a single expression will be accepted as a start condition. The new
function sdb_fe_parse_matcher() uses this to parse expressions.

For now, this implements only the basic framework. Any identifier will be
parsed as a simple name matcher expression.

10 years agot/cibuild.sh: Use ./configure --enable-standards.
Sebastian Harl [Mon, 24 Feb 2014 02:43:49 +0000 (18:43 -0800)]
t/cibuild.sh: Use ./configure --enable-standards.

10 years agoconfigure: Don't use -pedantic.
Sebastian Harl [Mon, 24 Feb 2014 01:48:25 +0000 (17:48 -0800)]
configure: Don't use -pedantic.

Else, GCC will complain about "ISO C forbids conversion of object pointer to
function pointer type", even for casting function points to or from void
pointers. This is allowed by POSIX, though, and required, for example, for
dlsym() to work.

10 years agoconfigure: Make "standards" and "hardening" flags part of STRICT_CFLAGS.
Sebastian Harl [Mon, 24 Feb 2014 01:43:58 +0000 (17:43 -0800)]
configure: Make "standards" and "hardening" flags part of STRICT_CFLAGS.

Most importantly, don't assign them to CFLAGS which might be overwritten when
running make, thus leaving out the flags which were originally requested to be
used.

10 years agoconfigure: Disable -Wsign-conversion.
Sebastian Harl [Mon, 24 Feb 2014 01:21:51 +0000 (17:21 -0800)]
configure: Disable -Wsign-conversion.

It may cause problems in expanded macros from libc.

10 years agoconfigure: Request X/Open 7 (XSI) compliance.
Sebastian Harl [Sun, 23 Feb 2014 20:39:45 +0000 (12:39 -0800)]
configure: Request X/Open 7 (XSI) compliance.

This is required for strndup().

10 years agoconfigure: Include _BSD_SOURCE in standards related defines.
Sebastian Harl [Sun, 23 Feb 2014 20:38:36 +0000 (12:38 -0800)]
configure: Include _BSD_SOURCE in standards related defines.

Else, GNU libc does not define strcasecmp() even though it conforms to
POSIX.1-2001.

10 years agoRemoved semicolon from SDB_PLUGIN_MAGIC definition.
Sebastian Harl [Sun, 23 Feb 2014 20:37:48 +0000 (12:37 -0800)]
Removed semicolon from SDB_PLUGIN_MAGIC definition.

Rather, the semicolon is added when using the define.

10 years agoFixed (pedantic) void-pointer to function-pointer cast warnings.
Sebastian Harl [Sun, 23 Feb 2014 20:37:07 +0000 (12:37 -0800)]
Fixed (pedantic) void-pointer to function-pointer cast warnings.

10 years agoInclude config.h in source files.
Sebastian Harl [Sun, 23 Feb 2014 20:35:33 +0000 (12:35 -0800)]
Include config.h in source files.

Else, we don't get any definitions required for enforcing standard compliance.

10 years agofrontend: Fixed two typing issues.
Sebastian Harl [Sun, 23 Feb 2014 04:48:03 +0000 (20:48 -0800)]
frontend: Fixed two typing issues.

10 years agofrontend, liboconfig: Added missing prototypes for yylex/yyparse.
Sebastian Harl [Sun, 23 Feb 2014 04:41:11 +0000 (20:41 -0800)]
frontend, liboconfig: Added missing prototypes for yylex/yyparse.

10 years agostore_lookup_test: Continue loop after fail().
Sebastian Harl [Sun, 23 Feb 2014 04:25:56 +0000 (20:25 -0800)]
store_lookup_test: Continue loop after fail().

The compiler does not know that fail aborts the test program and clang
(correctly) complains that the variable ('m' in this case) might be used
uninitialized afterwards.

10 years agot/coverage.sh: Fall-back to lcov without --no-external.
Sebastian Harl [Sun, 23 Feb 2014 04:14:26 +0000 (20:14 -0800)]
t/coverage.sh: Fall-back to lcov without --no-external.

Old versions of lcov don't support that flag. Simply try to fall back in case
the first run fails.

10 years agostore_lookup: Made logical operators public.
Sebastian Harl [Sun, 23 Feb 2014 04:12:05 +0000 (20:12 -0800)]
store_lookup: Made logical operators public.

10 years agoAdded tests for store lookup functions.
Sebastian Harl [Sun, 23 Feb 2014 03:22:17 +0000 (19:22 -0800)]
Added tests for store lookup functions.

10 years agostore: Added public functions to create and execute matchers.
Sebastian Harl [Sun, 23 Feb 2014 03:19:24 +0000 (19:19 -0800)]
store: Added public functions to create and execute matchers.

The matcher types are now based on sdb_object_t to ease memory management in
case a matcher is used in multiple places. Constructors for each matcher type
are now available and the top-level matching function has been made public.

10 years agot/coverage.sh: Use version-gen.sh to determine the current version.
Sebastian Harl [Sun, 23 Feb 2014 03:16:16 +0000 (19:16 -0800)]
t/coverage.sh: Use version-gen.sh to determine the current version.

… rather than guessing ;-) D'oh!

10 years agot/coverage.sh: Don't git reset but test the current, possibly dirty, code.
Sebastian Harl [Sun, 23 Feb 2014 03:09:55 +0000 (19:09 -0800)]
t/coverage.sh: Don't git reset but test the current, possibly dirty, code.

Instead, only get back files which are not included in the tarball.

10 years agostore_lookup: Fix matching of services with empty attr matcher.
Sebastian Harl [Fri, 21 Feb 2014 02:16:27 +0000 (03:16 +0100)]
store_lookup: Fix matching of services with empty attr matcher.

10 years agostore: Require name matchers to match string *and* regex if specified.
Sebastian Harl [Fri, 21 Feb 2014 02:07:11 +0000 (03:07 +0100)]
store: Require name matchers to match string *and* regex if specified.

10 years agostore: Fixed data format error detection.
Sebastian Harl [Fri, 21 Feb 2014 01:46:33 +0000 (02:46 +0100)]
store: Fixed data format error detection.