Replace libuuid with internal implementation We use a very small subset of libuuid features to transform UUIDs between their string and binary representation. Plus we have a lot of compat code for different platforms with some unspecified default behavior regarding the use of upper/lower case. Drop the dependency on libuuid and replace it with a minimal internal implementation that respects RFC4122. Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Change-Id: I744e3cf65d6a22d0acf7a9943c10943ba64e8468 Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Tests: unit testing for backward compatibility of group-output-by-session These unit tests aim to reproduce the stream path received by lttng-relayd when dealing with a producer using a protocol version < 2.11. We then pass them through the transform function for --group-output-by-session used when producer are using protocol version greater or equal to 2.4 and small than 2.11. Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Introduce EXTRA_VERSION_NAME and EXTRA_VERSION_DESCRIPTION On version.i generation, check the content of the following files : * "extra_version_name" The first line is used to populate the EXTRA_VERSION_NAME pre-processor define statement. * "extra_version_description" The content is used to populate the EXTRA_VERSION_DESCRIPTION pre-processor define statement. It should contain the description of local modifications done to the tree. This can be used by distribution packager to specify what changes were applied locally. Mostly in the form of patch/commit name. All non-alpha numeric characters are converted to "-". Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Add rmdirat and renameat to run-as commands Add support for the rmdirat and renameat commands to the run-as infrastructure. These commands use the directory_handle compatibility layer to provide rename and directory deletion relative to a (or multiple) directory file descriptors. The rmdirat name is used even though there are no rmdirat syscall (at least on Linux). The functionality that would be provided by rmdirat() (vs rmdir) is provided through unlinkat(..., AT_REMOVEDIR). Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Implement userspace-probe regression tests This adds regression testcases for the following userspace probe features and should-fail scenarios. Features: * ELF function location tracing works, * ELF C++ mangled function and method location tracing works, * SDT tracepoint location tracing works, * Implicit location type defaults to ELF location, * Binary found $PATH, * Binary found using full path, * Binary with colon in file name, * Disabling of all location types, * Listing of all location types, * Saving and loading of all location types, * SDT probe with one or more callsites, * SDT probe with arguments, * SDT probe in shared object, * SDT probe in dlopen()ed and ldpreload()ed shared object. Should-fail: * Target binary does not exist, * Target binary not ELF file, * ELF symbol not found in target binary, * ELF symbol not a function, * SDT provider name not found, * SDT probe name not found, * SDT probe guarded by a semaphore. We also make sure to disable testcases when the necessary files/tools for them are not found: * Disables C++ testcases if no C++ compiler is found. * Disables SDT testcases if the Systemtap header files are not found. This is tested by trying to compile a simple C program with a SDT probe. If it fails, it will only disable the testcases and not the feature since the SDT userspace probe feature does not use this header for parsing. Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com> Signed-off-by: Erica Bugden <ebugden@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Tests: Add callstack contexts tests Tests callstack-user and callstack-kernel contexts by tracing with those contexts an application that calls multiple functions in chain before executing a system call. callstack-user addresses are tested against the output of coreutils' addr2line. callstack-kernel addresses are tested against the addresses of kernel symbols available in the /proc/kallsyms procfile. Both these tests need to be run by root because those contexts are made available by the kernel tracer. The callstack-kernel test also need to access /proc/kallsyms. Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>