Skip to content

Split unit and driver tests#369

Merged
LakshK98 merged 5 commits into
microsoft:mainfrom
LakshK98:lakshkotian-microsoft-split-unit-driver-tests
Jul 25, 2026
Merged

Split unit and driver tests#369
LakshK98 merged 5 commits into
microsoft:mainfrom
LakshK98:lakshkotian-microsoft-split-unit-driver-tests

Conversation

@LakshK98

@LakshK98 LakshK98 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Description

The existing ntosebpfext_unit binary mixed pure user-mode tests (usersim) with kernel integration tests (loading real .sys drivers). This PR separates them following the ebpf-for-windows pattern:

  • ntosebpfext_unit -- keeps 4 pure user-mode tests (process_invoke, process exit codes, process create and exit times, libbpf attach type names) that run in-process via usersim
  • ntosebpfext_driver_test -- new project with 2 driver tests (process_bpf_prog_run_test, process_resolve_account) that load ntosebpfext.sys
  • neteventebpfext_unit -- renamed output to neteventebpfext_driver_test since all its tests load kernel drivers

CI jobs and codecov config updated accordingly.

Testing

No test logic was modified -- tests are reorganized into separate binaries. CI jobs in cicd.yml invoke the correct binary names.

Documentation

Updated docs/neteventebpfext.md to reference the new neteventebpfext_driver_test.exe binary name.

Installation

CI/CD

- ntosebpfext_unit: Keep only pure user-mode tests (process_invoke,
  process exit codes, process create and exit times, libbpf attach type
  names) that use usersim mock kernel APIs
- ntosebpfext_driver_test: New project with driver tests moved from
  ntosebpfext_unit (process_bpf_prog_run_test, process_resolve_account)
  that load real .sys drivers
- neteventebpfext_unit: Renamed to neteventebpfext_driver_test (all tests
  are kernel integration tests)
- Updated cicd.yml with renamed/new test jobs
- Updated codecov.yml after_n_builds count
- Updated docs/neteventebpfext.md references

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 940d0edb-486d-4adf-a1a1-3f72fd7d4b66
@LakshK98
LakshK98 force-pushed the lakshkotian-microsoft-split-unit-driver-tests branch from a73f4ce to 98a74b3 Compare July 20, 2026 20:48
@LakshK98
LakshK98 force-pushed the lakshkotian-microsoft-split-unit-driver-tests branch from 3e9e42f to 4f8b46a Compare July 20, 2026 22:28
@LakshK98 LakshK98 changed the title [draft] Split unit and driver tests following ebpf-for-windows pattern Split unit and driver tests Jul 21, 2026
@LakshK98
LakshK98 marked this pull request as ready for review July 22, 2026 04:53
Copilot AI review requested due to automatic review settings July 22, 2026 04:53

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

This PR separates pure user-mode tests from kernel/driver integration tests, aligning the ntosebpfext and neteventebpfext test layout with the ebpf-for-windows pattern and updating CI/coverage wiring to match the new binaries.

Changes:

  • Moved ntosebpfext driver-loading tests into a new ntosebpfext_driver_test project, leaving ntosebpfext_unit with only usersim/in-process tests.
  • Renamed the neteventebpfext_unit project output to neteventebpfext_driver_test and updated documentation accordingly.
  • Updated GitHub Actions and Codecov configuration to run/expect the additional test binary.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/ntosebpfext/ntosebpfext_unit/ntos_ebpfext_unit.cpp Removes driver-loading tests and related helpers from the user-mode unit-test binary.
tests/ntosebpfext/ntosebpfext_driver_test/packages.config Adds NuGet package restore configuration for the new driver-test project.
tests/ntosebpfext/ntosebpfext_driver_test/ntosebpfext_driver_test.vcxproj Introduces the new driver-test C++ project and its build settings.
tests/ntosebpfext/ntosebpfext_driver_test/ntos_ebpfext_driver_test.cpp New driver-test binary containing the two kernel integration tests.
tests/neteventebpfext/neteventebpfext_unit/neteventebpfext_unit.vcxproj Changes project name/output to neteventebpfext_driver_test.
ntosebpfext.sln Adds the new driver-test project and renames the netevent test project entry.
docs/neteventebpfext.md Updates docs to reference neteventebpfext_driver_test.exe.
.github/workflows/cicd.yml Updates CI jobs to run the renamed/new test executables.
.github/codecov.yml Adjusts Codecov after_n_builds to account for the additional coverage job.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

mikeagun
mikeagun previously approved these changes Jul 22, 2026
Copilot AI review requested due to automatic review settings July 22, 2026 17:31

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 9 out of 9 changed files in this pull request and generated no new comments.

mikeagun
mikeagun previously approved these changes Jul 22, 2026
Copilot AI review requested due to automatic review settings July 24, 2026 01:16

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 10 out of 14 changed files in this pull request and generated no new comments.

@LakshK98
LakshK98 merged commit f97fc10 into microsoft:main Jul 25, 2026
28 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in eBPF for Windows Triage Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants