Skip to content

Make netebpfext unit test resilient to fault injection. - #5547

Open
Shankar Seal (shankarseal) wants to merge 2 commits into
microsoft:mainfrom
shankarseal:shankarseal-fix-netebpfext-fault-injection
Open

Make netebpfext unit test resilient to fault injection.#5547
Shankar Seal (shankarseal) wants to merge 2 commits into
microsoft:mainfrom
shankarseal:shankarseal-fix-netebpfext-fault-injection

Conversation

@shankarseal

@shankarseal Shankar Seal (shankarseal) commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Description

Fixes #5460 .

Issues

  • Fault injection could cause the mock FwpmFilterAdd0() in usersim.dll to fail during the netebpfext test case initialization, prior to NMR hook provider could bind, leaving the corresponding provider unavailable. Subsequent tests assumed initialization had succeeded, accessed the missing provider data, and crashed on a null pointer.
  • fault.log file was not getting uploaded
  • netebpfext unit test was not built in native flavor.

Changes

The PR includes the following changes.

  • Update usersim to support suspend/resume fault injection.
  • Suspend usersim fault injection while the netebpfext test helper initializes and tears down.
  • Add a unit test that exercises all NMR bindings with fault injection enabled.
  • Require all expected NMR bindings for existing tests while excluding helper initialization from fault injection.
  • Add a CI step that collects fault-injection logs so they are uploaded with the test results.
  • Add NativeOnlyDebug configuration to netebpfext_unit.vcxproj.

Testing

Do any existing tests cover this change? Are new tests needed?

If new tests were added:

  • Unit tests are added.
  • Driver tests are added.
  • Fuzz tests are added.

Documentation

Is there any documentation impact for this change?

Installation

Is there any installer impact for this change?

@github-actions

This comment was marked as resolved.

@shankarseal
Shankar Seal (shankarseal) marked this pull request as draft August 31, 2026 22:12
@shankarseal
Shankar Seal (shankarseal) force-pushed the shankarseal-fix-netebpfext-fault-injection branch from 0be3f74 to a8e58db Compare September 1, 2026 01:29
@github-actions

This comment was marked as resolved.

1 similar comment
@github-actions

This comment was marked as resolved.

Shankar Seal added 2 commits September 1, 2026 18:13
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ea587460-e416-414f-9687-d52ae0a34d8f
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ea587460-e416-414f-9687-d52ae0a34d8f
@shankarseal
Shankar Seal (shankarseal) force-pushed the shankarseal-fix-netebpfext-fault-injection branch from dba2b3f to 60bebfe Compare September 2, 2026 01:13
@github-actions

This comment was marked as resolved.

@shankarseal Shankar Seal (shankarseal) changed the title update netebpfext unit test to suspend fault injection during test init. Make netebpfext unit test resilient to fault injection. Sep 2, 2026
@shankarseal
Shankar Seal (shankarseal) marked this pull request as ready for review September 2, 2026 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Workflow failed - netebpfext_fault_injection_full

3 participants