From efe3d20c2af701db9ff14d42f68dd935a5c62913 Mon Sep 17 00:00:00 2001 From: Alan Jowett Date: Wed, 11 Feb 2026 08:17:23 -0800 Subject: [PATCH] Fix km_ebpfcore_restart_test to run inside VM The restart test controller was invoked directly on the 1ES runner host, but ebpfcore is installed inside the Hyper-V VM. This caused error 1060 (ERROR_SERVICE_DOES_NOT_EXIST) since the service doesn't exist on the host. Route the test through execute_ebpf_cicd_tests.ps1 with a new RestartEbpfCore stress test option, matching the pattern used by km_mt_stress_tests_restart_extension. Fixes #4950 --- .github/workflows/cicd.yml | 2 +- scripts/run_driver_tests.psm1 | 15 ++++++++++++++- scripts/vm_run_tests.psm1 | 3 +++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 6aebd765b2..37afa19817 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -669,7 +669,7 @@ jobs: with: name: km_ebpfcore_restart_test pre_test: .\setup_ebpf_cicd_tests.ps1 -KmTracing $true -KmTraceType "memory" - test_command: .\ebpf_restart_test_controller.exe + test_command: .\execute_ebpf_cicd_tests.ps1 -TestMode "Stress" -Options @("RestartEbpfCore") post_test: .\cleanup_ebpf_cicd_tests.ps1 -KmTracing $true build_artifact: Build-x64 environment: '["self-hosted", "1ES.Pool=ebpf-cicd-runner-pool-server-2019", "1ES.ImageOverride=server2022"]' diff --git a/scripts/run_driver_tests.psm1 b/scripts/run_driver_tests.psm1 index a9de0784b7..43c7d600ff 100644 --- a/scripts/run_driver_tests.psm1 +++ b/scripts/run_driver_tests.psm1 @@ -450,11 +450,24 @@ function Invoke-CICDStressTests [parameter(Mandatory = $false)][int] $TestHangTimeout = (120*60), [parameter(Mandatory = $false)][string] $UserModeDumpFolder = "C:\Dumps", [parameter(Mandatory = $false)][bool] $NeedKernelDump = $true, - [parameter(Mandatory = $false)][bool] $RestartExtension = $false) + [parameter(Mandatory = $false)][bool] $RestartExtension = $false, + [parameter(Mandatory = $false)][bool] $RestartEbpfCore = $false) Push-Location $WorkingDirectory $env:EBPF_ENABLE_WER_REPORT = "yes" + if ($RestartEbpfCore) { + Write-Log "Executing eBPF core restart stress test." + + $LASTEXITCODE = 0 + + $TestCommand = ".\ebpf_restart_test_controller.exe" + Invoke-Test -TestName $TestCommand -VerboseLogs $VerboseLogs -TestHangTimeout $TestHangTimeout -TracingProfileName "EbpfForWindowsProvider" + + Pop-Location + return + } + Write-Log "Executing eBPF kernel mode multi-threaded stress tests (restart extension:$RestartExtension)." $LASTEXITCODE = 0 diff --git a/scripts/vm_run_tests.psm1 b/scripts/vm_run_tests.psm1 index 0695a7ffc8..69cca1f720 100644 --- a/scripts/vm_run_tests.psm1 +++ b/scripts/vm_run_tests.psm1 @@ -336,9 +336,12 @@ function Run-KernelTests { "stress" { # Set RestartExtension to true if options contains that string. $RestartExtension = $Options -contains "RestartExtension" + # Set RestartEbpfCore to true if options contains that string. + $RestartEbpfCore = $Options -contains "RestartEbpfCore" Invoke-CICDStressTests ` -VerboseLogs $VerboseLogs ` -RestartExtension $RestartExtension ` + -RestartEbpfCore $RestartEbpfCore ` 2>&1 | Write-Log } "performance" {