microsoft / microsoft/ebpf-for-windows

Add automatic test for the `ebpf_tracing.cmd`

Open
#2,365 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue help wanted tests triaged
Dominant language
C
Stars
3.6k
Forks
311
Avg merge
6d 10h
Merged PRs (30d)
21

Description

### Describe the feature you'd like supported

Add an automatic test for `ebpf_tracing.cmd` script, as per suggestion on #2357

### Proposed solution

Run the script with its supported scenarios, and check for the expected the outputs:

```bash
# Test #1
ebpf_tracing.cmd start "C:\_ebpf\logs"
- Tracing is started in the log folder, at least one log file is created

# Test #2 - The script should be left running for 'logman_period', eventually changing it artificially
ebpf_tracing.cmd periodic "C:\_ebpf\logs"
- An XML file is created for the rundown, in the committed directory
- ETL files are moved into the committed directory, except 'num_etl_files_to_keep'
- All files older than 'files_max_age_days' are deleted, eventually changing it artificially

# Test #3
ebpf_tracing.cmd stop "C:\_ebpf\logs"
- Log folder is deleted
```

### Additional context

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ebpf_tracing.cmd entry point and run its start, periodic, and stop scenarios against the stated log folder. Done means an automatic test verifies log creation, rundown XML and ETL handling, age-based deletion, and log-folder cleanup as described.

Written by the indexing model from the issue text.

Assessment

Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.