Skip to content

Commit 724f914

Browse files
authored
[tests] [asan] extend graceful stop flag to also stop syncd (sonic-net#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 <[email protected]>
1 parent 84642f3 commit 724f914

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/conftest.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def pytest_addoption(parser):
9292
parser.addoption("--graceful-stop",
9393
action="store_true",
9494
default=False,
95-
help="Stop swss before stopping a conatainer")
95+
help="Stop swss and syncd before stopping a conatainer")
9696

9797

9898
def random_string(size=4, chars=string.ascii_uppercase + string.digits):
@@ -670,6 +670,10 @@ def stop_swss(self):
670670
self.runcmd(['sh', '-c', cmd])
671671
time.sleep(5)
672672

673+
def stop_syncd(self):
674+
self.runcmd(['sh', '-c', 'supervisorctl stop syncd'])
675+
time.sleep(5)
676+
673677
# deps: warm_reboot
674678
def start_zebra(self):
675679
self.runcmd(['sh', '-c', 'supervisorctl start zebra'])
@@ -1792,6 +1796,7 @@ def update_dvs(log_path, new_dvs_env=[]):
17921796

17931797
if graceful_stop:
17941798
dvs.stop_swss()
1799+
dvs.stop_syncd()
17951800
dvs.get_logs()
17961801
dvs.destroy()
17971802

0 commit comments

Comments
 (0)