Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
7681-snmp-agent-test-Improve-handling-of-start-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 7681-snmp-agent-test-Improve-handling-of-start-of-snmp-ap.patch of Package erlang
From 1be3d6b57332238b4c46f3c38ffb570b82ce73de Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Mon, 7 Feb 2022 14:09:30 +0100 Subject: [PATCH 1/2] [snmp|agent|test] Improve "handling" of start of snmp app supervisor --- lib/snmp/test/snmp_agent_test_lib.erl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/snmp/test/snmp_agent_test_lib.erl b/lib/snmp/test/snmp_agent_test_lib.erl index aa8c7c65ca..199296593f 100644 --- a/lib/snmp/test/snmp_agent_test_lib.erl +++ b/lib/snmp/test/snmp_agent_test_lib.erl @@ -701,7 +701,7 @@ start_agent(Config, Vsns, Opts) -> process_flag(trap_exit,true), ?IPRINT("start_agent -> try start snmp app supervisor", []), - {ok, AppSup} = snmp_app_sup:start_link(), + AppSup = start_app_sup(), unlink(AppSup), ?DBG("start_agent -> snmp app supervisor: ~p", [AppSup]), @@ -953,6 +953,18 @@ stop_agent(Config) when is_list(Config) -> ?IPRINT("stop_agent -> done", []), Config4. +start_app_sup() -> + case snmp_app_sup:start_link() of + {ok, AppSup} -> + AppSup; + {error, {already_started, Pid}} -> + ?EPRINT("start_agent -> " + "SNMP app supervisor already started: " + "~n (existing) Pid: ~p" + "~n (existing) Process Info: ~p", + [Pid, (catch process_info(Pid))]), + ?FAIL({already_started, snmp_app_supervisor}) + end. start_sup(Env) -> case (catch snmp_app_sup:start_agent(normal, Env)) of -- 2.34.1
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