From bebb067ef8020d5c36ab48271b0d9d9bb2b24e11 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Thu, 29 Apr 2021 12:03:02 -0400 Subject: [PATCH] Move current compile tests to 'api1' Move the current compile tests to the 'api1' directory and build them with LTTNG_UST_COMPAT_API_VERSION=0 and LTTNG_UST_COMPAT_API_VERSION=1. Change-Id: Ic46d549b5ec0735931bb2aa64115909fb2e25414 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- .gitignore | 31 ++++++++++++------- configure.ac | 13 ++++---- tests/compile/Makefile.am | 11 +------ tests/compile/api1/Makefile.am | 13 ++++++++ tests/compile/api1/hello-many/Makefile.am | 20 ++++++++++++ tests/compile/{ => api1}/hello-many/README | 0 .../{ => api1}/hello-many/hello-many.c | 0 tests/compile/{ => api1}/hello-many/tp.c | 0 .../hello-many/ust_tests_hello_many.h | 0 tests/compile/api1/hello.cxx/Makefile.am | 19 ++++++++++++ tests/compile/{ => api1}/hello.cxx/README | 0 tests/compile/{ => api1}/hello.cxx/hello.cpp | 0 tests/compile/{ => api1}/hello.cxx/tp-cpp.cpp | 0 .../{ => api1}/hello.cxx/ust_tests_hello.h | 0 tests/compile/api1/hello/Makefile.am | 20 ++++++++++++ .../{ => api1}/hello/Makefile.example.bsd | 0 .../{ => api1}/hello/Makefile.example.linux | 0 tests/compile/{ => api1}/hello/README | 0 tests/compile/{ => api1}/hello/hello.c | 0 tests/compile/{ => api1}/hello/tp.c | 0 .../{ => api1}/hello/ust_tests_hello.h | 0 .../api1/same_line_tracepoint/Makefile.am | 19 ++++++++++++ .../{ => api1}/same_line_tracepoint/README | 0 .../same_line_tracepoint.c | 0 .../same_line_tracepoint/ust_tests_sameline.h | 4 +-- tests/compile/api1/test-app-ctx/Makefile.am | 18 +++++++++++ tests/compile/{ => api1}/test-app-ctx/hello.c | 0 tests/compile/{ => api1}/test-app-ctx/tp.c | 0 .../{ => api1}/test-app-ctx/ust_tests_hello.h | 0 tests/compile/api1/ust-fields/Makefile.am | 19 ++++++++++++ .../{ctf-types => api1/ust-fields}/README | 0 .../{ctf-types => api1/ust-fields}/tp.c | 2 +- .../ust-fields/ust-fields.c} | 6 ++-- .../ust-fields/ust_tests_ust_fields.h} | 26 ++++++++-------- tests/compile/ctf-types/Makefile.am | 12 ------- tests/compile/hello-many/Makefile.am | 12 ------- tests/compile/hello.cxx/Makefile.am | 11 ------- tests/compile/hello/Makefile.am | 12 ------- .../compile/same_line_tracepoint/Makefile.am | 11 ------- tests/compile/test-app-ctx/Makefile.am | 10 ------ 40 files changed, 174 insertions(+), 115 deletions(-) create mode 100644 tests/compile/api1/Makefile.am create mode 100644 tests/compile/api1/hello-many/Makefile.am rename tests/compile/{ => api1}/hello-many/README (100%) rename tests/compile/{ => api1}/hello-many/hello-many.c (100%) rename tests/compile/{ => api1}/hello-many/tp.c (100%) rename tests/compile/{ => api1}/hello-many/ust_tests_hello_many.h (100%) create mode 100644 tests/compile/api1/hello.cxx/Makefile.am rename tests/compile/{ => api1}/hello.cxx/README (100%) rename tests/compile/{ => api1}/hello.cxx/hello.cpp (100%) rename tests/compile/{ => api1}/hello.cxx/tp-cpp.cpp (100%) rename tests/compile/{ => api1}/hello.cxx/ust_tests_hello.h (100%) create mode 100644 tests/compile/api1/hello/Makefile.am rename tests/compile/{ => api1}/hello/Makefile.example.bsd (100%) rename tests/compile/{ => api1}/hello/Makefile.example.linux (100%) rename tests/compile/{ => api1}/hello/README (100%) rename tests/compile/{ => api1}/hello/hello.c (100%) rename tests/compile/{ => api1}/hello/tp.c (100%) rename tests/compile/{ => api1}/hello/ust_tests_hello.h (100%) create mode 100644 tests/compile/api1/same_line_tracepoint/Makefile.am rename tests/compile/{ => api1}/same_line_tracepoint/README (100%) rename tests/compile/{ => api1}/same_line_tracepoint/same_line_tracepoint.c (100%) rename tests/compile/{ => api1}/same_line_tracepoint/ust_tests_sameline.h (81%) create mode 100644 tests/compile/api1/test-app-ctx/Makefile.am rename tests/compile/{ => api1}/test-app-ctx/hello.c (100%) rename tests/compile/{ => api1}/test-app-ctx/tp.c (100%) rename tests/compile/{ => api1}/test-app-ctx/ust_tests_hello.h (100%) create mode 100644 tests/compile/api1/ust-fields/Makefile.am rename tests/compile/{ctf-types => api1/ust-fields}/README (100%) rename tests/compile/{ctf-types => api1/ust-fields}/tp.c (81%) rename tests/compile/{ctf-types/ctf-types.c => api1/ust-fields/ust-fields.c} (74%) rename tests/compile/{ctf-types/ust_tests_ctf_types.h => api1/ust-fields/ust_tests_ust_fields.h} (60%) delete mode 100644 tests/compile/ctf-types/Makefile.am delete mode 100644 tests/compile/hello-many/Makefile.am delete mode 100644 tests/compile/hello.cxx/Makefile.am delete mode 100644 tests/compile/hello/Makefile.am delete mode 100644 tests/compile/same_line_tracepoint/Makefile.am delete mode 100644 tests/compile/test-app-ctx/Makefile.am diff --git a/.gitignore b/.gitignore index b36ae472..b7347e11 100644 --- a/.gitignore +++ b/.gitignore @@ -76,12 +76,18 @@ cscope.* /tests/benchmark/bench1 /tests/benchmark/bench2 -/tests/compile/ctf-types/ctf-types -/tests/compile/hello.cxx/hello -/tests/compile/hello/hello -/tests/compile/hello-many/hello-many -/tests/compile/same_line_tracepoint/same_line_tracepoint -/tests/compile/test-app-ctx/hello +/tests/compile/api1/hello.cxx/hello +/tests/compile/api1/hello.cxx/hello-compatapi1 +/tests/compile/api1/hello/hello +/tests/compile/api1/hello/hello-compatapi1 +/tests/compile/api1/hello-many/hello-many +/tests/compile/api1/hello-many/hello-many-compatapi1 +/tests/compile/api1/same_line_tracepoint/same_line_tracepoint +/tests/compile/api1/same_line_tracepoint/same_line_tracepoint_compatapi1 +/tests/compile/api1/test-app-ctx/hello +/tests/compile/api1/test-app-ctx/hello-compatapi1 +/tests/compile/api1/ust-fields/ust-fields +/tests/compile/api1/ust-fields/ust-fields-compatapi1 /tests/unit/gcc-weak-hidden/test_gcc_weak_hidden /tests/unit/libmsgpack/test_msgpack /tests/unit/libringbuffer/test_shm @@ -153,12 +159,13 @@ cscope.* /tests/Makefile /tests/benchmark/Makefile /tests/compile/Makefile -/tests/compile/ctf-types/Makefile -/tests/compile/hello-many/Makefile -/tests/compile/hello.cxx/Makefile -/tests/compile/hello/Makefile -/tests/compile/same_line_tracepoint/Makefile -/tests/compile/test-app-ctx/Makefile +/tests/compile/api1/Makefile +/tests/compile/api1/ust-fields/Makefile +/tests/compile/api1/hello-many/Makefile +/tests/compile/api1/hello.cxx/Makefile +/tests/compile/api1/hello/Makefile +/tests/compile/api1/same_line_tracepoint/Makefile +/tests/compile/api1/test-app-ctx/Makefile /tests/unit/Makefile /tests/unit/gcc-weak-hidden/Makefile /tests/unit/libmsgpack/Makefile diff --git a/configure.ac b/configure.ac index 1b8f2e3c..a1a79eb2 100644 --- a/configure.ac +++ b/configure.ac @@ -607,13 +607,14 @@ AC_CONFIG_FILES([ src/python-lttngust/Makefile src/python-lttngust/setup.py tests/benchmark/Makefile - tests/compile/ctf-types/Makefile - tests/compile/hello.cxx/Makefile - tests/compile/hello/Makefile - tests/compile/hello-many/Makefile + tests/compile/api1/ust-fields/Makefile + tests/compile/api1/hello.cxx/Makefile + tests/compile/api1/hello/Makefile + tests/compile/api1/hello-many/Makefile + tests/compile/api1/Makefile + tests/compile/api1/same_line_tracepoint/Makefile + tests/compile/api1/test-app-ctx/Makefile tests/compile/Makefile - tests/compile/same_line_tracepoint/Makefile - tests/compile/test-app-ctx/Makefile tests/Makefile tests/unit/gcc-weak-hidden/Makefile tests/unit/libmsgpack/Makefile diff --git a/tests/compile/Makefile.am b/tests/compile/Makefile.am index 404bb156..0ce13bea 100644 --- a/tests/compile/Makefile.am +++ b/tests/compile/Makefile.am @@ -1,13 +1,4 @@ # SPDX-License-Identifier: LGPL-2.1-only SUBDIRS = \ - ctf-types \ - hello \ - hello-many \ - same_line_tracepoint \ - test-app-ctx - -if HAVE_CXX -SUBDIRS += hello.cxx -endif - + api1 diff --git a/tests/compile/api1/Makefile.am b/tests/compile/api1/Makefile.am new file mode 100644 index 00000000..c88deb0e --- /dev/null +++ b/tests/compile/api1/Makefile.am @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: LGPL-2.1-only + +SUBDIRS = \ + ust-fields \ + hello \ + hello-many \ + same_line_tracepoint \ + test-app-ctx + +if HAVE_CXX +SUBDIRS += hello.cxx +endif + diff --git a/tests/compile/api1/hello-many/Makefile.am b/tests/compile/api1/hello-many/Makefile.am new file mode 100644 index 00000000..3e50e497 --- /dev/null +++ b/tests/compile/api1/hello-many/Makefile.am @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: LGPL-2.1-only + +AM_CPPFLAGS += -I$(srcdir) + +noinst_PROGRAMS = hello-many hello-many-compatapi1 + +hello_many_SOURCES = hello-many.c tp.c ust_tests_hello_many.h +hello_many_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS) +hello_many_LDADD = \ + $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ + $(DL_LIBS) + +# Compile without API0 compat macros +hello_many_compatapi1_SOURCES = hello-many.c tp.c ust_tests_hello_many.h +hello_many_compatapi1_CFLAGS = -Werror=old-style-definition -DLTTNG_UST_COMPAT_API_VERSION=1 $(AM_CFLAGS) +hello_many_compatapi1_LDADD = \ + $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ + $(DL_LIBS) + +EXTRA_DIST = README diff --git a/tests/compile/hello-many/README b/tests/compile/api1/hello-many/README similarity index 100% rename from tests/compile/hello-many/README rename to tests/compile/api1/hello-many/README diff --git a/tests/compile/hello-many/hello-many.c b/tests/compile/api1/hello-many/hello-many.c similarity index 100% rename from tests/compile/hello-many/hello-many.c rename to tests/compile/api1/hello-many/hello-many.c diff --git a/tests/compile/hello-many/tp.c b/tests/compile/api1/hello-many/tp.c similarity index 100% rename from tests/compile/hello-many/tp.c rename to tests/compile/api1/hello-many/tp.c diff --git a/tests/compile/hello-many/ust_tests_hello_many.h b/tests/compile/api1/hello-many/ust_tests_hello_many.h similarity index 100% rename from tests/compile/hello-many/ust_tests_hello_many.h rename to tests/compile/api1/hello-many/ust_tests_hello_many.h diff --git a/tests/compile/api1/hello.cxx/Makefile.am b/tests/compile/api1/hello.cxx/Makefile.am new file mode 100644 index 00000000..fe1c8ab8 --- /dev/null +++ b/tests/compile/api1/hello.cxx/Makefile.am @@ -0,0 +1,19 @@ +# SPDX-License-Identifier: LGPL-2.1-only + +AM_CPPFLAGS += -I$(srcdir) + +noinst_PROGRAMS = hello hello-compatapi1 + +hello_SOURCES = hello.cpp tp-cpp.cpp ust_tests_hello.h +hello_LDADD = \ + $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ + $(DL_LIBS) + +# Compile without API0 compat macros +hello_compatapi1_SOURCES = hello.cpp tp-cpp.cpp ust_tests_hello.h +hello_compatapi1_CFLAGS = -DLTTNG_UST_COMPAT_API_VERSION=1 $(AM_CFLAGS) +hello_compatapi1_LDADD = \ + $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ + $(DL_LIBS) + +EXTRA_DIST = README diff --git a/tests/compile/hello.cxx/README b/tests/compile/api1/hello.cxx/README similarity index 100% rename from tests/compile/hello.cxx/README rename to tests/compile/api1/hello.cxx/README diff --git a/tests/compile/hello.cxx/hello.cpp b/tests/compile/api1/hello.cxx/hello.cpp similarity index 100% rename from tests/compile/hello.cxx/hello.cpp rename to tests/compile/api1/hello.cxx/hello.cpp diff --git a/tests/compile/hello.cxx/tp-cpp.cpp b/tests/compile/api1/hello.cxx/tp-cpp.cpp similarity index 100% rename from tests/compile/hello.cxx/tp-cpp.cpp rename to tests/compile/api1/hello.cxx/tp-cpp.cpp diff --git a/tests/compile/hello.cxx/ust_tests_hello.h b/tests/compile/api1/hello.cxx/ust_tests_hello.h similarity index 100% rename from tests/compile/hello.cxx/ust_tests_hello.h rename to tests/compile/api1/hello.cxx/ust_tests_hello.h diff --git a/tests/compile/api1/hello/Makefile.am b/tests/compile/api1/hello/Makefile.am new file mode 100644 index 00000000..a4c8c932 --- /dev/null +++ b/tests/compile/api1/hello/Makefile.am @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: LGPL-2.1-only + +AM_CPPFLAGS += -I$(srcdir) + +noinst_PROGRAMS = hello hello-compatapi1 + +hello_SOURCES = hello.c tp.c ust_tests_hello.h +hello_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS) +hello_LDADD = \ + $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ + $(DL_LIBS) + +# Compile without API0 compat macros +hello_compatapi1_SOURCES = hello.c tp.c ust_tests_hello.h +hello_compatapi1_CFLAGS = -Werror=old-style-definition -DLTTNG_UST_COMPAT_API_VERSION=1 $(AM_CFLAGS) +hello_compatapi1_LDADD = \ + $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ + $(DL_LIBS) + +EXTRA_DIST = README diff --git a/tests/compile/hello/Makefile.example.bsd b/tests/compile/api1/hello/Makefile.example.bsd similarity index 100% rename from tests/compile/hello/Makefile.example.bsd rename to tests/compile/api1/hello/Makefile.example.bsd diff --git a/tests/compile/hello/Makefile.example.linux b/tests/compile/api1/hello/Makefile.example.linux similarity index 100% rename from tests/compile/hello/Makefile.example.linux rename to tests/compile/api1/hello/Makefile.example.linux diff --git a/tests/compile/hello/README b/tests/compile/api1/hello/README similarity index 100% rename from tests/compile/hello/README rename to tests/compile/api1/hello/README diff --git a/tests/compile/hello/hello.c b/tests/compile/api1/hello/hello.c similarity index 100% rename from tests/compile/hello/hello.c rename to tests/compile/api1/hello/hello.c diff --git a/tests/compile/hello/tp.c b/tests/compile/api1/hello/tp.c similarity index 100% rename from tests/compile/hello/tp.c rename to tests/compile/api1/hello/tp.c diff --git a/tests/compile/hello/ust_tests_hello.h b/tests/compile/api1/hello/ust_tests_hello.h similarity index 100% rename from tests/compile/hello/ust_tests_hello.h rename to tests/compile/api1/hello/ust_tests_hello.h diff --git a/tests/compile/api1/same_line_tracepoint/Makefile.am b/tests/compile/api1/same_line_tracepoint/Makefile.am new file mode 100644 index 00000000..890ce487 --- /dev/null +++ b/tests/compile/api1/same_line_tracepoint/Makefile.am @@ -0,0 +1,19 @@ +# SPDX-License-Identifier: LGPL-2.1-only + +AM_CPPFLAGS += -I$(srcdir) + +noinst_PROGRAMS = same_line_tracepoint same_line_tracepoint_compatapi1 + +same_line_tracepoint_SOURCES = same_line_tracepoint.c ust_tests_sameline.h +same_line_tracepoint_LDADD = \ + $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ + $(DL_LIBS) + +# Compile without API0 compat macros +same_line_tracepoint_compatapi1_SOURCES = same_line_tracepoint.c ust_tests_sameline.h +same_line_tracepoint_compatapi1_CFLAGS = -DLTTNG_UST_COMPAT_API_VERSION=1 $(AM_CFLAGS) +same_line_tracepoint_compatapi1_LDADD = \ + $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ + $(DL_LIBS) + +EXTRA_DIST = README diff --git a/tests/compile/same_line_tracepoint/README b/tests/compile/api1/same_line_tracepoint/README similarity index 100% rename from tests/compile/same_line_tracepoint/README rename to tests/compile/api1/same_line_tracepoint/README diff --git a/tests/compile/same_line_tracepoint/same_line_tracepoint.c b/tests/compile/api1/same_line_tracepoint/same_line_tracepoint.c similarity index 100% rename from tests/compile/same_line_tracepoint/same_line_tracepoint.c rename to tests/compile/api1/same_line_tracepoint/same_line_tracepoint.c diff --git a/tests/compile/same_line_tracepoint/ust_tests_sameline.h b/tests/compile/api1/same_line_tracepoint/ust_tests_sameline.h similarity index 81% rename from tests/compile/same_line_tracepoint/ust_tests_sameline.h rename to tests/compile/api1/same_line_tracepoint/ust_tests_sameline.h index b2e4d8aa..96be96a8 100644 --- a/tests/compile/same_line_tracepoint/ust_tests_sameline.h +++ b/tests/compile/api1/same_line_tracepoint/ust_tests_sameline.h @@ -16,13 +16,13 @@ LTTNG_UST_TRACEPOINT_EVENT(ust_tests_sameline, event1, LTTNG_UST_TP_ARGS(), LTTNG_UST_TP_FIELDS() ) -LTTNG_UST_TRACEPOINT_LOGLEVEL(ust_tests_sameline, event1, TRACE_CRIT) +LTTNG_UST_TRACEPOINT_LOGLEVEL(ust_tests_sameline, event1, LTTNG_UST_TRACEPOINT_LOGLEVEL_CRIT) LTTNG_UST_TRACEPOINT_EVENT(ust_tests_sameline, event2, LTTNG_UST_TP_ARGS(), LTTNG_UST_TP_FIELDS() ) -LTTNG_UST_TRACEPOINT_LOGLEVEL(ust_tests_sameline, event2, TRACE_CRIT) +LTTNG_UST_TRACEPOINT_LOGLEVEL(ust_tests_sameline, event2, LTTNG_UST_TRACEPOINT_LOGLEVEL_CRIT) #endif /* _TRACEPOINT_UST_TESTS_SAMELINE_H */ diff --git a/tests/compile/api1/test-app-ctx/Makefile.am b/tests/compile/api1/test-app-ctx/Makefile.am new file mode 100644 index 00000000..5313b011 --- /dev/null +++ b/tests/compile/api1/test-app-ctx/Makefile.am @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: LGPL-2.1-only + +AM_CPPFLAGS += -I$(srcdir) + +noinst_PROGRAMS = hello hello-compatapi1 + +hello_SOURCES = hello.c tp.c ust_tests_hello.h +hello_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS) +hello_LDADD = \ + $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ + $(DL_LIBS) + +# Compile without API0 compat macros +hello_compatapi1_SOURCES = hello.c tp.c ust_tests_hello.h +hello_compatapi1_CFLAGS = -Werror=old-style-definition -DLTTNG_UST_COMPAT_API_VERSION=1 $(AM_CFLAGS) +hello_compatapi1_LDADD = \ + $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ + $(DL_LIBS) diff --git a/tests/compile/test-app-ctx/hello.c b/tests/compile/api1/test-app-ctx/hello.c similarity index 100% rename from tests/compile/test-app-ctx/hello.c rename to tests/compile/api1/test-app-ctx/hello.c diff --git a/tests/compile/test-app-ctx/tp.c b/tests/compile/api1/test-app-ctx/tp.c similarity index 100% rename from tests/compile/test-app-ctx/tp.c rename to tests/compile/api1/test-app-ctx/tp.c diff --git a/tests/compile/test-app-ctx/ust_tests_hello.h b/tests/compile/api1/test-app-ctx/ust_tests_hello.h similarity index 100% rename from tests/compile/test-app-ctx/ust_tests_hello.h rename to tests/compile/api1/test-app-ctx/ust_tests_hello.h diff --git a/tests/compile/api1/ust-fields/Makefile.am b/tests/compile/api1/ust-fields/Makefile.am new file mode 100644 index 00000000..e56f0c00 --- /dev/null +++ b/tests/compile/api1/ust-fields/Makefile.am @@ -0,0 +1,19 @@ +# SPDX-License-Identifier: LGPL-2.1-only + +AM_CPPFLAGS += -I$(srcdir) + +noinst_PROGRAMS = ust-fields ust-fields-compatapi1 + +ust_fields_SOURCES = ust-fields.c tp.c ust_tests_ust_fields.h +ust_fields_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS) +ust_fields_LDADD = \ + $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ + $(DL_LIBS) + +ust_fields_compatapi1_SOURCES = ust-fields.c tp.c ust_tests_ust_fields.h +ust_fields_compatapi1_CFLAGS = -Werror=old-style-definition -DLTTNG_UST_COMPAT_API_VERSION=1 $(AM_CFLAGS) +ust_fields_compatapi1_LDADD = \ + $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ + $(DL_LIBS) + +EXTRA_DIST = README diff --git a/tests/compile/ctf-types/README b/tests/compile/api1/ust-fields/README similarity index 100% rename from tests/compile/ctf-types/README rename to tests/compile/api1/ust-fields/README diff --git a/tests/compile/ctf-types/tp.c b/tests/compile/api1/ust-fields/tp.c similarity index 81% rename from tests/compile/ctf-types/tp.c rename to tests/compile/api1/ust-fields/tp.c index 25c9c8a7..fbc112a8 100644 --- a/tests/compile/ctf-types/tp.c +++ b/tests/compile/api1/ust-fields/tp.c @@ -5,4 +5,4 @@ */ #define LTTNG_UST_TRACEPOINT_CREATE_PROBES -#include "ust_tests_ctf_types.h" +#include "ust_tests_ust_fields.h" diff --git a/tests/compile/ctf-types/ctf-types.c b/tests/compile/api1/ust-fields/ust-fields.c similarity index 74% rename from tests/compile/ctf-types/ctf-types.c rename to tests/compile/api1/ust-fields/ust-fields.c index c54ed6a4..0b4aa0a3 100644 --- a/tests/compile/ctf-types/ctf-types.c +++ b/tests/compile/api1/ust-fields/ust-fields.c @@ -7,7 +7,7 @@ #include #define LTTNG_UST_TRACEPOINT_DEFINE -#include "ust_tests_ctf_types.h" +#include "ust_tests_ust_fields.h" int main(int argc, char **argv) { @@ -23,12 +23,12 @@ int main(int argc, char **argv) fprintf(stderr, "Tracing... "); for (i = 0; i < 100; i++) { - lttng_ust_tracepoint(ust_tests_ctf_types, tptest, i, i % 6, + lttng_ust_tracepoint(ust_tests_ust_fields, tptest, i, i % 6, i % 21); } for (i = 0; i < 10; i++) { - lttng_ust_tracepoint(ust_tests_ctf_types, tptest_bis, i, i % 6); + lttng_ust_tracepoint(ust_tests_ust_fields, tptest_bis, i, i % 6); } fprintf(stderr, " done.\n"); return 0; diff --git a/tests/compile/ctf-types/ust_tests_ctf_types.h b/tests/compile/api1/ust-fields/ust_tests_ust_fields.h similarity index 60% rename from tests/compile/ctf-types/ust_tests_ctf_types.h rename to tests/compile/api1/ust-fields/ust_tests_ust_fields.h index 489f04a2..302d160d 100644 --- a/tests/compile/ctf-types/ust_tests_ctf_types.h +++ b/tests/compile/api1/ust-fields/ust_tests_ust_fields.h @@ -5,14 +5,14 @@ */ #undef LTTNG_UST_TRACEPOINT_PROVIDER -#define LTTNG_UST_TRACEPOINT_PROVIDER ust_tests_ctf_types +#define LTTNG_UST_TRACEPOINT_PROVIDER ust_tests_ust_fields -#if !defined(_TRACEPOINT_UST_TESTS_CTF_TYPES_H) || defined(LTTNG_UST_TRACEPOINT_HEADER_MULTI_READ) -#define _TRACEPOINT_UST_TESTS_CTF_TYPES_H +#if !defined(_TRACEPOINT_UST_TESTS_UST_FIELDS_H) || defined(LTTNG_UST_TRACEPOINT_HEADER_MULTI_READ) +#define _TRACEPOINT_UST_TESTS_UST_FIELDS_H #include -LTTNG_UST_TRACEPOINT_ENUM(ust_tests_ctf_types, testenum, +LTTNG_UST_TRACEPOINT_ENUM(ust_tests_ust_fields, testenum, LTTNG_UST_TP_ENUM_VALUES( lttng_ust_field_enum_value("even", 0) lttng_ust_field_enum_value("uneven", 1) @@ -21,7 +21,7 @@ LTTNG_UST_TRACEPOINT_ENUM(ust_tests_ctf_types, testenum, ) ) -LTTNG_UST_TRACEPOINT_ENUM(ust_tests_ctf_types, testenum2, +LTTNG_UST_TRACEPOINT_ENUM(ust_tests_ust_fields, testenum2, LTTNG_UST_TP_ENUM_VALUES( lttng_ust_field_enum_value("zero", 0) lttng_ust_field_enum_value("five", 5) @@ -33,14 +33,14 @@ LTTNG_UST_TRACEPOINT_ENUM(ust_tests_ctf_types, testenum2, * Enumeration field is used twice to make sure the type declaration * is entered only once in the metadata file. */ -LTTNG_UST_TRACEPOINT_EVENT(ust_tests_ctf_types, tptest, +LTTNG_UST_TRACEPOINT_EVENT(ust_tests_ust_fields, tptest, LTTNG_UST_TP_ARGS(int, anint, int, enumval, int, enumval2), LTTNG_UST_TP_FIELDS( lttng_ust_field_integer(int, intfield, anint) - lttng_ust_field_enum(ust_tests_ctf_types, testenum, int, enumfield, enumval) - lttng_ust_field_enum(ust_tests_ctf_types, testenum, long long, + lttng_ust_field_enum(ust_tests_ust_fields, testenum, int, enumfield, enumval) + lttng_ust_field_enum(ust_tests_ust_fields, testenum, long long, enumfield_bis, enumval) - lttng_ust_field_enum(ust_tests_ctf_types, testenum2, unsigned int, + lttng_ust_field_enum(ust_tests_ust_fields, testenum2, unsigned int, enumfield_third, enumval2) ) ) @@ -49,19 +49,19 @@ LTTNG_UST_TRACEPOINT_EVENT(ust_tests_ctf_types, tptest, * Another tracepoint using the types to make sure each type is entered * only once in the metadata file. */ -LTTNG_UST_TRACEPOINT_EVENT(ust_tests_ctf_types, tptest_bis, +LTTNG_UST_TRACEPOINT_EVENT(ust_tests_ust_fields, tptest_bis, LTTNG_UST_TP_ARGS(int, anint, int, enumval), LTTNG_UST_TP_FIELDS( lttng_ust_field_integer(int, intfield, anint) - lttng_ust_field_enum(ust_tests_ctf_types, testenum, unsigned char, + lttng_ust_field_enum(ust_tests_ust_fields, testenum, unsigned char, enumfield, enumval) ) ) -#endif /* _TRACEPOINT_UST_TESTS_CTF_TYPES_H */ +#endif /* _TRACEPOINT_UST_TESTS_UST_FIELDS_H */ #undef LTTNG_UST_TRACEPOINT_INCLUDE -#define LTTNG_UST_TRACEPOINT_INCLUDE "./ust_tests_ctf_types.h" +#define LTTNG_UST_TRACEPOINT_INCLUDE "./ust_tests_ust_fields.h" /* This part must be outside ifdef protection */ #include diff --git a/tests/compile/ctf-types/Makefile.am b/tests/compile/ctf-types/Makefile.am deleted file mode 100644 index cb268fe4..00000000 --- a/tests/compile/ctf-types/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-only - -AM_CPPFLAGS += -I$(srcdir) - -noinst_PROGRAMS = ctf-types -ctf_types_SOURCES = ctf-types.c tp.c ust_tests_ctf_types.h -ctf_types_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS) -ctf_types_LDADD = \ - $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ - $(DL_LIBS) - -EXTRA_DIST = README diff --git a/tests/compile/hello-many/Makefile.am b/tests/compile/hello-many/Makefile.am deleted file mode 100644 index 58701fb2..00000000 --- a/tests/compile/hello-many/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-only - -AM_CPPFLAGS += -I$(srcdir) - -noinst_PROGRAMS = hello-many -hello_many_SOURCES = hello-many.c tp.c ust_tests_hello_many.h -hello_many_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS) -hello_many_LDADD = \ - $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ - $(DL_LIBS) - -EXTRA_DIST = README diff --git a/tests/compile/hello.cxx/Makefile.am b/tests/compile/hello.cxx/Makefile.am deleted file mode 100644 index c89c27e7..00000000 --- a/tests/compile/hello.cxx/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-only - -AM_CPPFLAGS += -I$(srcdir) - -noinst_PROGRAMS = hello -hello_SOURCES = hello.cpp tp-cpp.cpp ust_tests_hello.h -hello_LDADD = \ - $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ - $(DL_LIBS) - -EXTRA_DIST = README diff --git a/tests/compile/hello/Makefile.am b/tests/compile/hello/Makefile.am deleted file mode 100644 index e212d922..00000000 --- a/tests/compile/hello/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-only - -AM_CPPFLAGS += -I$(srcdir) - -noinst_PROGRAMS = hello -hello_SOURCES = hello.c tp.c ust_tests_hello.h -hello_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS) -hello_LDADD = \ - $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ - $(DL_LIBS) - -EXTRA_DIST = README diff --git a/tests/compile/same_line_tracepoint/Makefile.am b/tests/compile/same_line_tracepoint/Makefile.am deleted file mode 100644 index 6d3ac3e1..00000000 --- a/tests/compile/same_line_tracepoint/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-only - -AM_CPPFLAGS += -I$(srcdir) - -noinst_PROGRAMS = same_line_tracepoint -same_line_tracepoint_SOURCES = same_line_tracepoint.c ust_tests_sameline.h -same_line_tracepoint_LDADD = \ - $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ - $(DL_LIBS) - -EXTRA_DIST = README diff --git a/tests/compile/test-app-ctx/Makefile.am b/tests/compile/test-app-ctx/Makefile.am deleted file mode 100644 index c8b6281c..00000000 --- a/tests/compile/test-app-ctx/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-only - -AM_CPPFLAGS += -I$(srcdir) - -noinst_PROGRAMS = hello -hello_SOURCES = hello.c tp.c ust_tests_hello.h -hello_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS) -hello_LDADD = \ - $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ - $(DL_LIBS) -- 2.34.1