This g_array_sized_new call reserves space for one element, but doesn't
actually make the length of the array one. Add a call to
g_array_set_size to fix that. Fix another occurence of the same bug in
ctf-writer.
Signed-off-by: Simon Marchi <email address hidden>
Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: I147cdaaa7cff00ee06ec4c98bd9423a975ddd770
7e38c84...
by
Michael Jeanson <email address hidden>
fix: tests: use a portable invocation of 'sed -i'
The GNU and BSD sed implementations slightly differ in the handling of
an argument to the '-i' switch to use as a suffix to a backup file. BSD
sed requires an argument while it's optional for GNU sed, if present it
must be placed directly after the switch with no space.
To make both implementations work properly and not create a backup file,
a zero length argument must be placed directly after the switch with no
space.
Signed-off-by: Michael Jeanson <email address hidden>
Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: Ie1584fbdaf9d8752190f10288b2a1a89e3a43ad1
doc: fix passing non-event messages in distill examples
The distill filter example means to let non-event messages go through,
but it actually drops them. Fix it so it actually lets them through.
Verified by sending the output of the filter to `sink.text.details`.
Before the patch, there is no stream beginning message. After the
patch, there is.
Signed-off-by: Simon Marchi <email address hidden>
Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: Ib463a2e931c61d481430f3f7120a251d66f23bc3
configure: use single word for PROJECT-NAME argument of DX_INIT_DOXYGEN
Running configure with --enable-api-doc shows this warning:
/home/simark/src/babeltrace/configure: line 25508: 2: command not found
The line 25508 in question is:
DX_PROJECT=Babeltrace 2
In shell script, this tries to execute the command `2`, with the
`DX_PROJECT` environment variable set to `Babeltrace`. This is
obviously not what we want.
The documentation for the DX_INIT_DOXYGEN macro says:
... call DX_INIT_DOXYGEN with the following parameters: a one-word
name for the project for use as a filename base etc.
So, we shouldn't pass something with a space as the project name to
DX_INIT_DOXYGEN. Change it to `babeltrace2`. I don't think that this
gets used anywhere though, as I didn't see a difference in my build
directory before and after the change (except in the Makefiles, which
don't use the value themselves).
Reported-by: Brice Videau <email address hidden>
Signed-off-by: Simon Marchi <email address hidden>
Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: I711951f950f2edd99a2ba250ef66dfd9bcc3be68
When an error happens in the plugin's init function, bt_plugin_so_init
returns BT_FUNC_STATUS_NOT_FOUND. We leave the `plugin` variable set,
which triggers the assert.
Fix this by putting/resetting `plugin` in that case. Since there was an
error initializing the plugin, we won't return it to the user, so I
think that release it is the right thing to do here.
Add a test with a plugin whose init function fail. Test both the
fail_on_load_error true and false cases.
Reported-by: Brice Videau <email address hidden>
Signed-off-by: Simon Marchi <email address hidden>
Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: If81f5460256bf9175d2909e40a2b534c871f3a30