X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Fregression%2Fust%2Ftype-declarations%2Fust_tests_td.h;h=5339b0900d92f4d9b30995e4dad0d48f0404b2fc;hp=45bccbfabb07624653275847b94327802a054ea9;hb=358f4691e7c9b46551aa1f2f6f689e090eb9bce5;hpb=e85e37239d682b8127005c3f63f72999193214c1 diff --git a/tests/regression/ust/type-declarations/ust_tests_td.h b/tests/regression/ust/type-declarations/ust_tests_td.h index 45bccbfab..5339b0900 100644 --- a/tests/regression/ust/type-declarations/ust_tests_td.h +++ b/tests/regression/ust/type-declarations/ust_tests_td.h @@ -43,6 +43,16 @@ TRACEPOINT_ENUM(ust_tests_td, testenum2, ) ) +TRACEPOINT_ENUM(ust_tests_td, testenum3, + TP_ENUM_VALUES( + ctf_enum_auto("zero") + ctf_enum_value("two", 2) + ctf_enum_auto("three") + ctf_enum_range("ten_to_twenty", 10, 20) + ctf_enum_auto("twenty_one") + ) +) + /* * Enumeration field is used twice to make sure the global type declaration * is entered only once in the metadata file. @@ -70,6 +80,20 @@ TRACEPOINT_EVENT(ust_tests_td, tptest_bis, ) ) +/* + * Test autoincrementing enumeration values. + */ +TRACEPOINT_EVENT(ust_tests_td, test_auto, + TP_ARGS(void), + TP_FIELDS( + ctf_enum(ust_tests_td, testenum3, int, zero, 0) + ctf_enum(ust_tests_td, testenum3, int, two, 2) + ctf_enum(ust_tests_td, testenum3, int, three, 3) + ctf_enum(ust_tests_td, testenum3, int, fifteen, 15) + ctf_enum(ust_tests_td, testenum3, int, twenty_one, 21) + ) +) + #endif /* _TRACEPOINT_UST_TESTS_TD_H */ #undef TRACEPOINT_INCLUDE