X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Fregression%2Fust%2Fust-constructor%2Ftest_ust_constructor.py;fp=tests%2Fregression%2Fust%2Fust-constructor%2Ftest_ust_constructor.py;h=130d0657da35a988148142d8a7071601629b26aa;hp=5446fb3ec08ef1636c39cdd371e064fc13abbc3f;hb=21b65d7fb06219571f42159b3667454c3104a8b7;hpb=09a872ef0b4e1432329aa42fecc61f50e9baa367 diff --git a/tests/regression/ust/ust-constructor/test_ust_constructor.py b/tests/regression/ust/ust-constructor/test_ust_constructor.py index 5446fb3ec..130d0657d 100755 --- a/tests/regression/ust/ust-constructor/test_ust_constructor.py +++ b/tests/regression/ust/ust-constructor/test_ust_constructor.py @@ -47,31 +47,13 @@ process.wait() 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", @@ -84,30 +66,12 @@ expected_events_common = [ "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", @@ -119,7 +83,6 @@ expected_events_common = [ "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", @@ -127,7 +90,6 @@ expected_events_common = [ }, {"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", @@ -168,6 +130,47 @@ expected_events_common = [ "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, @@ -211,8 +214,8 @@ expected_events_common = [ "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", @@ -233,10 +236,14 @@ expected_events_tp_so = [ "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", @@ -259,6 +266,10 @@ expected_events_tp_a = [ "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}, ] @@ -364,12 +375,36 @@ tests = [ { "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 ),