Skip to content

Commit

Permalink
[tests] [asan] extend graceful stop flag to also stop syncd (#2491)
Browse files Browse the repository at this point in the history
- 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 <yhuryk@nvidia.com>
  • Loading branch information
Yakiv-Huryk committed Nov 8, 2022
1 parent 84642f3 commit 724f914
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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'])
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit 724f914

Please sign in to comment.