Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
7682-snmp-agent-test-Skip-replaced-by-fail-for-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 7682-snmp-agent-test-Skip-replaced-by-fail-for-table-crea.patch of Package erlang
From 957c2cb08e8a0ea63fee7267aa2027e5275adf40 Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Mon, 7 Feb 2022 14:17:09 +0100 Subject: [PATCH 2/2] [snmp|agent|test] Skip replaced by fail for table creation failure When creating mnesia tables we previously skip'ed (actually the skip was a new thing, it used to be fail), but this has now been replaced (again) with a fail. The problem was that the skip hid major issues (since almost the entire suite was skip'ed). --- lib/snmp/test/snmp_agent_SUITE.erl | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/snmp/test/snmp_agent_SUITE.erl b/lib/snmp/test/snmp_agent_SUITE.erl index 3db90e4be5..bf942715cd 100644 --- a/lib/snmp/test/snmp_agent_SUITE.erl +++ b/lib/snmp/test/snmp_agent_SUITE.erl @@ -1334,7 +1334,7 @@ create_tables(SaNode) -> %% {ram_copies, [SaNode]}, %% {snmp, [{key, integer}]}, %% {attributes, [a1,a2,a3]}]), - mnesia_create_table_or_skip([{name, friendsTable2}, + mnesia_create_table_or_fail([{name, friendsTable2}, {ram_copies, [SaNode]}, {snmp, [{key, integer}]}, {attributes, [a1,a2,a3]}]), @@ -1342,23 +1342,31 @@ create_tables(SaNode) -> %% {ram_copies, [SaNode]}, %% {snmp, [{key, integer}]}, %% {attributes, [a1,a2,a3]}]), - mnesia_create_table_or_skip([{name, kompissTable2}, + mnesia_create_table_or_fail([{name, kompissTable2}, {ram_copies, [SaNode]}, {snmp, [{key, integer}]}, {attributes, [a1,a2,a3]}]), %% ?line {atomic, ok} = mnesia:create_table([{name, snmp_variables}, %% {attributes, [a1,a2]}]), - mnesia_create_table_or_skip([{name, snmp_variables}, + mnesia_create_table_or_fail([{name, snmp_variables}, {attributes, [a1,a2]}]), ok. -mnesia_create_table_or_skip(Args) -> +mnesia_create_table_or_fail(Args) -> + ?IPRINT("mnesia_create_table_or_fail -> " + "try create table ~p", [proplists:get_value(name, Args)]), case mnesia:create_table(Args) of {atomic, ok} -> ok; {aborted, {already_exists, Table}} -> - ?SKIP({table_already_exist, Table}); + ?EPRINT("mnesia_create_table_or_fail -> " + "table ~p already exists", [Table]), + %% ?SKIP({table_already_exist, Table}); + ?FAIL({table_already_exist, Table}); {aborted, Error} -> + ?EPRINT("mnesia_create_table_or_fail -> " + "failed creating table: " + "~n ~p", [Error]), ?FAIL({failed_create_table, Error}) end. -- 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