◐ Shell
clean mode source ↗

Fix the fuzzy test by daxian-dbw · Pull Request #26402 · PowerShell/PowerShell

Pull Request Overview

This PR refactors the fuzzing test runner script to improve its usability and maintainability. The changes simplify the script by removing dynamic target discovery and providing better default values for paths.

Key Changes

  • Updated parameter defaults to use $PSScriptRoot for better portability and made $corpus parameter optional with a sensible default
  • Simplified instrumentation logic by targeting specific classes (FuzzTests.Target and System.Management.Automation.Remoting.RemoteSessionHyperVSocketClient) instead of using dynamic discovery
  • Modernized the .csproj file by importing Test.Common.props for consistent build configuration across test projects

Reviewed Changes

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

File Description
test/fuzzing/runFuzzer.ps1 Added documentation header, updated parameter defaults with $PSScriptRoot, simplified instrumentation to target specific classes, and changed build configuration to Debug
test/fuzzing/FuzzingApp/powershell-fuzz-tests.csproj Added import of Test.Common.props and removed redundant property definitions for cleaner project configuration
test/fuzzing/FuzzingApp/Target.cs Removed trailing newline (whitespace cleanup)

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