diff --git a/src/tests/ftest/cart/corpc/cart_corpc_five_node.py b/src/tests/ftest/cart/corpc/cart_corpc_five_node.py index cda64c1310a..4e991e801e1 100755 --- a/src/tests/ftest/cart/corpc/cart_corpc_five_node.py +++ b/src/tests/ftest/cart/corpc/cart_corpc_five_node.py @@ -26,7 +26,6 @@ class CartCoRpcFiveNodeTest(TestWithoutServers): def setUp(self): """ Test setup """ print("Running setup\n") - super(CartCoRpcFiveNodeTest, self).setUp() self.utils = CartUtils() self.env = self.utils.get_env(self) diff --git a/src/tests/ftest/cart/corpc/cart_corpc_five_node.yaml b/src/tests/ftest/cart/corpc/cart_corpc_five_node.yaml index f4f344a3821..6f72abc5163 100644 --- a/src/tests/ftest/cart/corpc/cart_corpc_five_node.yaml +++ b/src/tests/ftest/cart/corpc/cart_corpc_five_node.yaml @@ -1,14 +1,13 @@ # change host names to your reserved nodes, the # required quantity is indicated by the placeholders -ENV: - default: - #!filter-only : /run/envs_CRT_CTX_SHARE_ADDR/no_sep - #!filter-only : /run/tests/corpc_prefwd - - D_LOG_MASK: "WARN,CORPC=DEBUG" - - CRT_PHY_ADDR_STR: "ofi+sockets" - - OFI_INTERFACE: "eth0" - - test_servers_CRT_CTX_NUM: "0" +defaultENV: + #!filter-only : /run/envs_CRT_CTX_SHARE_ADDR/no_sep + #!filter-only : /run/tests/corpc_prefwd + D_LOG_MASK: "WARN,CORPC=DEBUG" + CRT_PHY_ADDR_STR: "ofi+sockets" + OFI_INTERFACE: "eth0" + test_servers_CRT_CTX_NUM: "0" env_CRT_CTX_SHARE_ADDR: !mux no_sep: env: no_sep diff --git a/src/tests/ftest/cart/corpc/cart_corpc_one_node.py b/src/tests/ftest/cart/corpc/cart_corpc_one_node.py index fe3217f30d4..1b2c369c988 100755 --- a/src/tests/ftest/cart/corpc/cart_corpc_one_node.py +++ b/src/tests/ftest/cart/corpc/cart_corpc_one_node.py @@ -26,7 +26,6 @@ class CartCoRpcOneNodeTest(TestWithoutServers): def setUp(self): """ Test setup """ print("Running setup\n") - super(CartCoRpcOneNodeTest, self).setUp() self.utils = CartUtils() self.env = self.utils.get_env(self) diff --git a/src/tests/ftest/cart/corpc/cart_corpc_one_node.yaml b/src/tests/ftest/cart/corpc/cart_corpc_one_node.yaml index 9221a5a6a3e..34e38357db6 100644 --- a/src/tests/ftest/cart/corpc/cart_corpc_one_node.yaml +++ b/src/tests/ftest/cart/corpc/cart_corpc_one_node.yaml @@ -1,14 +1,13 @@ # change host names to your reserved nodes, the # required quantity is indicated by the placeholders -ENV: - default: - #!filter-only : /run/envs_CRT_CTX_SHARE_ADDR/sep - #!filter-only : /run/tests/corpc_prefwd - - D_LOG_MASK: "WARN,CORPC=DEBUG" - - CRT_PHY_ADDR_STR: "ofi+sockets" - - OFI_INTERFACE: "eth0" - - test_servers_CRT_CTX_NUM: "16" +defaultENV: + #!filter-only : /run/envs_CRT_CTX_SHARE_ADDR/sep + #!filter-only : /run/tests/corpc_prefwd + D_LOG_MASK: "WARN,CORPC=DEBUG" + CRT_PHY_ADDR_STR: "ofi+sockets" + OFI_INTERFACE: "eth0" + test_servers_CRT_CTX_NUM: "16" env_CRT_CTX_SHARE_ADDR: !mux sep: env: sep diff --git a/src/tests/ftest/cart/corpc/cart_corpc_two_node.py b/src/tests/ftest/cart/corpc/cart_corpc_two_node.py index ce207851681..72625daf98b 100755 --- a/src/tests/ftest/cart/corpc/cart_corpc_two_node.py +++ b/src/tests/ftest/cart/corpc/cart_corpc_two_node.py @@ -26,7 +26,6 @@ class CartCoRpcTwoNodeTest(TestWithoutServers): def setUp(self): """ Test setup """ print("Running setup\n") - super(CartCoRpcTwoNodeTest, self).setUp() self.utils = CartUtils() self.env = self.utils.get_env(self) diff --git a/src/tests/ftest/cart/corpc/cart_corpc_two_node.yaml b/src/tests/ftest/cart/corpc/cart_corpc_two_node.yaml index c9731c1ff7d..ab2c16f2284 100644 --- a/src/tests/ftest/cart/corpc/cart_corpc_two_node.yaml +++ b/src/tests/ftest/cart/corpc/cart_corpc_two_node.yaml @@ -1,14 +1,13 @@ # change host names to your reserved nodes, the # required quantity is indicated by the placeholders -ENV: - default: - #!filter-only : /run/envs_CRT_CTX_SHARE_ADDR/sep - #!filter-only : /run/tests/corpc_prefwd - - D_LOG_MASK: "WARN,CORPC=DEBUG" - - CRT_PHY_ADDR_STR: "ofi+sockets" - - OFI_INTERFACE: "eth0" - - test_servers_CRT_CTX_NUM: "16" +defaultENV: + #!filter-only : /run/envs_CRT_CTX_SHARE_ADDR/sep + #!filter-only : /run/tests/corpc_prefwd + D_LOG_MASK: "WARN,CORPC=DEBUG" + CRT_PHY_ADDR_STR: "ofi+sockets" + OFI_INTERFACE: "eth0" + test_servers_CRT_CTX_NUM: "16" env_CRT_CTX_SHARE_ADDR: !mux sep: env: sep diff --git a/src/tests/ftest/cart/ctl/cart_ctl_five_node.py b/src/tests/ftest/cart/ctl/cart_ctl_five_node.py index 2f17512f66a..bf808f0b6d8 100755 --- a/src/tests/ftest/cart/ctl/cart_ctl_five_node.py +++ b/src/tests/ftest/cart/ctl/cart_ctl_five_node.py @@ -26,7 +26,6 @@ class CartCtlFiveNodeTest(TestWithoutServers): def setUp(self): """ Test setup """ print("Running setup\n") - super(CartCtlFiveNodeTest, self).setUp() self.utils = CartUtils() self.env = self.utils.get_env(self) diff --git a/src/tests/ftest/cart/ctl/cart_ctl_five_node.yaml b/src/tests/ftest/cart/ctl/cart_ctl_five_node.yaml index d85d5572e4a..84efe70b1ab 100644 --- a/src/tests/ftest/cart/ctl/cart_ctl_five_node.yaml +++ b/src/tests/ftest/cart/ctl/cart_ctl_five_node.yaml @@ -1,15 +1,14 @@ # change host names to your reserved nodes, the # required quantity is indicated by the placeholders -ENV: - default: - #!filter-only : /run/env_CRT_CTX_SHARE_ADDR/sep - #!filter-only : /run/tests/ctl - - D_LOG_MASK: "WARN" - - CRT_PHY_ADDR_STR: "ofi+sockets" - - OFI_INTERFACE: "eth0" - - test_servers_CRT_CTX_NUM: "0" - - test_clients_CRT_CTX_NUM: "0" +defaultENV: + #!filter-only : /run/env_CRT_CTX_SHARE_ADDR/sep + #!filter-only : /run/tests/ctl + D_LOG_MASK: "WARN" + CRT_PHY_ADDR_STR: "ofi+sockets" + OFI_INTERFACE: "eth0" + test_servers_CRT_CTX_NUM: "0" + test_clients_CRT_CTX_NUM: "0" env_CRT_CTX_SHARE_ADDR: !mux no_sep: env: no_sep diff --git a/src/tests/ftest/cart/ctl/cart_ctl_one_node.py b/src/tests/ftest/cart/ctl/cart_ctl_one_node.py index 0370581dfbb..d5325b5885f 100755 --- a/src/tests/ftest/cart/ctl/cart_ctl_one_node.py +++ b/src/tests/ftest/cart/ctl/cart_ctl_one_node.py @@ -26,7 +26,6 @@ class CartCtlOneNodeTest(TestWithoutServers): def setUp(self): """ Test setup """ print("Running setup\n") - super(CartCtlOneNodeTest, self).setUp() self.utils = CartUtils() self.env = self.utils.get_env(self) diff --git a/src/tests/ftest/cart/ctl/cart_ctl_one_node.yaml b/src/tests/ftest/cart/ctl/cart_ctl_one_node.yaml index 1f6c5ab148e..dd2635028ad 100644 --- a/src/tests/ftest/cart/ctl/cart_ctl_one_node.yaml +++ b/src/tests/ftest/cart/ctl/cart_ctl_one_node.yaml @@ -1,15 +1,14 @@ # change host names to your reserved nodes, the # required quantity is indicated by the placeholders -ENV: - default: - #!filter-only : /run/env_CRT_CTX_SHARE_ADDR/sep - #!filter-only : /run/tests/ctl - - D_LOG_MASK: "WARN" - - CRT_PHY_ADDR_STR: "ofi+sockets" - - OFI_INTERFACE: "eth0" - - test_servers_CRT_CTX_NUM: "16" - - test_clients_CRT_CTX_NUM: "16" +defaultENV: + #!filter-only : /run/env_CRT_CTX_SHARE_ADDR/sep + #!filter-only : /run/tests/ctl + D_LOG_MASK: "WARN" + CRT_PHY_ADDR_STR: "ofi+sockets" + OFI_INTERFACE: "eth0" + test_servers_CRT_CTX_NUM: "16" + test_clients_CRT_CTX_NUM: "16" env_CRT_CTX_SHARE_ADDR: !mux sep: env: sep diff --git a/src/tests/ftest/cart/ghost_rank_rpc/cart_ghost_rank_prc_one_node.py b/src/tests/ftest/cart/ghost_rank_rpc/cart_ghost_rank_prc_one_node.py index 51b7a21a81c..9dec1a7c670 100755 --- a/src/tests/ftest/cart/ghost_rank_rpc/cart_ghost_rank_prc_one_node.py +++ b/src/tests/ftest/cart/ghost_rank_rpc/cart_ghost_rank_prc_one_node.py @@ -26,7 +26,6 @@ class CartCoRpcOneNodeTest(TestWithoutServers): def setUp(self): """ Test setup """ print("Running setup\n") - super(CartCoRpcOneNodeTest, self).setUp() self.utils = CartUtils() self.env = self.utils.get_env(self) diff --git a/src/tests/ftest/cart/ghost_rank_rpc/cart_ghost_rank_prc_one_node.yaml b/src/tests/ftest/cart/ghost_rank_rpc/cart_ghost_rank_prc_one_node.yaml index a41ca0bbe87..764103432dd 100644 --- a/src/tests/ftest/cart/ghost_rank_rpc/cart_ghost_rank_prc_one_node.yaml +++ b/src/tests/ftest/cart/ghost_rank_rpc/cart_ghost_rank_prc_one_node.yaml @@ -1,14 +1,13 @@ # change host names to your reserved nodes, the # required quantity is indicated by the placeholders -ENV: - default: - #!filter-only : /run/envs_CRT_CTX_SHARE_ADDR/sep - #!filter-only : /run/tests/corpc_prefwd - - D_LOG_MASK: "WARN,RPC=DEBUG,HG=DEBUG" - - CRT_PHY_ADDR_STR: "ofi+sockets" - - OFI_INTERFACE: "eth0" - - test_servers_CRT_CTX_NUM: "16" +defaultENV: + #!filter-only : /run/envs_CRT_CTX_SHARE_ADDR/sep + #!filter-only : /run/tests/corpc_prefwd + D_LOG_MASK: "WARN,RPC=DEBUG,HG=DEBUG" + CRT_PHY_ADDR_STR: "ofi+sockets" + OFI_INTERFACE: "eth0" + test_servers_CRT_CTX_NUM: "16" env_CRT_CTX_SHARE_ADDR: !mux sep: env: sep diff --git a/src/tests/ftest/cart/group_test/group_test.py b/src/tests/ftest/cart/group_test/group_test.py index d8c069989c8..dd80fcf1614 100755 --- a/src/tests/ftest/cart/group_test/group_test.py +++ b/src/tests/ftest/cart/group_test/group_test.py @@ -26,7 +26,6 @@ class GroupTest(TestWithoutServers): def setUp(self): """ Test setup """ print("Running setup\n") - super(GroupTest, self).setUp() self.utils = CartUtils() self.env = self.utils.get_env(self) diff --git a/src/tests/ftest/cart/group_test/group_test.yaml b/src/tests/ftest/cart/group_test/group_test.yaml index f7432d3ab56..b1494cc0abf 100644 --- a/src/tests/ftest/cart/group_test/group_test.yaml +++ b/src/tests/ftest/cart/group_test/group_test.yaml @@ -1,12 +1,11 @@ # change host names to your reserved nodes, the # required quantity is indicated by the placeholders -ENV: - default: - #!filter-only : /run/tests/no_pmix_launcher - - D_LOG_MASK: "WARN,RPC=DEBUG,HG=DEBUG" - - CRT_PHY_ADDR_STR: "ofi+sockets" - - OFI_INTERFACE: "eth0" +defaultENV: + #!filter-only : /run/tests/no_pmix_launcher + D_LOG_MASK: "WARN,RPC=DEBUG,HG=DEBUG" + CRT_PHY_ADDR_STR: "ofi+sockets" + OFI_INTERFACE: "eth0" hosts: !mux hosts_1: config: one_node diff --git a/src/tests/ftest/cart/iv/cart_iv_one_node.py b/src/tests/ftest/cart/iv/cart_iv_one_node.py index f04b0c8d0e0..6f9e7ab93ae 100755 --- a/src/tests/ftest/cart/iv/cart_iv_one_node.py +++ b/src/tests/ftest/cart/iv/cart_iv_one_node.py @@ -89,7 +89,6 @@ class CartIvOneNodeTest(TestWithoutServers): def setUp(self): """ Test setup """ print("Running setup\n") - super(CartIvOneNodeTest, self).setUp() self.utils = CartUtils() self.env = self.utils.get_env(self) diff --git a/src/tests/ftest/cart/iv/cart_iv_one_node.yaml b/src/tests/ftest/cart/iv/cart_iv_one_node.yaml index f940f667325..b12ea20236e 100644 --- a/src/tests/ftest/cart/iv/cart_iv_one_node.yaml +++ b/src/tests/ftest/cart/iv/cart_iv_one_node.yaml @@ -1,15 +1,14 @@ # change host names to your reserved nodes, the # required quantity is indicated by the placeholders -ENV: - default: - #!filter-only : /run/env_CRT_CTX_SHARE_ADDR/no_sep - #!filter-only : /run/tests/iv - - D_LOG_MASK: "WARN,IV=DEBUG" - - CRT_PHY_ADDR_STR: "ofi+sockets" - - OFI_INTERFACE: "eth0" - - test_servers_CRT_CTX_NUM: "2" - - test_clients_CRT_CTX_NUM: "2" +defaultENV: + #!filter-only : /run/env_CRT_CTX_SHARE_ADDR/no_sep + #!filter-only : /run/tests/iv + D_LOG_MASK: "WARN,IV=DEBUG" + CRT_PHY_ADDR_STR: "ofi+sockets" + OFI_INTERFACE: "eth0" + test_servers_CRT_CTX_NUM: "2" + test_clients_CRT_CTX_NUM: "2" env_CRT_CTX_SHARE_ADDR: !mux sep: env: sep diff --git a/src/tests/ftest/cart/iv/cart_iv_two_node.py b/src/tests/ftest/cart/iv/cart_iv_two_node.py index ac106efa38a..33ee832d6f4 100755 --- a/src/tests/ftest/cart/iv/cart_iv_two_node.py +++ b/src/tests/ftest/cart/iv/cart_iv_two_node.py @@ -82,7 +82,6 @@ class CartIvTwoNodeTest(TestWithoutServers): def setUp(self): """ Test setup """ print("Running setup\n") - super(CartIvTwoNodeTest, self).setUp() self.utils = CartUtils() self.env = self.utils.get_env(self) diff --git a/src/tests/ftest/cart/iv/cart_iv_two_node.yaml b/src/tests/ftest/cart/iv/cart_iv_two_node.yaml index 7b6d4308295..175bf950543 100644 --- a/src/tests/ftest/cart/iv/cart_iv_two_node.yaml +++ b/src/tests/ftest/cart/iv/cart_iv_two_node.yaml @@ -1,15 +1,14 @@ # change host names to your reserved nodes, the # required quantity is indicated by the placeholders -ENV: - default: - #!filter-only : /run/env_CRT_CTX_SHARE_ADDR/no_sep - #!filter-only : /run/tests/iv - - D_LOG_MASK: "WARN,IV=DEBUG" - - CRT_PHY_ADDR_STR: "ofi+sockets" - - OFI_INTERFACE: "eth0" - - test_servers_CRT_CTX_NUM: "2" - - test_clients_CRT_CTX_NUM: "2" +defaultENV: + #!filter-only : /run/env_CRT_CTX_SHARE_ADDR/no_sep + #!filter-only : /run/tests/iv + D_LOG_MASK: "WARN,IV=DEBUG" + CRT_PHY_ADDR_STR: "ofi+sockets" + OFI_INTERFACE: "eth0" + test_servers_CRT_CTX_NUM: "2" + test_clients_CRT_CTX_NUM: "2" env_CRT_CTX_SHARE_ADDR: !mux sep: env: sep diff --git a/src/tests/ftest/cart/no_pmix/cart_nopmix_multictx_one_node.py b/src/tests/ftest/cart/no_pmix/cart_nopmix_multictx_one_node.py index 00c835be8bd..d40398fcb9d 100755 --- a/src/tests/ftest/cart/no_pmix/cart_nopmix_multictx_one_node.py +++ b/src/tests/ftest/cart/no_pmix/cart_nopmix_multictx_one_node.py @@ -9,9 +9,8 @@ import sys import subprocess -import os -from apricot import TestWithoutServers +from apricot import TestWithoutServers sys.path.append('./util') @@ -28,8 +27,17 @@ class CartNoPmixOneNodeTest(TestWithoutServers): def setUp(self): """ Test setup """ print("Running setup\n") - super(CartNoPmixOneNodeTest, self).setUp() self.utils = CartUtils() + self.env = self.utils.get_env(self) + crt_phy_addr = self.params.get("CRT_PHY_ADDR_STR", '/run/defaultENV/') + ofi_interface = self.params.get("OFI_INTERFACE", '/run/defaultENV/') + ofi_ctx_num = self.params.get("CRT_CTX_NUM", '/run/defaultENV/') + ofi_share_addr = self.params.get("CRT_CTX_SHARE_ADDR", + '/run/defaultENV/') + self.pass_env = {"CRT_PHY_ADDR_STR": crt_phy_addr, + "OFI_INTERFACE": ofi_interface, + "CRT_CTX_SHARE_ADDR": ofi_share_addr, + "CRT_CTX_NUM": ofi_ctx_num} def tearDown(self): """ Tear down """ @@ -44,31 +52,11 @@ def test_cart_no_pmix(self): :avocado: tags=all,cart,pr,daily_regression,no_pmix,one_node """ - crt_phy_addr = os.environ.get("CRT_PHY_ADDR_STR") - ofi_interface = os.environ.get("OFI_INTERFACE") - ofi_ctx_num = os.environ.get("CRT_CTX_NUM") - ofi_share_addr = os.environ.get("CRT_CTX_SHARE_ADDR") - - # env dict keys and values must all be of string type - if not isinstance(crt_phy_addr, ("".__class__, u"".__class__)): - crt_phy_addr = "" - if not isinstance(ofi_interface, ("".__class__, u"".__class__)): - ofi_interface = "" - if not isinstance(ofi_ctx_num, ("".__class__, u"".__class__)): - ofi_ctx_num = "" - if not isinstance(ofi_share_addr, ("".__class__, u"".__class__)): - ofi_share_addr = "" - - pass_env = {"CRT_PHY_ADDR_STR": crt_phy_addr, - "OFI_INTERFACE": ofi_interface, - "CRT_CTX_SHARE_ADDR": ofi_share_addr, - "CRT_CTX_NUM": ofi_ctx_num} - cmd = self.params.get("tst_bin", '/run/tests/*/') self.utils.print("\nTest cmd : %s\n" % cmd) - test_env = pass_env + test_env = self.pass_env p = subprocess.Popen([cmd], env=test_env, stdout=subprocess.PIPE) rc = self.utils.wait_process(p, 30) @@ -78,3 +66,7 @@ def test_cart_no_pmix(self): self.fail("Test failed.\n") self.utils.print("Finished waiting for {}".format(p)) + + +if __name__ == "__main__": + main() diff --git a/src/tests/ftest/cart/no_pmix/cart_nopmix_multictx_one_node.yaml b/src/tests/ftest/cart/no_pmix/cart_nopmix_multictx_one_node.yaml index d02602bb4f3..06c51b901e1 100644 --- a/src/tests/ftest/cart/no_pmix/cart_nopmix_multictx_one_node.yaml +++ b/src/tests/ftest/cart/no_pmix/cart_nopmix_multictx_one_node.yaml @@ -1,15 +1,13 @@ # change host names to your reserved nodes, the # required quantity is indicated by the placeholders -ENV: - default: - #!filter-only : /run/env_CRT_CTX_SHARE_ADDR/sep - #!filter-only : /run/tests/rpc_error - - D_LOG_MASK: "WARN" - - CRT_PHY_ADDR_STR: "ofi+sockets" - - OFI_INTERFACE: "eth0" - - CRT_CTX_NUM: "8" - - CRT_CTX_SHARE_ADDR: "0" +defaultENV: + #!filter-only : /run/tests/no_pmix_multi_ctx + D_LOG_MASK: "WARN" + CRT_PHY_ADDR_STR: "ofi+sockets" + OFI_INTERFACE: "eth0" + CRT_CTX_NUM: "8" + CRT_CTX_SHARE_ADDR: "0" tests: !mux no_pmix_multi_ctx: name: no_pmix_multi_ctx diff --git a/src/tests/ftest/cart/nopmix_launcher/cart_nopmix_launcher_one_node.py b/src/tests/ftest/cart/nopmix_launcher/cart_nopmix_launcher_one_node.py index ec71b8633cb..821ec4fb3fc 100755 --- a/src/tests/ftest/cart/nopmix_launcher/cart_nopmix_launcher_one_node.py +++ b/src/tests/ftest/cart/nopmix_launcher/cart_nopmix_launcher_one_node.py @@ -7,7 +7,6 @@ from __future__ import print_function -import os import sys from apricot import TestWithoutServers @@ -27,7 +26,6 @@ class CartNoPmixLauncherOneNodeTest(TestWithoutServers): def setUp(self): """ Test setup """ print("Running setup\n") - super(CartNoPmixLauncherOneNodeTest, self).setUp() self.utils = CartUtils() self.env = self.utils.get_env(self) @@ -47,10 +45,10 @@ def test_cart_no_pmix_launcher(self): cli_bin = self.params.get("test_clients_bin", '/run/tests/*/') cli_arg = self.params.get("test_clients_arg", '/run/tests/*/') cli_ppn = self.params.get("test_clients_ppn", '/run/tests/*/') - - log_mask = os.environ.get("D_LOG_MASK") - crt_phy_addr = os.environ.get("CRT_PHY_ADDR_STR") - ofi_interface = os.environ.get("OFI_INTERFACE") + log_mask = self.params.get("D_LOG_MASK", "/run/defaultENV/") + crt_phy_addr = self.params.get("CRT_PHY_ADDR_STR", + "/run/defaultENV/") + ofi_interface = self.params.get("OFI_INTERFACE", "/run/defaultENV/") srv_cmd = self.utils.build_cmd(self, self.env, "test_servers") diff --git a/src/tests/ftest/cart/nopmix_launcher/cart_nopmix_launcher_one_node.yaml b/src/tests/ftest/cart/nopmix_launcher/cart_nopmix_launcher_one_node.yaml index 08cadc4b719..686b84f7ca9 100644 --- a/src/tests/ftest/cart/nopmix_launcher/cart_nopmix_launcher_one_node.yaml +++ b/src/tests/ftest/cart/nopmix_launcher/cart_nopmix_launcher_one_node.yaml @@ -1,12 +1,11 @@ # change host names to your reserved nodes, the # required quantity is indicated by the placeholders -ENV: - default: - #!filter-only : /run/tests/no_pmix_launcher - - D_LOG_MASK: "WARN" - - CRT_PHY_ADDR_STR: "ofi+sockets" - - OFI_INTERFACE: "eth0" +defaultENV: + #!filter-only : /run/tests/no_pmix_launcher + D_LOG_MASK: "WARN" + CRT_PHY_ADDR_STR: "ofi+sockets" + OFI_INTERFACE: "eth0" hosts: !mux hosts_1: config: one_node diff --git a/src/tests/ftest/cart/rpc/cart_rpc_one_node.py b/src/tests/ftest/cart/rpc/cart_rpc_one_node.py index 07846939592..fbd1cabb340 100755 --- a/src/tests/ftest/cart/rpc/cart_rpc_one_node.py +++ b/src/tests/ftest/cart/rpc/cart_rpc_one_node.py @@ -26,7 +26,6 @@ class CartRpcOneNodeTest(TestWithoutServers): def setUp(self): """ Test setup """ print("Running setup\n") - super(CartRpcOneNodeTest, self).setUp() self.utils = CartUtils() self.env = self.utils.get_env(self) diff --git a/src/tests/ftest/cart/rpc/cart_rpc_one_node.yaml b/src/tests/ftest/cart/rpc/cart_rpc_one_node.yaml index 18ee403fd79..2d5ecfc6112 100644 --- a/src/tests/ftest/cart/rpc/cart_rpc_one_node.yaml +++ b/src/tests/ftest/cart/rpc/cart_rpc_one_node.yaml @@ -1,17 +1,14 @@ # change host names to your reserved nodes, the # required quantity is indicated by the placeholders -customENV: - MY_CUSTOM_ENV: "pineapple" -ENV: - default: - #!filter-only : /run/env_CRT_CTX_SHARE_ADDR/sep - #!filter-only : /run/tests/proto_np - - D_LOG_MASK: "WARN,RPC=DEBUG,HG=DEBUG" - - CRT_PHY_ADDR_STR: "ofi+sockets" - - OFI_INTERFACE: "eth0" - - test_servers_CRT_CTX_NUM: "16" - - test_clients_CRT_CTX_NUM: "16" +defaultENV: + #!filter-only : /run/env_CRT_CTX_SHARE_ADDR/sep + #!filter-only : /run/tests/proto_np + D_LOG_MASK: "WARN,RPC=DEBUG,HG=DEBUG" + CRT_PHY_ADDR_STR: "ofi+sockets" + OFI_INTERFACE: "eth0" + test_servers_CRT_CTX_NUM: "16" + test_clients_CRT_CTX_NUM: "16" env_CRT_CTX_SHARE_ADDR: !mux sep: env: sep diff --git a/src/tests/ftest/cart/rpc/cart_rpc_one_node_with_swim_notification_on_rank_eviction.py b/src/tests/ftest/cart/rpc/cart_rpc_one_node_with_swim_notification_on_rank_eviction.py index 2fab3b5d1ee..71a1b5fbdbf 100644 --- a/src/tests/ftest/cart/rpc/cart_rpc_one_node_with_swim_notification_on_rank_eviction.py +++ b/src/tests/ftest/cart/rpc/cart_rpc_one_node_with_swim_notification_on_rank_eviction.py @@ -43,7 +43,6 @@ class CartRpcOneNodeSwimNotificationOnRankEvictionTest(TestWithoutServers): def setUp(self): """ Test setup """ print("Running setup\n") - super(CartRpcOneNodeSwimNotificationOnRankEvictionTest, self).setUp() self.utils = CartUtils() self.env = self.utils.get_env(self) diff --git a/src/tests/ftest/cart/rpc/cart_rpc_two_node.py b/src/tests/ftest/cart/rpc/cart_rpc_two_node.py index 5c41b63675c..6dfee0ebebb 100755 --- a/src/tests/ftest/cart/rpc/cart_rpc_two_node.py +++ b/src/tests/ftest/cart/rpc/cart_rpc_two_node.py @@ -26,7 +26,6 @@ class CartRpcTwoNodeTest(TestWithoutServers): def setUp(self): """ Test setup """ print("Running setup\n") - super(CartRpcTwoNodeTest, self).setUp() self.utils = CartUtils() self.env = self.utils.get_env(self) diff --git a/src/tests/ftest/cart/rpc/cart_rpc_two_node.yaml b/src/tests/ftest/cart/rpc/cart_rpc_two_node.yaml index 9c71deb4d39..152bfe59d0b 100644 --- a/src/tests/ftest/cart/rpc/cart_rpc_two_node.yaml +++ b/src/tests/ftest/cart/rpc/cart_rpc_two_node.yaml @@ -1,15 +1,14 @@ # change host names to your reserved nodes, the # required quantity is indicated by the placeholders -ENV: - default: - #!filter-only : /run/env_CRT_CTX_SHARE_ADDR/sep - #!filter-only : /run/tests/rpc_error - - D_LOG_MASK: "WARN,RPC=DEBUG,HG=DEBUG" - - CRT_PHY_ADDR_STR: "ofi+sockets" - - OFI_INTERFACE: "eth0" - - test_servers_CRT_CTX_NUM: "16" - - test_clients_CRT_CTX_NUM: "16" +defaultENV: + #!filter-only : /run/env_CRT_CTX_SHARE_ADDR/sep + #!filter-only : /run/tests/rpc_error + D_LOG_MASK: "WARN,RPC=DEBUG,HG=DEBUG" + CRT_PHY_ADDR_STR: "ofi+sockets" + OFI_INTERFACE: "eth0" + test_servers_CRT_CTX_NUM: "16" + test_clients_CRT_CTX_NUM: "16" env_CRT_CTX_SHARE_ADDR: !mux sep: env: sep diff --git a/src/tests/ftest/cart/selftest/cart_selftest_three_node.py b/src/tests/ftest/cart/selftest/cart_selftest_three_node.py index 0ad65feb54f..8be98c4f88c 100755 --- a/src/tests/ftest/cart/selftest/cart_selftest_three_node.py +++ b/src/tests/ftest/cart/selftest/cart_selftest_three_node.py @@ -26,7 +26,6 @@ class CartSelfThreeNodeTest(TestWithoutServers): def setUp(self): """ Test setup """ print("Running setup\n") - super(CartSelfThreeNodeTest, self).setUp() self.utils = CartUtils() self.env = self.utils.get_env(self) diff --git a/src/tests/ftest/cart/selftest/cart_selftest_three_node.yaml b/src/tests/ftest/cart/selftest/cart_selftest_three_node.yaml index fe5617d8236..08e8ee71acb 100644 --- a/src/tests/ftest/cart/selftest/cart_selftest_three_node.yaml +++ b/src/tests/ftest/cart/selftest/cart_selftest_three_node.yaml @@ -1,15 +1,14 @@ # change host names to your reserved nodes, the # required quantity is indicated by the placeholders -ENV: - default: - #!filter-only : /run/env_CRT_CTX_SHARE_ADDR/no_sep - #!filter-only : /run/tests/self_np - - D_LOG_MASK: "WARN" - - CRT_PHY_ADDR_STR: "ofi+sockets" - - OFI_INTERFACE: "eth0" - - test_servers_CRT_CTX_NUM: "16" - - test_clients_CRT_CTX_NUM: "16" +defaultENV: + #!filter-only : /run/env_CRT_CTX_SHARE_ADDR/no_sep + #!filter-only : /run/tests/self_np + D_LOG_MASK: "WARN" + CRT_PHY_ADDR_STR: "ofi+sockets" + OFI_INTERFACE: "eth0" + test_servers_CRT_CTX_NUM: "16" + test_clients_CRT_CTX_NUM: "16" env_CRT_CTX_SHARE_ADDR: !mux sep: env: sep diff --git a/src/tests/ftest/cart/util/cart_utils.py b/src/tests/ftest/cart/util/cart_utils.py index 6f1887b33c0..e29c56d2b52 100755 --- a/src/tests/ftest/cart/util/cart_utils.py +++ b/src/tests/ftest/cart/util/cart_utils.py @@ -134,27 +134,13 @@ def get_env(self, cartobj): log_file = os.path.join(log_path, log_dir, test_name + "_" + env_CCSA + "_cart.log") - # Default env vars for orterun to None - log_mask = None - self.provider = None - ofi_interface = None - ofi_domain = None - ofi_share_addr = None - - if "D_LOG_MASK" in os.environ: - log_mask = os.environ.get("D_LOG_MASK") - - if "CRT_PHY_ADDR_STR" in os.environ: - self.provider = os.environ.get("CRT_PHY_ADDR_STR") - - if "OFI_INTERFACE" in os.environ: - ofi_interface = os.environ.get("OFI_INTERFACE") - - if "OFI_DOMAIN" in os.environ: - ofi_domain = os.environ.get("OFI_DOMAIN") - - if "CRT_CTX_SHARE_ADDR" in os.environ: - ofi_share_addr = os.environ.get("CRT_CTX_SHARE_ADDR") + log_mask = cartobj.params.get("D_LOG_MASK", "/run/defaultENV/") + self.provider = cartobj.params.get("CRT_PHY_ADDR_STR", + "/run/defaultENV/") + ofi_interface = cartobj.params.get("OFI_INTERFACE", "/run/defaultENV/") + ofi_domain = cartobj.params.get("OFI_DOMAIN", "/run/defaultENV/") + ofi_share_addr = cartobj.params.get("CRT_CTX_SHARE_ADDR", + "/run/env_CRT_CTX_SHARE_ADDR/*/") # Do not use the standard .log file extension, otherwise it'll get # removed (cleaned up for disk space savings) before we can archive it. @@ -259,10 +245,8 @@ def build_cmd(self, cartobj, env, host, **kwargs): "/run/tests/*/") _tst_slt = cartobj.params.get("{}_slt".format(host), "/run/tests/*/") - - _tst_ctx = "16" - if "{}_CRT_CTX_NUM".format(host) in os.environ: - _tst_ctx = os.environ["{}_CRT_CTX_NUM".format(host)] + _tst_ctx = cartobj.params.get("{}_CRT_CTX_NUM".format(host), + "/run/defaultENV/") # If the yaml parameter is a list, return the n-th element tst_bin = self.get_yaml_list_elem(_tst_bin, index) diff --git a/src/tests/ftest/util/apricot/apricot/test.py b/src/tests/ftest/util/apricot/apricot/test.py index 3d11f2e8629..336e445f3fc 100644 --- a/src/tests/ftest/util/apricot/apricot/test.py +++ b/src/tests/ftest/util/apricot/apricot/test.py @@ -352,22 +352,6 @@ def setUp(self): self.d_log = DaosLog(self.context) self.test_log.daos_log = self.d_log - # import and set env vars from yaml file - default_env = self.params.get("default", "/run/ENV/") - if default_env is None: - return - - for kv_pair in default_env: - key = next(iter(kv_pair)) - if key is not None: - value = kv_pair[key] - print("Adding {}={} to environment.\n".format(key, value)) - os.environ[key] = value - - # For compatibility with cart tests, which set env vars in oretrun - # command via -x options - self.env = os.environ - def tearDown(self): """Tear down after each test case.""" self.report_timeout() @@ -395,20 +379,6 @@ def stop_leftover_processes(self, processes, hosts): stop_processes(hosts, "'({})'".format("|".join(processes))) - def unset_other_env_vars(self): - """ import env vars from other_env_var param """ - default_env = self.params.get("default", "/run/ENV/") - if default_env is None: - return - - for kv_pair in default_env: - try: - key = kv_pair[0][0] - print("Removing key {} from environment.\n".format(key)) - del os.environ[key] - except IndexError: - pass - class TestWithServers(TestWithoutServers): # pylint: disable=too-many-public-methods,too-many-instance-attributes """Run tests with DAOS servers and at least one client. diff --git a/utils/sl/pylint3.rc b/utils/sl/pylint3.rc index be1dc116c66..899e9ad453a 100644 --- a/utils/sl/pylint3.rc +++ b/utils/sl/pylint3.rc @@ -1,7 +1,7 @@ [MESSAGES CONTROL] disable=locally-disabled,locally-enabled,star-args,wrong-import-order, unused-wildcard-import,invalid-name,global-statement,bad-option-value, - wrong-import-position,super-with-arguments + wrong-import-position [FORMAT] max-line-length=80