sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
194 stars 712 forks source link

[action] [PR:12944] Verify the PCIe daemon status before retrieving the PCIE_DEVICES table from the database #13499

Open mssonicbld opened 3 months ago

mssonicbld commented 3 months ago

Description of PR

Summary: The "get_pcie_devices_tbl_key" fixture is currently invoked before the "setup" fixture. When the PCIe daemon is not running, the "get_pcie_devices_tbl_key" fixture asserts that the PCIE_DEVICES table is empty in the database and causes the test to fail. Instead, make the "get_pcie_devices_tbl_key" fixture dependent on the "setup" fixture to verify the daemon status before retrieving the PCIE_DEVICES table from the database, which skips the test if daemon is not running.

Type of change

Back port request

Approach

What is the motivation for this PR?

There are occasional failures with the "PCIE_DEVICES table is empty" message when running PCIe tests. This fix ensures the PCIe daemon is running before retrieving the PCIE_DEVICES table, thereby increasing test reliability.

How did you do it?

Make the "get_pcie_devices_tbl_key" fixture dependent on the "setup" fixture to verify the daemon status before retrieving the PCIE_DEVICES table from the database.

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

mssonicbld commented 3 months ago

Original PR: https://github.com/sonic-net/sonic-mgmt/pull/12944