From: Michael Jeanson Date: Tue, 20 Oct 2020 18:42:32 +0000 (-0400) Subject: port: tests: uprobe is Linux specific X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9312883423b637080dadcb2c24d8d9f9b3045764;p=lttng-tools.git port: tests: uprobe is Linux specific Change-Id: I6db00a9d01f7534874051eef7477db7dead3a670 Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- diff --git a/tests/unit/test_event_rule.cpp b/tests/unit/test_event_rule.cpp index d7228d0f3..a6bf6180a 100644 --- a/tests/unit/test_event_rule.cpp +++ b/tests/unit/test_event_rule.cpp @@ -43,7 +43,13 @@ int lttng_opt_quiet = 1; int lttng_opt_verbose; int lttng_opt_mi; -#define NUM_TESTS 212 +#ifdef __linux__ +#define UPROBE_NUM_TESTS 9 +#else /* __linux__ */ +#define UPROBE_NUM_TESTS 0 +#endif /* __linux__ */ + +#define NUM_TESTS (203 + UPROBE_NUM_TESTS) namespace { struct tracepoint_test { @@ -446,6 +452,7 @@ void test_event_rule_python_logging(void) lttng_log_level_rule_destroy(log_level_rule); } +#ifdef __linux__ static void test_event_rule_userspace_probe(void) { struct lttng_event_rule *uprobe = NULL; @@ -523,6 +530,9 @@ end: lttng_userspace_probe_location_destroy(probe_location); lttng_userspace_probe_location_lookup_method_destroy(lookup_method); } +#else +static void test_event_rule_userspace_probe(void) {} +#endif static void test_event_rule_kernel_probe_by_location( const struct lttng_kernel_probe_location *location)