Skip to content

[AI Generated] BugFix: skip known upstream xdp-tools promiscuous test failures#4451

Open
Gnandeep99 wants to merge 2 commits into
microsoft:mainfrom
Gnandeep99:bugfix/xdp-skip-promiscuous-upstream-failures_290426_155629
Open

[AI Generated] BugFix: skip known upstream xdp-tools promiscuous test failures#4451
Gnandeep99 wants to merge 2 commits into
microsoft:mainfrom
Gnandeep99:bugfix/xdp-skip-promiscuous-upstream-failures_290426_155629

Conversation

@Gnandeep99

Copy link
Copy Markdown
Collaborator

Summary

Skip known upstream xdp-tools promiscuous mode test failures (test_promiscuous_selfload, test_promiscuous_preload) that consistently fail on Ubuntu 24.04+ due to an upstream xdp-tools issue unrelated to Azure/LISA. These failures are now logged as warnings instead of causing the entire test to fail.

Validation Results

Image Result
Canonical ubuntu-24_04-lts server 24.04.202408210 PASSED

Copilot AI review requested due to automatic review settings April 30, 2026 00:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR relaxes the xdp-tools test runner behavior by treating two known upstream promiscuous-mode failures as non-fatal, so XDP validation doesn’t fail on Ubuntu 24.04+ due to an upstream issue.

Changes:

  • Add a logger and a allowlist of known upstream-failing tests.
  • Split abnormal xdp-tools test results into known vs unexpected failures.
  • Log known failures as warnings while still failing on unexpected ones.

Comment on lines +46 to +49
_KNOWN_UPSTREAM_FAILURES: Set[str] = {
"test_promiscuous_selfload",
"test_promiscuous_preload",
}

Copilot AI Apr 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says these failures are specific to Ubuntu 24.04+ (kernel 6.8+), but the code unconditionally ignores them on all distros/kernels. This risks masking real regressions on other platforms. Consider gating the allowlist by OS/version and/or kernel version (e.g., only apply when running on Ubuntu >= 24.04 or kernel >= 6.8), and otherwise treat these as unexpected failures.

Copilot uses AI. Check for mistakes.
Comment on lines +101 to +107
if unexpected:
raise LisaException(f"found failed tests: {unexpected}")
if not known:
result.assert_exit_code(
0,
"unknown error on xdp tests, please check log for more details.",
)

Copilot AI Apr 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When known is non-empty, the code skips checking result's exit code entirely. That can allow non-test-related failures (e.g., runner crash, bad invocation, missing deps) to pass as long as the parsed test list only contains known failures. A safer approach is to still validate the exit code in the known case—e.g., allow only the specific failure exit code(s) that correspond to test failures, and fail on any other non-zero exit code.

Copilot uses AI. Check for mistakes.
return True


_log = logging.getLogger(__name__)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need this, use node.log

# These are not LISA or driver regressions; they are upstream test issues.
# test_promiscuous_selfload / test_promiscuous_preload: fail on Ubuntu 24.04+
# (kernel 6.8+) because the upstream test's promiscuous-mode detection logic
# is incompatible with newer kernel behaviour.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

provide the doc link here

}

if known:
_log.warning("ignoring known upstream test failures: %s", known)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't use %s use f-format

Copilot AI review requested due to automatic review settings June 9, 2026 07:30
@Gnandeep99 Gnandeep99 force-pushed the bugfix/xdp-skip-promiscuous-upstream-failures_290426_155629 branch from c4e01a0 to aa79ac6 Compare June 9, 2026 07:30
…eam failures

- Gate allowlist by Ubuntu + kernel >= 6.8 (don't skip on other distros)

- Always validate exit code ([0, 2]); reject crashes/OOM/missing deps

- Use self.node.log.warning with f-string instead of module-level _log

- Add upstream issue link placeholder and removal guidance in comment

- Remove unused 'import logging'

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment on lines 95 to 99
result.assert_exit_code(
0, "unknown error on xdp tests, please check log for more details."
[0, _MAKE_TEST_FAILED_EXIT_CODE],
"unknown error on xdp tests, please check log for more details.",
)

Comment on lines +128 to +135
try:
kernel_version = self.node.os.get_kernel_information().version
except Exception as ex: # noqa: BLE001 - defensive: kernel info missing
self.node.log.debug(
f"could not detect kernel version, "
f"disabling xdp-tools allowlist: {ex}"
)
return False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants