diff options
author | Lukas Larsson <[email protected]> | 2019-03-18 15:06:42 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2019-03-25 16:34:11 +0100 |
commit | 5f495e6b91bcc3e09ee343a2e9b4e1f7de11fa7a (patch) | |
tree | ce464f8ae2346b986fea00c67dca2ce5691b9693 /erts/emulator/test/erts_test_utils.erl | |
parent | 3379747ece9a9d87ddb29dff5bf2a9b6e9b1cd9d (diff) | |
download | otp-5f495e6b91bcc3e09ee343a2e9b4e1f7de11fa7a.tar.gz otp-5f495e6b91bcc3e09ee343a2e9b4e1f7de11fa7a.tar.bz2 otp-5f495e6b91bcc3e09ee343a2e9b4e1f7de11fa7a.zip |
Revert "erts: Always run fds check after each testcase"
This reverts commit 1eb0a2c47edd036731ee1e4e4f7b5bdfc7d576fa.
Diffstat (limited to 'erts/emulator/test/erts_test_utils.erl')
-rw-r--r-- | erts/emulator/test/erts_test_utils.erl | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/erts/emulator/test/erts_test_utils.erl b/erts/emulator/test/erts_test_utils.erl index 83bd3dadca..e4e00a0a16 100644 --- a/erts/emulator/test/erts_test_utils.erl +++ b/erts/emulator/test/erts_test_utils.erl @@ -31,83 +31,6 @@ available_internal_state/1, check_node_dist/0, check_node_dist/1, check_node_dist/3]). -%% Suite Callbacks --export([id/1]). --export([init/2]). - --export([pre_init_per_testcase/3]). --export([post_end_per_testcase/4]). - --include_lib("kernel/include/file.hrl"). - --type config() :: proplists:proplist(). --type reason() :: term(). --type skip_or_fail() :: {skip, reason()} | - {auto_skip, reason()} | - {fail, reason()}. - --record(state, { ts_conf_dir, target_system, install_opts, nodenames, nodes }). - -%% The id of this SCB --spec id(Opts :: term()) -> - Id :: term(). -id(_Opts) -> - ?MODULE. - -%% Always called before any other callback function. --spec init(Id :: term(), Opts :: proplists:proplist()) -> - {ok, State :: #state{}}. -init(_Id, Opts) -> - {ok, []}. - -%% Called before each test case. --spec pre_init_per_testcase(TC :: atom(), - Config :: config(), - State :: #state{}) -> - {config() | skip_or_fail(), NewState :: #state{}}. -pre_init_per_testcase(_TC,Config,State) -> - Before = available_internal_state(true), - CIOD = erts_debug:get_internal_state(check_io_debug), - available_internal_state(Before), - CIO = driver_SUITE:get_stable_check_io_info(), - 0 = element(1, CIOD), - ct:log("~s~n~n~s",[os:cmd("ls -la /proc/"++ os:getpid() ++"/fd/*"), - os:cmd("cat /proc/"++ os:getpid() ++"/fdinfo/*")]), - {Config, {CIO, CIOD}}. - --spec post_end_per_testcase(TC :: atom(), - Config :: config(), - Return :: term(), - State :: #state{}) -> - {ok | skip_or_fail(), NewState :: #state{}}. -post_end_per_testcase(_TC,_Config,Return,St) -> - {links, Links} = erlang:process_info(self(), links), - ToKill = [Pid || Pid <- Links, - try - is_port(Pid) orelse - begin - {_, Dict} = erlang:process_info(Pid,dictionary), - proplists:get_value(ct_process_type,Dict) /= system - end - catch _:_ -> - false - end], - ct:pal("Links To Kill: ~p", [ToKill]), - [ catch unlink(Pid) || Pid <- ToKill], - [ catch exit(Pid, die) || Pid <- ToKill], - timer:sleep(2000), - Before = available_internal_state(true), - AfterCIOD = erts_debug:get_internal_state(check_io_debug), - available_internal_state(Before), - AfterCIO = driver_SUITE:get_stable_check_io_info(), - case St of - {CIO, CIOD} -> - driver_SUITE:verify_chkio_state(CIO, AfterCIO), - 0 = element(1, CIOD); - _ -> - ok - end, - {Return, []}. -define(VERSION_MAGIC, 131). |