From 724f914505e62961d7aab7eda6f1ea484782db83 Mon Sep 17 00:00:00 2001 From: Yakiv Huryk <62013282+Yakiv-Huryk@users.noreply.github.com> Date: Tue, 8 Nov 2022 13:47:11 +0200 Subject: [PATCH] [tests] [asan] extend graceful stop flag to also stop syncd (#2491) - What I did Extended DVS test "--graceful-stop" flag to also stop syncd. - Why I did it So ASAN can generate reports for syncd. - How I verified it Run the tests with --graceful-stop, observe that the syncd process is stopped via SIGTERM Signed-off-by: Yakiv Huryk --- tests/conftest.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index b53f5dbcc5ca..35a96f0007cf 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -92,7 +92,7 @@ def pytest_addoption(parser): parser.addoption("--graceful-stop", action="store_true", default=False, - help="Stop swss before stopping a conatainer") + help="Stop swss and syncd before stopping a conatainer") def random_string(size=4, chars=string.ascii_uppercase + string.digits): @@ -670,6 +670,10 @@ def stop_swss(self): self.runcmd(['sh', '-c', cmd]) time.sleep(5) + def stop_syncd(self): + self.runcmd(['sh', '-c', 'supervisorctl stop syncd']) + time.sleep(5) + # deps: warm_reboot def start_zebra(self): self.runcmd(['sh', '-c', 'supervisorctl start zebra']) @@ -1792,6 +1796,7 @@ def update_dvs(log_path, new_dvs_env=[]): if graceful_stop: dvs.stop_swss() + dvs.stop_syncd() dvs.get_logs() dvs.destroy()