Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:25
erlang
2891-ct-ssl-trace-profile-for-CT.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2891-ct-ssl-trace-profile-for-CT.patch of Package erlang
From 84eb8b45c16b81ce6ac08b09e4b29346328860ce Mon Sep 17 00:00:00 2001 From: Jakub Witczak <kuba@erlang.org> Date: Thu, 15 Jun 2023 17:31:13 +0200 Subject: [PATCH 4/4] ct,ssl: trace profile for CT --- lib/common_test/test/ct_test_support.erl | 13 ++++++++ lib/ssl/src/ssl_trace.erl | 41 +++++++++++++++++++++++- lib/ssl/test/ssl_trace_SUITE.erl | 6 ++-- 3 files changed, 57 insertions(+), 3 deletions(-) diff --git a/lib/common_test/test/ct_test_support.erl b/lib/common_test/test/ct_test_support.erl index 4dcb1863ce..b9b5ef7846 100644 --- a/lib/common_test/test/ct_test_support.erl +++ b/lib/common_test/test/ct_test_support.erl @@ -46,6 +46,8 @@ -export([unique_timestamp/0]). -export([rm_dir/1]). +%% Tracing +-export([handle_trace/3]). -include_lib("kernel/include/file.hrl"). @@ -1469,3 +1471,14 @@ slave_stop(Node) -> receive {nodedown, Node} -> ok after 0 -> ok end %flush end, ok. + +%%%################################################################ +%%%# +%%%# Tracing +%%%# +handle_trace(ct, + {return_from, {?MODULE, start_slave, 3}, Return}, + Stack) -> + {io_lib:format("CT Node = ~p", + [proplists:get_value(ct_node, Return, not_found)]), Stack}. + diff --git a/lib/ssl/src/ssl_trace.erl b/lib/ssl/src/ssl_trace.erl index c8ac32712e..14f6ad3acb 100644 --- a/lib/ssl/src/ssl_trace.erl +++ b/lib/ssl/src/ssl_trace.erl @@ -509,4 +509,43 @@ trace_profiles() -> {dtls_gen_connection, [{handle_info,3}]}, {ssl_gen_statem, - [{hibernate_after, 3}, {handle_common_event, 4}]}]}]. + [{hibernate_after, 3}, {handle_common_event, 4}]}]}, + {ct, %% common_test + fun(M, F, A) -> dbg:tpl(M, F, A, x) end, + fun(M, F, A) -> dbg:ctpl(M, F, A) end, + [ + %% {ct_test_support, %% module from test and not src folder, enable it manually if needed + %% [{run_ct_run_test, 2}, + %% {run_ct_script_start, 2}, + %% {run, 2}, + %% {init_per_suite, 2}, + %% {start_slave, 3}]}, + {test_server, [ + {ts_tc, 3}, + {user_callback, 5}, + {fw_error_notify, 4}, + {get_loc, 1}, + {set_tc_state, 1}, + {init_per_testcase, 3}, + {run_test_case_msgloop, 1}, + {run_test_case_eval1, 6}, + {do_init_tc_call, 4}, + {process_return_val, 6}, + {do_end_tc_call, 4}, + {end_per_testcase, 3}, + {call_end_conf, 7}, + {do_call_end_conf, 7}, + {call_end_conf, 7}, + {handle_tc_exit, 2}, + {capture_start, 0}, + {capture_stop, 0}, + {capture_get, 0}, + {fail, 0}, + {fail, 1}, + {timetrap, 4}, + {start_node, 3}, + {comment, 1} + ]} + %% ,{ct_util, [{mark_process, 0}]} + ] + }]. diff --git a/lib/ssl/test/ssl_trace_SUITE.erl b/lib/ssl/test/ssl_trace_SUITE.erl index c33b29e90c..8fbc0b8efb 100644 --- a/lib/ssl/test/ssl_trace_SUITE.erl +++ b/lib/ssl/test/ssl_trace_SUITE.erl @@ -58,7 +58,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}, {timetrap,{seconds,60}}]. all() -> [tc_basic, tc_no_trace, tc_api_profile, tc_rle_profile, - tc_budget_option, tc_write, tc_file_option, tc_check_profiles]. + tc_budget_option, tc_write, tc_file_option, tc_check_profiles]. init_per_suite(Config) -> catch crypto:stop(), @@ -110,7 +110,9 @@ tc_basic(_Config) -> ok = ssl_trace:stop(), undefined = whereis(ssl_trace), - {ok, [api, crt, csp, hbn, kdt, rle, ssn]} = ssl_trace:start(), + {ok, EnabledProfiles} = ssl_trace:start(), + [true = lists:member(ExpectedProfile, EnabledProfiles) || + ExpectedProfile <- [api, crt, csp, hbn, kdt, rle, ssn]], {ok, [api]} = ssl_trace:on(api), {ok, []} = ssl_trace:off(api), ok = ssl_trace:stop(), -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor