Lines Matching +full:self +full:- +full:test

16 # Test classes should be inherited
21 @pytest.mark.skip(reason="comment me to run the test")
22 def test_one(self): argument
23 assert ToolsHelper.get_output("uname -s").strip() == "FreeBSD"
27 # List of required kernel modules (kldstat -v)
31 @pytest.mark.skip(reason="comment me to run the test")
32 def test_one(self): argument
33 """Optional test description
35 to the ATF test description.
39 @pytest.mark.skip(reason="comment me to run the test")
41 # See atf-test-case(4) for the detailed description
49 def test_two(self): argument
52 @pytest.mark.skip(reason="comment me to run the test")
53 def test_get_properties(self, request): argument
54 """Shows fetching of test src dir and ATF-set variables"""
58 for k, v in self.atf_vars.items():
62 @pytest.mark.skip(reason="comment me to run the test")
64 def test_syscall_failure(self): argument
70 @pytest.mark.skip(reason="comment me to run the test")
79 def test_parametrize(self, family_tuple): argument
88 # @pytest.mark.skip(reason="comment me to run the test")
89 def test_with_cleanup(self): argument
90 print("TEST BODY")
92 def cleanup_test_with_cleanup(self, test_id): argument
104 vnet: VnetInstance = self.vnet_map["vnet1"]
111 in the tentative state when the test method is called.
117 def setup_method(self, method): argument
119 Optional pre-setup for all of the tests inside the class
128 @pytest.mark.skip(reason="comment me to run the test")
130 def test_ping(self): argument
131 assert subprocess.run("ping -c1 192.0.2.1".split()).returncode == 0
132 assert subprocess.run("ping -c1 2001:db8::1".split()).returncode == 0
134 @pytest.mark.skip(reason="comment me to run the test")
135 def test_topology(self): argument
136 vnet = self.vnet_map["vnet1"]
143 VnetTestTemplate creates topology described in the self.TOPOLOGY
148 to allow communication between the main test and the vnet handler.
153 if1(epair) 2001:db8:a::1/64 <-> 2001:db8:a::2/64 if1(epair)
154 if2(epair) 2001:db8:b::1/64 <-> 2001:db8:b::2/64 if2(epair)
166 def _get_iface_stat(self, os_ifname: str): argument
168 "{} -I {} --libxo json".format(ToolsHelper.NETSTAT_PATH, os_ifname)
173 def vnet2_handler(self, vnet: VnetInstance): argument
175 Test handler that runs in the vnet2 as a separate process.
182 iface_alias = self.wait_object(vnet.pipe, None)
183 # Translates topology interface name to the actual OS-assigned name
185 self.send_object(vnet.pipe, self._get_iface_stat(os_ifname))
187 @pytest.mark.skip(reason="comment me to run the test")
189 def test_ifstat(self): argument
191 second_vnet = self.vnet_map["vnet2"]
195 self.send_object(pipe, "if1")
196 old_stat = self.wait_object(pipe)
197 assert subprocess.run("ping -c5 2001:db8:a::2".split()).returncode == 0
198 self.send_object(pipe, "if1")
199 new_stat = self.wait_object(pipe)
200 assert new_stat["received-packets"] - old_stat["received-packets"] >= 5
203 self.send_object(pipe, "if2")
204 old_stat = self.wait_object(pipe)
205 assert subprocess.run("ping -c5 2001:db8:b::2".split()).returncode == 0
206 self.send_object(pipe, "if2")
207 new_stat = self.wait_object(pipe)
208 assert new_stat["received-packets"] - old_stat["received-packets"] >= 5