Commit | Line | Data |
---|---|---|
9cff59ec JR |
1 | /* |
2 | * test_action.c | |
3 | * | |
4 | * Unit tests for the notification API. | |
5 | * | |
6 | * Copyright (C) 2017 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> | |
7 | * | |
8 | * SPDX-License-Identifier: MIT | |
9 | * | |
10 | */ | |
11 | ||
12 | #include <assert.h> | |
13 | #include <inttypes.h> | |
14 | #include <stdio.h> | |
15 | #include <string.h> | |
16 | #include <unistd.h> | |
17 | ||
18 | #include <tap/tap.h> | |
19 | ||
20 | #include <common/payload-view.h> | |
21 | #include <common/payload.h> | |
22 | #include <lttng/action/action-internal.h> | |
23 | #include <lttng/action/action.h> | |
24 | #include <lttng/action/firing-policy-internal.h> | |
25 | #include <lttng/action/firing-policy.h> | |
26 | #include <lttng/action/notify.h> | |
27 | ||
28 | /* For error.h */ | |
29 | int lttng_opt_quiet = 1; | |
30 | int lttng_opt_verbose; | |
31 | int lttng_opt_mi; | |
32 | ||
33 | #define NUM_TESTS 2 | |
34 | ||
35 | static void test_action_notify(void) | |
36 | { | |
37 | struct lttng_action *notify_action = NULL; | |
38 | ||
39 | notify_action = lttng_action_notify_create(); | |
40 | ok(notify_action, "Create notify action"); | |
41 | ok(lttng_action_get_type(notify_action) == LTTNG_ACTION_TYPE_NOTIFY, | |
42 | "Action has type LTTNG_ACTION_TYPE_NOTIFY"); | |
43 | lttng_action_destroy(notify_action); | |
44 | } | |
45 | ||
46 | int main(int argc, const char *argv[]) | |
47 | { | |
48 | plan_tests(NUM_TESTS); | |
49 | test_action_notify(); | |
50 | return exit_status(); | |
51 | } |