Tests: fix: test_list_triggers_cli fails to list userspace-probe-sdt trigger
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 14 Apr 2023 18:57:06 +0000 (14:57 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 17 Apr 2023 17:50:00 +0000 (13:50 -0400)
commit2f101846a0f504e64d37bf93c3b67d531f5a3b65
tree48e102393113ab98a73c1b48927da520595c7488
parent7ebbf3f02689e6d437206297230cbf264f67e3be
Tests: fix: test_list_triggers_cli fails to list userspace-probe-sdt trigger

The listing of triggers which use an event rule match condition
consisting in a user space probe set on an SDT probe fails since
28f23191d.

The coding style imposes an order of includes. However, the order in
which the probe declarations generated by systemtap vs sdt.h matters.

From SYSTEMTAP(2):
  Sometimes, semaphore variables are not necessary nor helpful. Skipping
  them can simplify the build process, by omitting the extra "test.o"
  file. To skip dependence upon semaphore variables, include "<sys/sdt.h>"
  within the application before "test.h":
  [...]
  In this mode, the ENABLED() test is fixed at 1.

The reformatted version of userspace-probe-sdt-binary.c includes sdt.h
after the probe causing the probes to use a guarding semaphore.

Unfortunately, we can't instrument such probes and the registration of
the trigger silently fails. The silent failure is addressed by a
follow-up commit.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I5146f55ed5d9d109f1f7bc32e0f7c2c8bf839f8e
tests/utils/testapp/userspace-probe-sdt-binary/libbar.c
tests/utils/testapp/userspace-probe-sdt-binary/libfoo.c
tests/utils/testapp/userspace-probe-sdt-binary/libzzz.c
tests/utils/testapp/userspace-probe-sdt-binary/sema.c
tests/utils/testapp/userspace-probe-sdt-binary/userspace-probe-sdt-binary.c
This page took 0.025956 seconds and 4 git commands to generate.