[202605][conditional_mark] Backport nodeid normalization for centralized marks#26452
Closed
Xichen96 wants to merge 1 commit into
Closed
Conversation
Backport sonic-net#25930 so conditional marks match tests/-relative keys when pytest resolves rootdir above the tests directory. This is required for the warm-reboot skips in sonic-net#26417 to apply under the standard run_tests.sh invocation. (cherry picked from commit 3cf07f4) Signed-off-by: Nikhil Hegde <nikhilhegde@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b8fb8259-87f3-4de3-b1a4-59fe52e8be86 Signed-off-by: Xichen96 <lukelin0907@gmail.com>
Collaborator
|
/azp run |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
github-actions
Bot
requested review from
BYGX-wcr,
xwjiang-ms and
yutongzhang-microsoft
July 22, 2026 05:44
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Collaborator
|
This PR has backport request for branch(es): 202605. ---Powered by SONiC BuildBot
|
Collaborator
|
This PR has backport request label(s) for branch(es): 202605, but is missing required test information. Please make sure you tick the tested branch(es) in the Tested branch section and provide test evidence (e.g., 202605: <test result>) in the Test result section as well in your PR description. ---Powered by SONiC BuildBot
|
21 tasks
Contributor
Author
Collaborator
|
This PR has backport request for branch(es): 202605. ---Powered by SONiC BuildBot
|
Collaborator
|
The Tested branch section has been ticked and Test result is provided for branch(es): 202605. Added label(s): Tested for 202605 Branch. ---Powered by SONiC BuildBot
|
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.
Description of PR
Summary:
Backport #25930 to
202605so centralized conditional marks still match when pytest resolvesrootdirabove thetests/directory. This is a prerequisite for the warm-reboot conditional skips in #26417 to apply under the standardrun_tests.shinvocation.Related to #25929, #25930, and #26417.
ADO: https://msazure.visualstudio.com/One/_workitems/edit/38862000
Type of change
Back port request
Tested branch
Test result
testbed-bjw-can-720dt-3(m0,Arista-720DT-G48S4) onSONiC.20260510.06; with this normalization fix and the [route]: Skip warm reboot tests on m0/m1/mx #26340 warm-reboot marks, targetedtests/run_tests.shcompleted with 3 skipped, 0 failures, exit 0 in 43.88 seconds. Each case reportedWarm reboot is not supported on dualtor, m0, m1, or mx topologies.8724ffec97851a6359cef16d64b94ebc8a106e32, including every impacted Elastictest lane.Approach
What is the motivation for this PR?
The
202605branch only stripsbasename(rootpath)from collected node IDs. Standardrun_tests.sharguments can make pytest resolverootdirat the repository root, leaving node IDs prefixed withtests/. Conditional-mark keys are relative totests/, so every centralized skip or xfail silently misses in that mode.#26417 adds topology-based warm-reboot skips through the centralized conditional-mark file and therefore requires this normalization fix.
How did you do it?
Cherry-picked the functional change from #25930. After the existing root-directory normalization, the plugin now also strips a leading
tests/before matching the node ID against conditional-mark keys.How did you verify/test it?
py_compileandgit diff --checkpassed on the202605backport branch. The backported patch matches #25930 apart from expected context offsets.Physical validation on
testbed-bjw-can-720dt-3usedSONiC.20260510.06with this normalization fix and the #26340 warm-reboot marks. The standard test runner selected all three target cases as skips with zero failures.Any platform specific information?
No. The fix applies to every platform when pytest reports node IDs with a leading
tests/.Supported testbed topology if it's a new test case?
Not a new test case.
Documentation
Not applicable.