if process.returncode == 0:
compound_literal_on_heap = True
-expected_events_common = [
- {
- "name": "tp:constructor_c_across_units_before_define",
- "msg": None,
- "count": 0,
- "may_fail": compound_literal_on_heap,
- },
+expected_events_common_cpp = [
{
"name": "tp:constructor_cplusplus",
"msg": "global - across units before define",
"count": 0,
"may_fail": compound_literal_on_heap,
},
- {
- "name": "tp:constructor_c_same_unit_before_define",
- "msg": None,
- "count": 0,
- "may_fail": compound_literal_on_heap,
- },
- {
- "name": "tp:constructor_c_same_unit_after_define",
- "msg": None,
- "count": 0,
- "may_fail": compound_literal_on_heap,
- },
{
"name": "tp:constructor_cplusplus",
"msg": "global - same unit before define",
"count": 0,
"may_fail": compound_literal_on_heap,
},
- {
- "name": "tp:constructor_c_across_units_after_define",
- "msg": None,
- "count": 0,
- "may_fail": compound_literal_on_heap,
- },
{
"name": "tp:constructor_cplusplus",
"msg": "global - across units after define",
"count": 0,
"may_fail": compound_literal_on_heap,
},
- {
- "name": "tp:constructor_c_same_unit_before_provider",
- "msg": None,
- "count": 0,
- "may_fail": compound_literal_on_heap,
- },
- {
- "name": "tp:constructor_c_same_unit_after_provider",
- "msg": None,
- "count": 0,
- "may_fail": compound_literal_on_heap,
- },
{
"name": "tp:constructor_cplusplus",
"msg": "global - same unit before provider",
"msg": "global - same unit after provider",
"count": 0,
},
- {"name": "tp:constructor_c_across_units_after_provider", "msg": None, "count": 0},
{
"name": "tp:constructor_cplusplus",
"msg": "global - across units after provider",
},
{"name": "tp:constructor_cplusplus", "msg": "main() local", "count": 0},
{"name": "tp:destructor_cplusplus", "msg": "main() local", "count": 0},
- {"name": "tp:main", "msg": None, "count": 0},
{
"name": "tp:destructor_cplusplus",
"msg": "global - across units after provider",
"count": 0,
"may_fail": compound_literal_on_heap,
},
+]
+
+expected_events_common = [
+ {
+ "name": "tp:constructor_c_across_units_before_define",
+ "msg": None,
+ "count": 0,
+ "may_fail": compound_literal_on_heap,
+ },
+ {
+ "name": "tp:constructor_c_same_unit_before_define",
+ "msg": None,
+ "count": 0,
+ "may_fail": compound_literal_on_heap,
+ },
+ {
+ "name": "tp:constructor_c_same_unit_after_define",
+ "msg": None,
+ "count": 0,
+ "may_fail": compound_literal_on_heap,
+ },
+ {
+ "name": "tp:constructor_c_across_units_after_define",
+ "msg": None,
+ "count": 0,
+ "may_fail": compound_literal_on_heap,
+ },
+ {
+ "name": "tp:constructor_c_same_unit_before_provider",
+ "msg": None,
+ "count": 0,
+ "may_fail": compound_literal_on_heap,
+ },
+ {
+ "name": "tp:constructor_c_same_unit_after_provider",
+ "msg": None,
+ "count": 0,
+ "may_fail": compound_literal_on_heap,
+ },
+ {"name": "tp:constructor_c_across_units_after_provider", "msg": None, "count": 0},
+ {"name": "tp:main", "msg": None, "count": 0},
{
"name": "tp:destructor_c_across_units_after_provider",
"msg": None,
"may_fail": compound_literal_on_heap,
},
]
-expected_events_tp_so = [
- {"name": "tp_so_c:constructor_c_provider_shared_library", "msg": None, "count": 0},
+
+expected_events_tp_so_cpp = [
{
"name": "tp_so:constructor_cplusplus_provider_shared_library",
"msg": "global - shared library define and provider",
"msg": "global - shared library define and provider",
"count": 0,
},
+]
+
+expected_events_tp_so = [
+ {"name": "tp_so_c:constructor_c_provider_shared_library", "msg": None, "count": 0},
{"name": "tp_so_c:destructor_c_provider_shared_library", "msg": None, "count": 0},
]
-expected_events_tp_a = [
- {"name": "tp_a_c:constructor_c_provider_static_archive", "msg": None, "count": 0},
+
+expected_events_tp_a_cpp = [
{
"name": "tp_a:constructor_cplusplus_provider_static_archive",
"msg": "global - static archive define and provider",
"count": 0,
"may_fail": compound_literal_on_heap,
},
+]
+
+expected_events_tp_a = [
+ {"name": "tp_a_c:constructor_c_provider_static_archive", "msg": None, "count": 0},
{"name": "tp_a_c:destructor_c_provider_static_archive", "msg": None, "count": 0},
]
{
"description": "Test user space constructor/destructor instrumentation coverage (C++ w/ static archive)",
"application": "gen-ust-events-constructor/gen-ust-events-constructor-a",
- "expected_events": copy.deepcopy(expected_events_common + expected_events_tp_a),
+ "expected_events": copy.deepcopy(
+ expected_events_common
+ + expected_events_common_cpp
+ + expected_events_tp_a
+ + expected_events_tp_a_cpp
+ ),
"skip_if_application_not_present": False,
},
{
"description": "Test user space constructor/destructor instrumentation coverage (C++ w/ dynamic object",
"application": "gen-ust-events-constructor/gen-ust-events-constructor-so",
+ "expected_events": copy.deepcopy(
+ expected_events_common
+ + expected_events_common_cpp
+ + expected_events_tp_so
+ + expected_events_tp_so_cpp
+ ),
+ # This application is not be built when `NO_SHARED` is set in the
+ # configuration options.
+ "skip_if_application_not_present": True,
+ },
+ {
+ "description": "Test user space constructor/destructor instrumentation coverage (C w/ static archive)",
+ "application": "gen-ust-events-constructor/gen-ust-events-c-constructor-a",
+ "expected_events": copy.deepcopy(expected_events_common + expected_events_tp_a),
+ "skip_if_application_not_present": False,
+ },
+ {
+ "description": "Test user space constructor/destructor instrumentation coverage (C w/ dynamic object",
+ "application": "gen-ust-events-constructor/gen-ust-events-c-constructor-so",
"expected_events": copy.deepcopy(
expected_events_common + expected_events_tp_so
),
noinst_LTLIBRARIES = libtp-a-provider.la libtp-a-define.la \
libtp-a_c-provider.la libtp-a_c-define.la
noinst_PROGRAMS = gen-ust-events-constructor-a \
+ gen-ust-events-c-constructor-a \
uses_heap
if NO_SHARED
noinst_LTLIBRARIES += libtp-so-provider.la libtp-so-define.la \
libtp-so_c-provider.la libtp-so_c-define.la
-noinst_PROGRAMS += gen-ust-events-constructor-so
+noinst_PROGRAMS += gen-ust-events-constructor-so \
+ gen-ust-events-c-constructor-so
endif
$(top_builddir)/tests/utils/libtestutils.la \
$(DL_LIBS)
+gen_ust_events_c_constructor_so_SOURCES = main_c-so.c \
+ 01-c-tp-before-define.c \
+ 02-c-define-tp.c \
+ 03-c-tp-after-define.c \
+ 04-c-tp-provider.c \
+ 05-c-tp-after-provider.c \
+ tp.h
+gen_ust_events_c_constructor_so_LDADD = $(UST_LIBS) \
+ $(builddir)/libtp-so-define.la \
+ $(builddir)/libtp-so-provider.la \
+ $(builddir)/libtp-so_c-define.la \
+ $(builddir)/libtp-so_c-provider.la \
+ $(top_builddir)/tests/utils/libtestutils.la \
+ $(DL_LIBS)
+
gen_ust_events_constructor_a_SOURCES = main-a.cpp \
01-tp-before-define.cpp \
02-define-tp.cpp \
$(top_builddir)/tests/utils/libtestutils.la \
$(DL_LIBS)
+gen_ust_events_c_constructor_a_SOURCES = main_c-a.c \
+ 01-c-tp-before-define.c \
+ 02-c-define-tp.c \
+ 03-c-tp-after-define.c \
+ 04-c-tp-provider.c \
+ 05-c-tp-after-provider.c \
+ tp.h
+gen_ust_events_c_constructor_a_LDADD = $(UST_LIBS) \
+ $(builddir)/libtp-a_c-define.la \
+ $(builddir)/libtp-a_c-provider.la \
+ $(top_builddir)/tests/utils/libtestutils.la \
+ $(DL_LIBS)
+
uses_heap_SOURCES = uses_heap.cpp
endif