port: tests: uprobe is Linux specific
[lttng-tools.git] / tests / unit / test_event_rule.cpp
index d0e33a1f8d1a11db7de06cc4e9409cfbc35ab581..a6bf6180a3bb007081d06ac06e59acd59ba81345 100644 (file)
 
 #include <tap/tap.h>
 
-#include <common/payload-view.h>
-#include <common/payload.h>
+#include <common/payload-view.hpp>
+#include <common/payload.hpp>
 #include <lttng/domain.h>
-#include <lttng/event-rule/jul-logging-internal.h>
+#include <lttng/event-rule/jul-logging-internal.hpp>
 #include <lttng/event-rule/jul-logging.h>
-#include <lttng/event-rule/kernel-kprobe-internal.h>
+#include <lttng/event-rule/kernel-kprobe-internal.hpp>
 #include <lttng/event-rule/kernel-kprobe.h>
-#include <lttng/event-rule/kernel-syscall-internal.h>
+#include <lttng/event-rule/kernel-syscall-internal.hpp>
 #include <lttng/event-rule/kernel-syscall.h>
-#include <lttng/event-rule/python-logging-internal.h>
+#include <lttng/event-rule/python-logging-internal.hpp>
 #include <lttng/event-rule/python-logging.h>
-#include <lttng/event-rule/kernel-tracepoint-internal.h>
+#include <lttng/event-rule/kernel-tracepoint-internal.hpp>
 #include <lttng/event-rule/kernel-tracepoint.h>
-#include <lttng/event-rule/kernel-uprobe-internal.h>
+#include <lttng/event-rule/kernel-uprobe-internal.hpp>
 #include <lttng/event-rule/kernel-uprobe.h>
-#include <lttng/event-rule/user-tracepoint-internal.h>
+#include <lttng/event-rule/user-tracepoint-internal.hpp>
 #include <lttng/event-rule/user-tracepoint.h>
 #include <lttng/event.h>
-#include <lttng/kernel-probe-internal.h>
+#include <lttng/kernel-probe-internal.hpp>
 #include <lttng/kernel-probe.h>
-#include <lttng/userspace-probe-internal.h>
+#include <lttng/userspace-probe-internal.hpp>
 #include <lttng/userspace-probe.h>
-#include "bin/lttng/loglevel.h"
+#include "bin/lttng/loglevel.hpp"
 
 /* For error.h. */
 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 {
        enum lttng_domain_type type;
        bool support_name_pattern_exclusion;
 };
+} /* namespace */
 
 typedef const char *(*log_level_name_getter)(int log_level);
 
@@ -444,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;
@@ -521,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)
This page took 0.024077 seconds and 4 git commands to generate.