babeltrace.git
6 years agoFix: CC prio. map. leak in event notification
Philippe Proulx [Thu, 3 Aug 2017 20:34:10 +0000 (16:34 -0400)] 
Fix: CC prio. map. leak in event notification

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agolib: do not finalize a non-initialized notification iterator
Philippe Proulx [Thu, 3 Aug 2017 20:33:39 +0000 (16:33 -0400)] 
lib: do not finalize a non-initialized notification iterator

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: cli: Coverity issue: no need to check `status`
Philippe Proulx [Wed, 26 Jul 2017 20:45:07 +0000 (16:45 -0400)] 
Fix: cli: Coverity issue: no need to check `status`

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agobt_ctf_clock_value_create(): freeze clock class
Philippe Proulx [Wed, 26 Jul 2017 19:58:37 +0000 (15:58 -0400)] 
bt_ctf_clock_value_create(): freeze clock class

This is how other classes in the library work: when you instantiate a
class as a value (here a clock class as a clock value), the class is
frozen.

This patch does not seem to break the tests or change anything to the
CLI and plugins, which means all clock classes are already configured
before clock values are created out of them.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoGraph: pass remove listeners when adding listeners
Philippe Proulx [Fri, 21 Jul 2017 20:34:29 +0000 (16:34 -0400)] 
Graph: pass remove listeners when adding listeners

With this patch, when you call bt_graph_add_*_listener(), you can also
provide a "remove listener" which is called when the added listener is
removed when the graph object is destroyed. This is useful when you
dynamically allocate data only for the listener to add and you are not
the only owner of the graph object: the remove listener is where to
free/release this data.

Existing CLIs and tests are modified to match this change.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoir: trace: pass remove listeners when adding listeners
Philippe Proulx [Fri, 21 Jul 2017 20:13:16 +0000 (16:13 -0400)] 
ir: trace: pass remove listeners when adding listeners

With this patch, when you call bt_ctf_trace_add_is_static_listener(),
you can also provide a "remove listener" which is called when the added
listener is removed, weither manually with
bt_ctf_trace_remove_is_static_listener(), or when the trace object is
destroyed. This is useful when you dynamically allocate data only for
the listener to add and you are not the only owner of the trace object:
the remove listener is where to free/release this data.

Existing plugins and tests are modified to match and test this change.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoinclude/babeltrace/graph/private-component.h: add missing `extern`
Philippe Proulx [Thu, 20 Jul 2017 22:30:05 +0000 (18:30 -0400)] 
include/babeltrace/graph/private-component.h: add missing `extern`

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoRemove bt_notification_discarded_{events,packets}_set_count()
Philippe Proulx [Mon, 17 Jul 2017 20:45:37 +0000 (16:45 -0400)] 
Remove bt_notification_discarded_{events,packets}_set_count()

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agobt_notification_inactivity_create(): create an empty CC priority map when NULL
Philippe Proulx [Mon, 17 Jul 2017 20:36:19 +0000 (16:36 -0400)] 
bt_notification_inactivity_create(): create an empty CC priority map when NULL

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agobt_notification_event_create(): create an empty CC priority map when NULL
Philippe Proulx [Mon, 17 Jul 2017 19:36:21 +0000 (15:36 -0400)] 
bt_notification_event_create(): create an empty CC priority map when NULL

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agolib: move bt_notification_iterator_next_return to component-class.h
Philippe Proulx [Mon, 17 Jul 2017 03:15:22 +0000 (23:15 -0400)] 
lib: move bt_notification_iterator_next_return to component-class.h

This type is the return type of a callback which is part of a component
class definition (to define an implicit notification iterator class).

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agolib: use `enum bt_port_status` where possible
Philippe Proulx [Mon, 17 Jul 2017 00:51:02 +0000 (20:51 -0400)] 
lib: use `enum bt_port_status` where possible

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoRemove unused bt_port_remove_from_component()
Philippe Proulx [Wed, 14 Jun 2017 21:47:40 +0000 (17:47 -0400)] 
Remove unused bt_port_remove_from_component()

This public version should not exist. Only the parent component can
remove one of its port with bt_private_port_remove_from_component().

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoUpdate .gitignore to add newly generated test files
Jérémie Galarneau [Thu, 10 Aug 2017 19:24:20 +0000 (15:24 -0400)] 
Update .gitignore to add newly generated test files

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoRe-enable the bin-info and dward tests
Julien Desfossez [Tue, 8 Aug 2017 20:02:35 +0000 (16:02 -0400)] 
Re-enable the bin-info and dward tests

During the development of the debug-info plugin, the old tests were
disabled. Re-adapt them to the new tree and re-enable them in the test
suite.

Reported-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPort: Add glib checks for cross compilation
Michael Jeanson [Tue, 8 Aug 2017 19:19:12 +0000 (15:19 -0400)] 
Port: Add glib checks for cross compilation

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: ctf-testsuite variant-missing-fields
Mathieu Desnoyers [Thu, 3 Aug 2017 18:52:27 +0000 (14:52 -0400)] 
Fix: ctf-testsuite variant-missing-fields

It is valid for an enumeration to contain labels that are missing in the
variant fields. For instance, an enumeration can be used for many
purposes in addition to being used as a selector for a variant, so we
don't want to enforce that a variant needs to have field names for cases
we never expect as enum field input.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: fallback on content size if packet size is missing
Mathieu Desnoyers [Thu, 3 Aug 2017 17:28:36 +0000 (13:28 -0400)] 
Fix: fallback on content size if packet size is missing

Fixes ctf-testsuite tests/1.8/regression/pass/2-packets-no-packet-size

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: unchecked return value of bt_value_array_append_string
Mathieu Desnoyers [Thu, 3 Aug 2017 15:59:37 +0000 (11:59 -0400)] 
Fix: unchecked return value of bt_value_array_append_string

CID 1376147 (#1 of 1): Unchecked return value (CHECKED_RETURN).
check_return: Calling bt_value_array_append_string without checking
return value (as is done elsewhere 49 out of 50 times).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: tests: offset_s * ns_per_s should not overflow uint64_t
Mathieu Desnoyers [Thu, 3 Aug 2017 15:43:18 +0000 (11:43 -0400)] 
Fix: tests: offset_s * ns_per_s should not overflow uint64_t

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: unchecked return value in ctf-writer test
Mathieu Desnoyers [Thu, 3 Aug 2017 15:39:23 +0000 (11:39 -0400)] 
Fix: unchecked return value in ctf-writer test

CID 1376151 (#1 of 1): Unchecked return value (CHECKED_RETURN)38.
check_return: Calling bt_ctf_field_type_enumeration_add_mapping_unsigned
without checking return value (as is done elsewhere 7 out of 8 times).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: unchecked return value of bt_ctf_field_type_get_field_at_index
Mathieu Desnoyers [Thu, 3 Aug 2017 14:03:32 +0000 (10:03 -0400)] 
Fix: unchecked return value of bt_ctf_field_type_get_field_at_index

CID 1376152 (#1 of 1): Unchecked return value (CHECKED_RETURN).
check_return: Calling bt_ctf_field_type_structure_get_field_by_index
without checking return value (as is done elsewhere 23 out of 25 times).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: unchecked return values of bt_value getters
Mathieu Desnoyers [Thu, 3 Aug 2017 13:59:20 +0000 (09:59 -0400)] 
Fix: unchecked return values of bt_value getters

CID 1376153 (#1 of 1): Unchecked return value (CHECKED_RETURN).
check_return: Calling bt_value_bool_get without checking return value
(as is done elsewhere 18 out of 20 times).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: unchecked return value of stream flush
Jérémie Galarneau [Thu, 3 Aug 2017 13:49:22 +0000 (09:49 -0400)] 
Fix: unchecked return value of stream flush

Coverity:

CID 1376154 (#1 of 1): Unchecked return value (CHECKED_RETURN)1.
check_return: Calling bt_ctf_stream_flush without checking return value
(as is done elsewhere 5 out of 6 times).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: unchecked return value
Mathieu Desnoyers [Thu, 3 Aug 2017 13:43:29 +0000 (09:43 -0400)] 
Fix: unchecked return value

Found by Coverity:

CID 1376155 (#1 of 1): Unchecked return value (CHECKED_RETURN).
check_return: Calling bt_value_string_get without checking return value
(as is done elsewhere 44 out of 47 times).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: remove dead code
Mathieu Desnoyers [Thu, 3 Aug 2017 13:35:12 +0000 (09:35 -0400)] 
Fix: remove dead code

Found by Coverity:

notnull: At condition event, the value of event cannot be NULL.
   dead_error_condition: The condition event must be true.
CID 1376157 (#1 of 1): Logically dead code (DEADCODE)dead_error_line:
Execution cannot reach the expression NULL inside this statement:
event_class = (event ? bt_g...

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: wrong variable checked for NULL after allocation
Jérémie Galarneau [Wed, 9 Aug 2017 19:46:47 +0000 (15:46 -0400)] 
Fix: wrong variable checked for NULL after allocation

Found by Coverity:

writer_component->base_path = g_string_new(path);
notnull: At condition writer_component, the value of writer_component
cannot be NULL.
dead_error_condition: The condition !writer_component cannot be true.

CID 1376158 (#1 of 1): Logically dead code (DEADCODE)dead_error_begin:
Execution cannot reach this statement: ret = BT_COMPONENT_STATUS_E..

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoCleanup: dereference after null check
Jérémie Galarneau [Wed, 9 Aug 2017 19:42:03 +0000 (15:42 -0400)] 
Cleanup: dereference after null check

Found by Coverity:

CID 1376165 (#1 of 1): Dereference after null check (FORWARD_NULL)3.
var_deref_op: Dereferencing null pointer v.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: add missing goto end on error
Mathieu Desnoyers [Wed, 26 Jul 2017 18:09:52 +0000 (14:09 -0400)] 
Fix: add missing goto end on error

Found by Coverity:

CID 1376168 (#1 of 1): Dereference after null check (FORWARD_NULL)7.
var_deref_model: Passing null pointer
debug_info_component->arg_debug_info_field_name to sprintf, which
dereferences it.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoCleanup: remove logically dead code
Mathieu Desnoyers [Wed, 26 Jul 2017 18:08:02 +0000 (14:08 -0400)] 
Cleanup: remove logically dead code

Found by Coverity:

dead_error_condition: The condition ret ==
BT_NOTIFICATION_ITERATOR_STATUS_OK cannot be true.
206        if (ret == BT_NOTIFICATION_ITERATOR_STATUS_OK) {
   CID 1376170 (#1 of 1): Logically dead code (DEADCODE)dead_error_line:
Execution cannot reach this statement: ret = BT_NOTIFICATION_ITERA....

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: dereference after null check
Mathieu Desnoyers [Wed, 26 Jul 2017 18:06:13 +0000 (14:06 -0400)] 
Fix: dereference after null check

Found by Coverity:

CID 1376171 (#1 of 1): Dereference after null check (FORWARD_NULL)6.
var_deref_op: Dereferencing null pointer stream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: wrong variable in NULL check
Mathieu Desnoyers [Wed, 26 Jul 2017 17:23:47 +0000 (13:23 -0400)] 
Fix: wrong variable in NULL check

Found by Coverity:

notnull: At condition impl_args, the value of impl_args cannot be NULL.
dead_error_condition: The condition !impl_args cannot be true.

CID 1376172 (#1 of 1): Logically dead code (DEADCODE)dead_error_begin:
Execution cannot reach this statement: print_err_oom();.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoCleanup: remove logically dead code
Mathieu Desnoyers [Wed, 26 Jul 2017 17:21:43 +0000 (13:21 -0400)] 
Cleanup: remove logically dead code

Found by Coverity:

null: At condition fp, the value of fp must be NULL.
dead_error_condition: The condition fp cannot be true.

CID 1376173 (#1 of 1): Logically dead code (DEADCODE)dead_error_begin:
Execution cannot reach this statement: fclose(fp);

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoCleanup: identical code for different branches
Mathieu Desnoyers [Wed, 26 Jul 2017 17:18:01 +0000 (13:18 -0400)] 
Cleanup: identical code for different branches

Found by Coverity:

CID 1376174 (#1 of 1): Identical code for different branches
(IDENTICAL_BRANCHES)identical_branches: The same code is executed when
the condition !trimmer is true or false, because the code in the if-then
branch and after the if statement is identical. Should the if statement
be removed?

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: add missing bound checking in decode_packet
Mathieu Desnoyers [Wed, 26 Jul 2017 17:14:39 +0000 (13:14 -0400)] 
Fix: add missing bound checking in decode_packet

Found by Coverity:

overflow_assign: Assigning overflowed or truncated value (or a value
computed from an overflowed or a truncated value) to toread.

overflow: Subtract operation overflows on operands toread and
readlen. Example values for operands: toread = 268435457, readlen =
9223372037074107386.

overflow_assign: Assigning overflowed or truncated value (or a value
computed from an overflowed or a truncated value) to readlen.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: Dereference null return value
Mathieu Desnoyers [Wed, 26 Jul 2017 16:06:53 +0000 (12:06 -0400)] 
Fix: Dereference null return value

Found by Coverity:

2. returned_null: bt_ctf_field_type_variant_get_tag_name returns null
(checked 4 out of 5 times).

3. var_assigned: Assigning: pathstr = null return value from
bt_ctf_field_type_variant_get_tag_name.

CID 1376176 (#1 of 1): Dereference null return value (NULL_RETURNS).
dereference: Dereferencing a pointer that might be null pathstr when
calling pathstr_to_field_path.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: null check after deref, use uninitialized or freed variable
Mathieu Desnoyers [Wed, 26 Jul 2017 16:02:56 +0000 (12:02 -0400)] 
Fix: null check after deref, use uninitialized or freed variable

Found by Coverity:

CID 1376179 (#1 of 1): Dereference before null check
(REVERSE_INULL)check_after_deref: Null-checking stream_state suggests
that it may be null, but it has already been dereferenced on all paths
leading to the check.

Reorganized this function so we clear the stream_state (set to NULL)
whenever we return success or error, so the caller don't end up using
uninitialized variable.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoCleanup: missing empty line between functions
Jérémie Galarneau [Tue, 8 Aug 2017 21:35:29 +0000 (17:35 -0400)] 
Cleanup: missing empty line between functions

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoUse logging macros in src.ctf-fs queries
Jérémie Galarneau [Tue, 8 Aug 2017 21:31:51 +0000 (17:31 -0400)] 
Use logging macros in src.ctf-fs queries

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: missing ftell/fseek error handling
Mathieu Desnoyers [Wed, 26 Jul 2017 15:55:11 +0000 (11:55 -0400)] 
Fix: missing ftell/fseek error handling

Found by Coverity:

CID 1376181 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS).
negative_returns: filesize is passed to a parameter that cannot be
negative.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: use of file pointer after fclose()
Mathieu Desnoyers [Wed, 26 Jul 2017 15:50:52 +0000 (11:50 -0400)] 
Fix: use of file pointer after fclose()

See fclose(3). Further access to out_fp after both success and error,
even through another bt_close_memstream(), results in undefined
behavior. Nullify out_fp to ensure we don't fclose it twice on error.

Found by Coverity:

CID 1376182 (#1 of 1): Use after close (USE_AFTER_FREE).
use_closed_file: Calling bt_close_memstream uses file handle out_fp
after closing it.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoCleanup: mixing enum types
Mathieu Desnoyers [Wed, 26 Jul 2017 15:40:01 +0000 (11:40 -0400)] 
Cleanup: mixing enum types

Found by Coverity:

CID 1376185 (#3 of 3): Inferred misuse of enum (MIXED_ENUMS)mixed_enums:
Mixing enum types enum bt_value_status and enum bt_graph_status for ret.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: missing check of ftell error
Mathieu Desnoyers [Mon, 24 Jul 2017 22:04:53 +0000 (18:04 -0400)] 
Fix: missing check of ftell error

Found by Coverity:

CID 1376186 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS)
13. negative_returns: init_pos is passed to a parameter that cannot be
negative.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: mixed enums used in source.ctf.fs
Mathieu Desnoyers [Mon, 24 Jul 2017 22:01:56 +0000 (18:01 -0400)] 
Fix: mixed enums used in source.ctf.fs

Found by Coverity:

CID 1376187 (#3 of 3): Inferred misuse of enum (MIXED_ENUMS)
mixed_enums: Mixing enum types enum bt_component_status and enum
bt_value_status for ret.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: Dereference null return value
Jérémie Galarneau [Mon, 24 Jul 2017 21:26:57 +0000 (17:26 -0400)] 
Fix: Dereference null return value

Found by Coverity:

3. returned_null: bt_ctf_field_string_get_value returns null (checked 10
out of 12 times).

CID 1376192 (#1 of 1): Dereference null return value (NULL_RETURNS)
4. dereference: Dereferencing a pointer that might be null
bt_ctf_field_string_get_value(field) when calling print_escape_string.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: assert compared unsigned to 0
Mathieu Desnoyers [Mon, 24 Jul 2017 21:21:17 +0000 (17:21 -0400)] 
Fix: assert compared unsigned to 0

Found by Coverity:

CID 1376195 (#1 of 1): Macro compares unsigned to 0 (NO_EFFECT)
unsigned_compare: This greater-than-or-equal-to-zero comparison of an
unsigned value is always true. event_class_id >= 0UL.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: negative loop bound check
Mathieu Desnoyers [Mon, 24 Jul 2017 21:15:53 +0000 (17:15 -0400)] 
Fix: negative loop bound check

Found by Coverity:

CID 1376197 (#1 of 1): Negative loop bound (NEGATIVE_RETURNS)
3. negative_returns: Using unsigned variable
bt_value_array_size(run_args) in a loop exit condition.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: resolve.c: enum type mismatch
Mathieu Desnoyers [Mon, 24 Jul 2017 21:12:35 +0000 (17:12 -0400)] 
Fix: resolve.c: enum type mismatch

Found by Coverity:

CID 1376200 (#2 of 2): Inferred misuse of enum (MIXED_ENUMS)
mixed_enums: Mixing enum types enum bt_ctf_field_type_id and enum
ctf_type_id for ctx_cur_field_type_id.

(audited whole file for similar pattern)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: Explicit null dereferenced
Mathieu Desnoyers [Mon, 24 Jul 2017 21:00:08 +0000 (17:00 -0400)] 
Fix: Explicit null dereferenced

Found by Coverity:

CID 1376244 (#3 of 3): Explicit null dereferenced (FORWARD_NULL)
10. var_deref_op: Dereferencing null pointer node.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoStandard logging for ctf.fs sink
Julien Desfossez [Fri, 28 Jul 2017 19:55:11 +0000 (15:55 -0400)] 
Standard logging for ctf.fs sink

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoStandard logging for libctfcopytrace
Julien Desfossez [Fri, 28 Jul 2017 14:01:43 +0000 (10:01 -0400)] 
Standard logging for libctfcopytrace

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoStandard logging for debug_info plugin
Julien Desfossez [Thu, 27 Jul 2017 19:20:21 +0000 (15:20 -0400)] 
Standard logging for debug_info plugin

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoStandard logging for trimmer/copy.c
Julien Desfossez [Thu, 27 Jul 2017 16:07:17 +0000 (12:07 -0400)] 
Standard logging for trimmer/copy.c

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix tests: run plugins test wrapper script
Michael Jeanson [Thu, 20 Jul 2017 18:53:38 +0000 (14:53 -0400)] 
Fix tests: run plugins test wrapper script

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix test: intersection has too large offset_s
Michael Jeanson [Thu, 20 Jul 2017 16:48:47 +0000 (12:48 -0400)] 
Fix test: intersection has too large offset_s

The offset_s values multiplied by 1000000000 overflows 64-bit.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoTests: only run debug info tests when the feature is enabled
Michael Jeanson [Wed, 19 Jul 2017 20:14:59 +0000 (16:14 -0400)] 
Tests: only run debug info tests when the feature is enabled

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPort: Add dummy symbol for macOS linker
Michael Jeanson [Thu, 13 Jul 2017 15:26:53 +0000 (11:26 -0400)] 
Port: Add dummy symbol for macOS linker

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoUpdate gitignore
Michael Jeanson [Tue, 11 Jul 2017 15:26:13 +0000 (11:26 -0400)] 
Update gitignore

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPort: use a separate variable for elfutils libs
Michael Jeanson [Mon, 17 Jul 2017 22:21:56 +0000 (18:21 -0400)] 
Port: use a separate variable for elfutils libs

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPort: built-in plugins support for the macOS linker
Michael Jeanson [Mon, 17 Jul 2017 21:31:22 +0000 (17:31 -0400)] 
Port: built-in plugins support for the macOS linker

The macOS linker requires different options to force link all the
objects in a static archive, detect this at configure.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPort: 'struct tm' member count vary across platforms
Michael Jeanson [Thu, 13 Jul 2017 19:11:10 +0000 (15:11 -0400)] 
Port: 'struct tm' member count vary across platforms

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPort: Solaris and Cygwin have no sys/syslimits.h
Michael Jeanson [Thu, 13 Jul 2017 19:08:29 +0000 (15:08 -0400)] 
Port: Solaris and Cygwin have no sys/syslimits.h

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPort: cast result of be64toh() to uint64_t for print format
Michael Jeanson [Tue, 11 Jul 2017 18:48:40 +0000 (14:48 -0400)] 
Port: cast result of be64toh() to uint64_t for print format

The type of the return value of be64toh() can vary from unsigned long to
unsigned long long across platforms, cast it to the longer type before
printing.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPort: __STRINGIFY exists on Cygwin
Michael Jeanson [Tue, 11 Jul 2017 17:38:52 +0000 (13:38 -0400)] 
Port: __STRINGIFY exists on Cygwin

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPort: Add Solaris tid support to logging
Michael Jeanson [Tue, 11 Jul 2017 16:40:56 +0000 (12:40 -0400)] 
Port: Add Solaris tid support to logging

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPort: Add Cygwin tid support to logging
Michael Jeanson [Tue, 11 Jul 2017 19:58:32 +0000 (15:58 -0400)] 
Port: Add Cygwin tid support to logging

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPort: unlink() requires unistd.h on Solaris and macOS
Michael Jeanson [Mon, 10 Jul 2017 16:41:19 +0000 (12:41 -0400)] 
Port: unlink() requires unistd.h on Solaris and macOS

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPort: handle 'size_t' / 'off_t' on Solaris
Michael Jeanson [Mon, 10 Jul 2017 16:39:38 +0000 (12:39 -0400)] 
Port: handle 'size_t' / 'off_t' on Solaris

The size of 'size_t' / 'off_t' vary on some platforms, use C99 portable
macros and print formats to handle them.

Print 'size_t' with '%zu' and use SIZE_MAX as max value.
Print 'off_t' casted to 'intmax_t' with '%jd'.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPort: replace strerror_r() by g_strerror()
Michael Jeanson [Fri, 7 Jul 2017 20:58:48 +0000 (20:58 +0000)] 
Port: replace strerror_r() by g_strerror()

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPort: replace opendir() by g_dir_open()
Michael Jeanson [Fri, 7 Jul 2017 20:08:23 +0000 (20:08 +0000)] 
Port: replace opendir() by g_dir_open()

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPort: replace setenv() by g_setenv()
Michael Jeanson [Tue, 13 Jun 2017 20:10:17 +0000 (20:10 +0000)] 
Port: replace setenv() by g_setenv()

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: append to LIBS, don't override it
Michael Jeanson [Tue, 18 Jul 2017 15:08:44 +0000 (11:08 -0400)] 
Fix: append to LIBS, don't override it

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPort: do not include malloc.h
Michael Jeanson [Wed, 12 Jul 2017 19:15:14 +0000 (15:15 -0400)] 
Port: do not include malloc.h

malloc.h does not exists on all platforms and is included by stdlib.h

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: visit_event_decl(): always set stream_id variable
Philippe Proulx [Tue, 18 Jul 2017 23:44:43 +0000 (19:44 -0400)] 
Fix: visit_event_decl(): always set stream_id variable

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: don't store an int64_t value in a ptr
Michael Jeanson [Wed, 12 Jul 2017 20:23:11 +0000 (16:23 -0400)] 
Fix: don't store an int64_t value in a ptr

The key of the stream_classes GHashTable was a int64_t stored directly
in a pointer which works only on 64bits platform. Instead, allocate a
int64_t value and use a pointer to it as the key.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: use extern for variables instead of BT_HIDDEN
Michael Jeanson [Wed, 12 Jul 2017 19:14:54 +0000 (15:14 -0400)] 
Fix: use extern for variables instead of BT_HIDDEN

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: logging in socket-internal.h
Michael Jeanson [Fri, 7 Jul 2017 20:59:13 +0000 (20:59 +0000)] 
Fix: logging in socket-internal.h

Log statements in static inline functions must be ifdefed.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: remove g_ptr_array_insert to keep glib 2.22 compat
Michael Jeanson [Fri, 14 Jul 2017 18:50:31 +0000 (14:50 -0400)] 
Fix: remove g_ptr_array_insert to keep glib 2.22 compat

closes #1120

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: g_hash_table_insert returns 'void' in glib <= 2.39.2
Michael Jeanson [Mon, 10 Jul 2017 16:36:50 +0000 (12:36 -0400)] 
Fix: g_hash_table_insert returns 'void' in glib <= 2.39.2

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: G_SPAWN_DEFAULT was introduced in glib 2.37.6
Michael Jeanson [Mon, 10 Jul 2017 15:55:20 +0000 (11:55 -0400)] 
Fix: G_SPAWN_DEFAULT was introduced in glib 2.37.6

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoPretty plugin: only print negative timestamp warning once per component
Mathieu Desnoyers [Mon, 17 Jul 2017 19:30:29 +0000 (15:30 -0400)] 
Pretty plugin: only print negative timestamp warning once per component

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix test: packet seq num has too large offset_s
Mathieu Desnoyers [Mon, 17 Jul 2017 19:26:07 +0000 (15:26 -0400)] 
Fix test: packet seq num has too large offset_s

The offset_s values multiplied by 1000000000 overflows 64-bit.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoctf: visitor-generate-ir: accept negative clock offsets
Philippe Proulx [Thu, 13 Jul 2017 21:16:09 +0000 (17:16 -0400)] 
ctf: visitor-generate-ir: accept negative clock offsets

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: clock-class.c: cache ns from Epoch and check for overflows
Philippe Proulx [Thu, 13 Jul 2017 20:35:33 +0000 (16:35 -0400)] 
Fix: clock-class.c: cache ns from Epoch and check for overflows

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: ctf: notif-iter: error on empty events (0 bits of data)
Philippe Proulx [Thu, 13 Jul 2017 16:18:29 +0000 (12:18 -0400)] 
Fix: ctf: notif-iter: error on empty events (0 bits of data)

Do not create an event which consumed 0 bits of data stream: log an
error and return without creating it. We keep the buffer position at the
beginning of the last decoded event header, and we compare to the
current buffer position: if they are the same, then we consumed 0 bits
of data. It is possible, when we compare, that notit->buf.last_eh_at is
-1ULL (reset when requesting bytes from medium): in this case, we know
we requested bytes anyway, which means we consumed something to get to
this starvation point, thus the event is not empty.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: test: expect the new warning format for seqnum
Mathieu Desnoyers [Wed, 12 Jul 2017 20:55:21 +0000 (16:55 -0400)] 
Fix: test: expect the new warning format for seqnum

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: packet sequence number handling and discarded packet reporting
Mathieu Desnoyers [Wed, 12 Jul 2017 20:47:34 +0000 (16:47 -0400)] 
Fix: packet sequence number handling and discarded packet reporting

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoctf: notif-iter.c: check state on BT_CTF_NOTIF_ITER_MEDIUM_STATUS_EOF
Philippe Proulx [Wed, 12 Jul 2017 00:12:37 +0000 (20:12 -0400)] 
ctf: notif-iter.c: check state on BT_CTF_NOTIF_ITER_MEDIUM_STATUS_EOF

When the notif iter's request_bytes() medium operation returns
BT_CTF_NOTIF_ITER_MEDIUM_STATUS_EOF, make sure that the notif iter
instance is in an expected state. Which states are valid depend on the
metadata (is there a packet size or not, etc.). Return an error from
request_medium_bytes() when the state is incorrect.

This solves streams which should fail but pass, for example when the
data ends within the middle of a packet header field, a packet context
field, or an event.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agocli: do not allow --stream-intersection with --run-args/--run-args-0
Philippe Proulx [Wed, 12 Jul 2017 19:29:49 +0000 (15:29 -0400)] 
cli: do not allow --stream-intersection with --run-args/--run-args-0

Also test this in test_convert_args.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix test_convert_args
Philippe Proulx [Wed, 12 Jul 2017 19:24:20 +0000 (15:24 -0400)] 
Fix test_convert_args

* Clock class offset parameters are given with --params so that the
  CLI interprets their values as integers.
* --stream-intersection does not work with --run-args or --run-args-0.
* Duplicate --verbose is not checked anymore

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agocli: fix implicit clock class offset parameters
Philippe Proulx [Wed, 12 Jul 2017 19:23:59 +0000 (15:23 -0400)] 
cli: fix implicit clock class offset parameters

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoCompletely rework configure.ac
Michael Jeanson [Thu, 6 Jul 2017 22:53:09 +0000 (18:53 -0400)] 
Completely rework configure.ac

Full re-organisation of the configure.ac to regroup instructions by
task, automake initialixation, autoconf initialization, OS specific
default values, compiler checks, header checks, linker checks, user
variables, configure switches and so on.

Also BUILT_IN_PLUGINS was moved to --enable-built-in-plugins and
BUILT_IN_PYTHON_PLUGIN_SUPPORT to --enable-built-in-python-plugin-support
as those make more sense as toggles and most users are familiar with
this syntax.

Plus a lot of minor fixes and cleanups.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoUpdate autoconf archive macros
Michael Jeanson [Wed, 5 Jul 2017 21:03:49 +0000 (17:03 -0400)] 
Update autoconf archive macros

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoClean LICENSE file
Michael Jeanson [Wed, 5 Jul 2017 20:42:13 +0000 (16:42 -0400)] 
Clean LICENSE file

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoCleanup: bison and flex detection
Michael Jeanson [Thu, 29 Jun 2017 19:59:07 +0000 (15:59 -0400)] 
Cleanup: bison and flex detection

The previous detection code was quite convoluted and required to have
two variables set to the same value to work. For example, the lexer in
autotools is configured through the LEX variable, even if we require a
specific implementation we have to use it and base our detection code on
it.

The situation is now :

  - the FLEX and BISON variables are ignored.
  - the LEX and YACC variables need to be set if required like before.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoCleanup: uuid library detection
Michael Jeanson [Thu, 29 Jun 2017 19:41:58 +0000 (15:41 -0400)] 
Cleanup: uuid library detection

Simplify libuuid detection code and use a variable to store the detected
lib instead of adding conditionnal code to each Makefile.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoCleanup: popt library detection
Michael Jeanson [Thu, 29 Jun 2017 19:26:12 +0000 (15:26 -0400)] 
Cleanup: popt library detection

Simplify popt detection code and use a variable to store the detected
lib instead of using the global LIBS variable.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: Don't override user variables within the build system
Michael Jeanson [Thu, 29 Jun 2017 18:26:16 +0000 (14:26 -0400)] 
Fix: Don't override user variables within the build system

Instead use the appropriatly prefixed AM_* variables as to not interfere
when a user variable is passed to a make command. The proper use of flag
variables is documented at :

https://www.gnu.org/software/automake/manual/automake.html#Flag-Variables-Ordering

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agoFix: built-in plugins with new plugin filenames
Michael Jeanson [Mon, 10 Jul 2017 19:22:39 +0000 (15:22 -0400)] 
Fix: built-in plugins with new plugin filenames

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 years agotest_plugin: use env. var. instead of global symbol because G_MODULE_BIND_LOCAL
Philippe Proulx [Fri, 7 Jul 2017 21:13:14 +0000 (17:13 -0400)] 
test_plugin: use env. var. instead of global symbol because G_MODULE_BIND_LOCAL

Share data between test plugins and the plugin test with environment
variables instead of using global symbols because shared objects are
opened with G_MODULE_BIND_LOCAL now.

Also add BT_PLUGIN_MODULE() to test plugins so that their special
sections exist and contain entries.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.042405 seconds and 4 git commands to generate.