Cleanup: tests: notification: fix typo kprobe/uprobe
[lttng-tools.git] / tests / regression / tools / notification / notification.cpp
index 7a0b5dc91d65a4c9f41651bcf627510a86b92840..aa351d96a0c78245566f479e1ca639c6ec957434 100644 (file)
@@ -22,8 +22,8 @@
 #include <signal.h>
 #include <poll.h>
 
-#include <common/compat/errno.h>
-#include <common/macros.h>
+#include <common/compat/errno.hpp>
+#include <common/macros.hpp>
 #include <lttng/lttng.h>
 
 #include <tap/tap.h>
@@ -48,6 +48,7 @@ enum field_type {
        FIELD_TYPE_ARRAY_FIELD,
 };
 
+namespace {
 struct capture_base_field_tuple {
        const char *field_name;
        enum field_type field_type;
@@ -58,6 +59,7 @@ struct capture_base_field_tuple {
        validate_cb validate_ust;
        validate_cb validate_kernel;
 };
+} /* namespace */
 
 static
 const char *field_value_type_to_str(enum lttng_event_field_value_type type)
@@ -272,7 +274,7 @@ static int validate_array_unsigned_int_field_at_index(
        }
 
        ok(value == expected_value,
-                       "Expected unsigned integer value %u, got %" PRIu64,
+                       "Expected unsigned integer value %" PRIu64 ", got %" PRIu64,
                        expected_value, value);
 
        ret = 0;
@@ -794,7 +796,6 @@ error:
 static
 void test_triggers_buffer_usage_condition(const char *session_name,
                const char *channel_name,
-               enum lttng_domain_type domain_type,
                enum lttng_condition_type condition_type)
 {
        unsigned int test_vector_size = 5, i;
@@ -1860,8 +1861,7 @@ end:
        return;
 }
 
-static void test_kprobe_event_rule_notification(
-               enum lttng_domain_type domain_type)
+static void test_kprobe_event_rule_notification(void)
 {
        int i, ret;
        enum lttng_error_code ret_code;
@@ -1956,7 +1956,6 @@ end:
 }
 
 static void test_uprobe_event_rule_notification(
-               enum lttng_domain_type domain_type,
                const char *testapp_path,
                const char *test_symbol_name)
 {
@@ -1999,7 +1998,7 @@ static void test_uprobe_event_rule_notification(
        ok(notification_channel, "Notification channel object creation");
 
        event_rule = lttng_event_rule_kernel_uprobe_create(probe_location);
-       ok(event_rule, "kprobe event rule object creation");
+       ok(event_rule, "uprobe event rule object creation");
 
        event_rule_status = lttng_event_rule_kernel_uprobe_set_event_name(
                        event_rule, trigger_name);
@@ -2060,8 +2059,7 @@ end:
        return;
 }
 
-static void test_syscall_event_rule_notification(
-               enum lttng_domain_type domain_type)
+static void test_syscall_event_rule_notification(void)
 {
        int i, ret;
        enum lttng_error_code ret_code;
@@ -2145,8 +2143,7 @@ end:
        return;
 }
 
-static void test_syscall_event_rule_notification_filter(
-               enum lttng_domain_type domain_type)
+static void test_syscall_event_rule_notification_filter(void)
 {
        int i, ret;
        enum lttng_error_code ret_code;
@@ -2570,13 +2567,11 @@ int main(int argc, const char *argv[])
                diag("Test trigger for domain %s with buffer_usage_low condition",
                                domain_type_string);
                test_triggers_buffer_usage_condition(session_name, channel_name,
-                               domain_type,
                                LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW);
 
                diag("Test trigger for domain %s with buffer_usage_high condition",
                                domain_type_string);
                test_triggers_buffer_usage_condition(session_name, channel_name,
-                               domain_type,
                                LTTNG_CONDITION_TYPE_BUFFER_USAGE_HIGH);
 
                diag("Test buffer usage notification channel api for domain %s",
@@ -2613,7 +2608,7 @@ int main(int argc, const char *argv[])
                diag("Test kprobe event rule notifications for domain %s",
                                domain_type_string);
 
-               test_kprobe_event_rule_notification(domain_type);
+               test_kprobe_event_rule_notification();
 
                break;
        }
@@ -2626,12 +2621,12 @@ int main(int argc, const char *argv[])
                diag("Test syscall event rule notifications for domain %s",
                                domain_type_string);
 
-               test_syscall_event_rule_notification(domain_type);
+               test_syscall_event_rule_notification();
 
                diag("Test syscall filtering event rule notifications for domain %s",
                                domain_type_string);
 
-               test_syscall_event_rule_notification_filter(domain_type);
+               test_syscall_event_rule_notification_filter();
 
                break;
        }
@@ -2655,7 +2650,7 @@ int main(int argc, const char *argv[])
                                domain_type_string);
 
                test_uprobe_event_rule_notification(
-                               domain_type, testapp_path, test_symbol_name);
+                               testapp_path, test_symbol_name);
 
                break;
        }
This page took 0.026106 seconds and 4 git commands to generate.