Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add multi-asic in test_cont_link_flap (#14673)
Description of PR Currently, test_cont_link_flap is not compatible with multi-asic. It's failing on vtysh command raise RunAnsibleModuleFail("run module {} failed".format(self.module_name), res) tests.common.errors.RunAnsibleModuleFail: run module shell failed, Ansible Results => {"changed": true, "cmd": "vtysh -c \"show memory bgpd\"", "delta": "0:00:00.006507", "end": "2024-09-17 00:06:50.914882", "failed": true, "msg": "non-zero return code", "rc": 1, "start": "2024-09-17 00:06:50.908375", "stderr": "Usage: /usr/bin/vtysh -n [0 to 2] [OPTION]... ", "stderr_lines": ["Usage: /usr/bin/vtysh -n [0 to 2] [OPTION]... "], "stdout": "", "stdout_lines": []} This is because for multi-asic platform, we need to specify -n. Summary: add multi-asic support for test_cont_link_flap Fixes # (issue) 2954952 Approach What is the motivation for this PR? Support multi-asic for test_cont_link_flap by calculating the memory based of each individual asic How did you do it? Since SonicAsic.run_asic has already provided a back-ward compatible to multi-asic and single-asic (https://github.com/sonic-net/sonic-mgmt/blob/master/tests/common/devices/sonic_asic.py#L404) we can leverage this API to execute the test. The test is also working with single-asic since in our system, single-asic chassis will have 1 asic with namespace=None and asic-index=0 How did you verify/test it? Verified on T2 device and T0 kms Signed-off-by: Austin Pham <austinpham@microsoft.com>
- Loading branch information