diff options
author | Christian Breunig <christian@breunig.cc> | 2023-11-26 21:05:11 +0100 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2023-11-27 08:36:39 +0100 |
commit | 194b65cb03aadffac6ba25de0fafa251c0fd1a26 (patch) | |
tree | 18763290b12c7c8cbbe557130f967b1b96e23e40 /smoketest/scripts/cli/test_protocols_isis.py | |
parent | 11d531ece3e06dc68349d8ea1fd3bf39d5d857f3 (diff) | |
download | vyos-1x-194b65cb03aadffac6ba25de0fafa251c0fd1a26.tar.gz vyos-1x-194b65cb03aadffac6ba25de0fafa251c0fd1a26.zip |
smoketest: T5783: check for any abnormal daemon termination
We need to ensure when stressing FRR with the smoketests that no unexpected
crash happens. We simply verify the PID of the individual FRR daemons.
(cherry picked from commit 080e117884196136cd63e5d312ff43fba15f7182)
Diffstat (limited to 'smoketest/scripts/cli/test_protocols_isis.py')
-rwxr-xr-x | smoketest/scripts/cli/test_protocols_isis.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/smoketest/scripts/cli/test_protocols_isis.py b/smoketest/scripts/cli/test_protocols_isis.py index 747fb5e80..c82836b72 100755 --- a/smoketest/scripts/cli/test_protocols_isis.py +++ b/smoketest/scripts/cli/test_protocols_isis.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2021-2022 VyOS maintainers and contributors +# Copyright (C) 2021-2023 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -31,20 +31,25 @@ class TestProtocolsISIS(VyOSUnitTestSHIM.TestCase): @classmethod def setUpClass(cls): cls._interfaces = Section.interfaces('ethernet') - # call base-classes classmethod super(TestProtocolsISIS, cls).setUpClass() - + # Retrieve FRR daemon PID - it is not allowed to crash, thus PID must remain the same + cls.daemon_pid = process_named_running(PROCESS_NAME) # ensure we can also run this test on a live system - so lets clean # out the current configuration :) cls.cli_delete(cls, base_path) + cls.cli_delete(cls, ['vrf']) def tearDown(self): + # cleanup any possible VRF mess + self.cli_delete(['vrf']) + # always destrox the entire isisd configuration to make the processes + # life as hard as possible self.cli_delete(base_path) self.cli_commit() - # Check for running process - self.assertTrue(process_named_running(PROCESS_NAME)) + # check process health and continuity + self.assertEqual(self.daemon_pid, process_named_running(PROCESS_NAME)) def isis_base_config(self): self.cli_set(base_path + ['net', net]) |