Skip to content

Add bpf_prog_run_test#306

Merged
LakshK98 merged 10 commits intomicrosoft:mainfrom
LakshK98:ctx_create_test
Feb 12, 2026
Merged

Add bpf_prog_run_test#306
LakshK98 merged 10 commits intomicrosoft:mainfrom
LakshK98:ctx_create_test

Conversation

@LakshK98
Copy link
Contributor

@LakshK98 LakshK98 commented Feb 2, 2026

Description

Added bpf_prog_test_run test for ntos.
Fixes #142

Testing

CI/CD

Documentation

NA

Installation

NA

Copy link
Contributor

Copilot AI left a comment

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 adds bpf_prog_test_run test coverage for the ntosebpfext extension, specifically testing the process monitor functionality via bpf_prog_test_run_opts. The implementation includes significant changes to the _ebpf_process_context_create and _ebpf_process_context_destroy functions to support deep copying of UNICODE_STRING buffers.

Changes:

  • Added comprehensive test case for process context creation/deletion via bpf_prog_test_run_opts with validation of ring buffer events and map storage
  • Modified context_create/destroy functions to perform deep copies of command_line and image_file_name buffers
  • Added project dependencies and include paths for utils library

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
tests/ntosebpfext/ntosebpfext_unit/ntosebpfext_unit.vcxproj Added include paths and project reference for utils library to support the new test
tests/ntosebpfext/ntosebpfext_unit/ntos_ebpfext_unit.cpp Added comprehensive test case with ring buffer callback, positive and negative test scenarios
ebpf_extensions/ntosebpfext/ntos_ebpf_ext_process.c Implemented deep copying of UNICODE_STRING buffers in context_create and updated context_destroy to handle full notify context

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI review requested due to automatic review settings February 2, 2026 18:56
Copy link
Contributor

Copilot AI left a comment

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


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

Copilot AI review requested due to automatic review settings February 5, 2026 23:34
Copy link
Contributor

Copilot AI left a comment

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


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

matthewige
matthewige previously approved these changes Feb 6, 2026
Copilot AI review requested due to automatic review settings February 6, 2026 01:00
Copy link
Contributor

Copilot AI left a comment

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 5 out of 5 changed files in this pull request and generated 1 comment.


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

Copilot AI review requested due to automatic review settings February 6, 2026 16:14
Copy link
Contributor

Copilot AI left a comment

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 5 out of 5 changed files in this pull request and generated 1 comment.


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

Copilot AI review requested due to automatic review settings February 7, 2026 00:36
Copy link
Contributor

Copilot AI left a comment

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


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

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

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Add tests for bpf_prog_test_run (i.e context_create/delete)

3 participants