Clean up procedure for ptf based#301
Closed
SkayKvit wants to merge 2 commits into
Closed
Conversation
added 2 commits
July 9, 2026 14:53
Signed-off-by: Oleksandr Nyzkoshapka <oleksandr.nyzkoshapka@plvision.eu>
zikkend
reviewed
Jul 9, 2026
Comment on lines
+89
to
+92
| @pytest.fixture(scope="module", autouse=True) | ||
| def skip_all(testbed_instance): | ||
| testbed = testbed_instance | ||
| if testbed is not None and len(testbed.npu) != 1: |
Contributor
There was a problem hiding this comment.
this fixture shouldn't be in conftest.py because it is only applicable for testbeds with npu. Testbed can have phy or dpu instead
| except BaseException: | ||
| pass | ||
|
|
||
| if prev_test_failed and 'verify_sai_clean_state' in globals(): |
zikkend
reviewed
Jul 9, 2026
| Helper function to verify that the ASIC has no leftover user objects. | ||
| """ | ||
| try: | ||
| fdb_keys = npu.get_db_keys("ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY*") |
Contributor
There was a problem hiding this comment.
For npu it doesn't matter which sai client it uses: Redis or Thrift. It can't use data directly from Redis db like "ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY*" here
Contributor
|
We can't simply mock the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To minimize overhead for successful tests, the system implements a dedicated recovery mechanism that activates only after a test failure or class change. This prevents heavy NPU cleanup operations when the hardware state is valid, while resolving previous issues caused by misconfigured scope="class" fixtures, which frequently left "dirty" states for subsequent test runs.
The system relies on the following key components: