Implement userspace-probe regression tests
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 29 Jun 2018 20:09:15 +0000 (16:09 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 24 Aug 2018 20:08:15 +0000 (16:08 -0400)
commita9c2df2bfce7a27b53ee5d5101f259f3e1f506b1
tree01f10098ef8b33910280ead9980760351bf22a12
parent5a1c0a75771c4b95f9518be0e1960a25bb691caf
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>
25 files changed:
.gitignore
configure.ac
m4/ax_check_sdt_works.m4 [new file with mode: 0644]
m4/rw_prog_cxx_works.m4 [new file with mode: 0644]
tests/regression/kernel/test_userspace_probe [new file with mode: 0755]
tests/root_regression
tests/utils/testapp/Makefile.am
tests/utils/testapp/userspace-probe-elf-binary/Makefile.am [new file with mode: 0644]
tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary.c [new file with mode: 0644]
tests/utils/testapp/userspace-probe-elf-cxx-binary/Makefile.am [new file with mode: 0644]
tests/utils/testapp/userspace-probe-elf-cxx-binary/test_class.cpp [new file with mode: 0644]
tests/utils/testapp/userspace-probe-elf-cxx-binary/test_class.h [new file with mode: 0644]
tests/utils/testapp/userspace-probe-elf-cxx-binary/userspace-probe-elf-cxx-binary.cpp [new file with mode: 0644]
tests/utils/testapp/userspace-probe-sdt-binary/Makefile.am [new file with mode: 0644]
tests/utils/testapp/userspace-probe-sdt-binary/foobar_provider.d [new file with mode: 0644]
tests/utils/testapp/userspace-probe-sdt-binary/libbar.c [new file with mode: 0644]
tests/utils/testapp/userspace-probe-sdt-binary/libbar.h [new file with mode: 0644]
tests/utils/testapp/userspace-probe-sdt-binary/libfoo.c [new file with mode: 0644]
tests/utils/testapp/userspace-probe-sdt-binary/libfoo.h [new file with mode: 0644]
tests/utils/testapp/userspace-probe-sdt-binary/libzzz.c [new file with mode: 0644]
tests/utils/testapp/userspace-probe-sdt-binary/libzzz.h [new file with mode: 0644]
tests/utils/testapp/userspace-probe-sdt-binary/sema.c [new file with mode: 0644]
tests/utils/testapp/userspace-probe-sdt-binary/sema.h [new file with mode: 0644]
tests/utils/testapp/userspace-probe-sdt-binary/userspace-probe-sdt-binary.c [new file with mode: 0644]
tests/utils/utils.sh
This page took 0.036437 seconds and 4 git commands to generate.