microsoft / xdp-for-windows

XDP speeds up networking on Windows
MIT License
346 stars 40 forks source link

perf test: continue past errors during cleanup #525

Closed mtfriesen closed 4 weeks ago

mtfriesen commented 4 weeks ago

The new two-machine perf tests specify -ErrorAction 'Continue' for each command within the remote script block, but, curiously, PowerShell treats errors in local and remote script blocks differently. Without digging into why exactly there is such a difference, simply specify each invocation of the remote script block is to have its errors continued.

Avoids situations like the following:

====================CLEAN UP====================

Stopping remote logs...
##vso[task.setvariable variable=NeedsReboot]true
Write-Error: C:\actions-runner\_work\netperf\netperf\tools\two-machine-perf.ps1:289
Line |
 289 |      Invoke-Command -Session $Session -ScriptBlock {
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | wpr.exe failed: -9840762[88](https://github.com/microsoft/netperf/actions/runs/9367353340/job/25787006193#step:4:89)
Error: Process completed with exit code 1.