From 4cf797c67629f0a9a2827651673d459d843b89a6 Mon Sep 17 00:00:00 2001 From: Yakiv Huryk Date: Wed, 19 Oct 2022 13:50:58 +0000 Subject: [PATCH] [tests] [asan] extend graceful stop flag to also stop syncd Now, when running DVS tests with --graceful-stop, both swss and syncd are stopped via SIGTERM. This is needed for asan to generate reports. 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 b53f5dbcc5c..35a96f0007c 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()