doc/man/Makefile: Mimic mandb(5) path hierarchy The following allows developers to read locally generated man pages by using the `pre-inst-env' script. For example: $ ./pre-inst-env man lttng-add-context will open the `lttng-add-context.1' man pages in the build directory under which the `pre-inst-env' was generated. This is done by: 1. Simlinking `build/doc/man{1,3,7,8}' to `build/doc/man' 2. Adding MANPATH to `pre-inst-env' The symlinking part is a hack to force `man' to use our current doc layout, doing a less invasive change than would be required otherwise Change-Id: I2ea1af779f237fe1808a1d44d4f3b1c3a8535e2d Signed-off-by: Olivier Dion <odion@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Clean-up: run format-cpp on the tree The original re-format commit missed a number of files that were caught by format-cpp. Hopefully this is the last large reformat commit for a while. Change-Id: I493ee6d9fe6187e0bd087c68ed346af69c929c1e Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
clang-tidy: add most bugprone warnings Most of the changes proposed by clang-tidy are explicit checks for the result of strcmp() and adding parentheses for all macro parameters. Change-Id: I6ce7384b6d96035454d5456ac920becbf2882e65 Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
clang-tidy: add Chrome-inspired checks Add the checks used by the Chrome project. Most of these changes were produced and applied by clang-tidy. Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com> Change-Id: I4058dafbdef00e81ac04f202fdfe377384a99e6b
Run clang-format on the whole tree Generated by running: find -not \( -path "./src/vendor*" -prune \) -iname "*.h" -o -iname "*.hpp" -o -iname "*.c" -o -iname "*.cpp" -exec clang-format -i {} \; Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com> Change-Id: I9557e7d84e305187475ef88124857cf2f438bbb1
Fix: example: print_notification is called on status all returned status The notification should only be printed for `LTTNG_NOTIFICATION_CHANNEL_STATUS_OK`. Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com> Change-Id: I5534406d8fbd5c0fff7013fda6335d54bef071a2
Rename C++ header files to .hpp Rename all C++ header files (include/**/*-internal.h, src/**/*.h except argpar and msgpack, some headers in tests) to have the .hpp extension. Doing so highlights that we include some C++ header files in some test files still compiled as C. This is ok for now, as the files they include don't actually contain C++ code incompatible with C yet, but they could eventually. This is something we can fix later. Change-Id: I8bf326b6b2946a3e26704f3ef3ac5831bbe9bc26 Signed-off-by: Simon Marchi <simon.marchi@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Prepare for '-Wunused-parameter' In preparation for '-Wextra' Change-Id: I30e6abb9502fc97daa565fde450d1e4235cf1ec7 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
lttng-create(1): specify that `--shm-path` only applies to UST channels This is a current limitation, but could change in the future. Fixes: https://bugs.lttng.org/issues/1158 Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com> Change-Id: Ie2b8114f35d7fd095790aae6add4653c5da169bf
tests: compile some tools/tests as C++ These tests use things from the common libs, or at least include header files from src/common. These files are going to contain C++-specific things in a following commit, so it's easier if we compile them tools/tests as C++. Change-Id: Ib99f2373beb414c50eaa10b35e0d895bc37e4e64 Signed-off-by: Simon Marchi <simon.marchi@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Force usage of assert() condition when NDEBUG is defined Reuse the BT2 approach to force the usage of the assertion condition even when assert() are removed by the NDEBUG define. See `BT_USE_EXPR()` macro and documentation in Babeltrace commit[0]: commit 1778c2a4134647150b199b2b57130817144446b0 Author: Philippe Proulx <eeppeliteloop@gmail.com> Date: Tue Apr 21 11:15:42 2020 -0400 lib: assign a unique ID to each pre/postcond. and report it on failure 0: https://github.com/efficios/babeltrace/commit/1778c2a4134647150b199b2b57130817144446b0 Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com> Change-Id: I3844b6ae7e95952d90033898397ac936540b785c