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
[ ] Bug fix
[ ] Testbed and Framework(new/improvement)
[x] Test case(new/improvement)
Back port request
[ ] 201911
[x] 202012
[x] 202205
[x] 202305
[x] 202311
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?
Ran test_pcied.py tests on lab testbeds.
Any platform specific information?
Supported testbed topology if it's a new test case?
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