Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
210ba58
target ubuntu lab 2404
ProjectsByJackHe Aug 9, 2025
eb14388
see if this works
ProjectsByJackHe Aug 9, 2025
5f3f6c0
test if latest msquic broke netperf
ProjectsByJackHe Aug 10, 2025
86eb4c3
test if latest msquic broke netperf
ProjectsByJackHe Aug 10, 2025
3ba2ecd
test if latest msquic broke netperf
ProjectsByJackHe Aug 10, 2025
0b9d045
Merge branch 'main' into jackhe/add-lab-ubuntu-24.04
ProjectsByJackHe Aug 14, 2025
d3dbe29
workaround
ProjectsByJackHe Aug 15, 2025
3dd6f52
workaround 2
ProjectsByJackHe Aug 15, 2025
b6e8cb7
what's going on?
ProjectsByJackHe Aug 15, 2025
45961c9
more diagnostics
ProjectsByJackHe Aug 15, 2025
9efa359
why...linux case sensitivity...
ProjectsByJackHe Aug 15, 2025
3d313e8
add sudo to callback script call
ProjectsByJackHe Aug 15, 2025
fb4a5c1
copy everything
ProjectsByJackHe Aug 15, 2025
db26977
copy everything
ProjectsByJackHe Aug 15, 2025
3f9e679
hopefully this works...
ProjectsByJackHe Aug 17, 2025
4f3febc
hopefully sudo works now
ProjectsByJackHe Aug 19, 2025
c258ab9
copy-item already overwrites stuff
ProjectsByJackHe Aug 19, 2025
b444b76
try sudo once more
ProjectsByJackHe Aug 19, 2025
012c5c1
wip
ProjectsByJackHe Aug 19, 2025
57352b3
use the temporary file method...
ProjectsByJackHe Aug 20, 2025
3da2cee
put it into parent dir
ProjectsByJackHe Aug 20, 2025
a3bf188
get rid of workingdirectory...
ProjectsByJackHe Aug 20, 2025
15b209d
set chown and chmod stuff
ProjectsByJackHe Aug 20, 2025
3bc4aca
make sure it's all working
ProjectsByJackHe Aug 21, 2025
a4c2af3
wip
ProjectsByJackHe Aug 21, 2025
a889c7d
create tmp file
ProjectsByJackHe Aug 21, 2025
54730f2
wip
ProjectsByJackHe Sep 10, 2025
52e132f
add back the things
ProjectsByJackHe Sep 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/auto-reset-parent-or-child-lab-machine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ jobs:
{ parent-or-child: "child=rr1-netperf-25\\localadminuser", vm-name: "netperf-windows-2022-server" },
{ parent-or-child: "child=rr1-netperf-05\\localadminuser", vm-name: "netperf" },
{ parent-or-child: "parent=rr1-netperf-10\\localadminuser", vm-name: "netperf" },
{ parent-or-child: "child=rr1-netperf-11\\localadminuser", vm-name: "netperf-linux-server" },
{ parent-or-child: "parent=rr1-netperf-12\\localadminuser", vm-name: "netperf-linux-client" },
{ parent-or-child: "child=rr1-netperf-11\\localadminuser", vm-name: "netperf-ubuntu24-server" },
{ parent-or-child: "parent=rr1-netperf-12\\localadminuser", vm-name: "netperf-ubuntu24-client" },
{ parent-or-child: "child=rr1-netperf-01\\localadminuser", vm-name: "netperf-windows-2022-server" },
{ parent-or-child: "parent=rr1-netperf-02\\localadminuser", vm-name: "netperf-windows-2022-client" },
{ parent-or-child: "child=rr1-netperf-03\\localadminuser", vm-name: "netperf-windows-2022-server" },
Expand All @@ -111,7 +111,7 @@ jobs:
- name: Start VM, wait for online status, alert observer.
run: |
$vmName = "${{ matrix.vec.vm-name }}"
if ($vmName.Contains("linux")) {
if ($vmName.Contains("linux") -or $vmName.Contains("ubuntu")) {
Restart-VM -Name $vmName -Force
} else {
Start-VM -Name $vmName
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
- name: Start VM, wait for online status, alert observer.
run: |
$vmName = "${{ inputs.vm-name }}"
if ($vmName.Contains("linux")) {
if ($vmName.Contains("linux") -or $vmName.Contains("ubuntu")) {
Restart-VM -Name $vmName -Force
} else {
Start-VM -Name $vmName
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/quic_matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
{ "env": "azure", "os": "windows-2025", "arch": "x64", "tls": "schannel", "io": "wsk", "preferred_pool_sku": "Experimental_Boost4" },
{ "env": "lab", "os": "windows-2022", "arch": "x64", "tls": "schannel", "io": "iocp" },
{ "env": "lab", "os": "windows-2022", "arch": "x64", "tls": "schannel", "io": "xdp" },
{ "env": "lab", "os": "windows-2022", "arch": "x64", "tls": "schannel", "io": "wsk" }
{ "env": "lab", "os": "windows-2022", "arch": "x64", "tls": "schannel", "io": "wsk" },
{ "env": "lab", "os": "ubuntu-24.04", "arch": "x64", "tls": "quictls", "io": "epoll" }
]
3 changes: 3 additions & 0 deletions docs/machines.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ curl https://raw.githubusercontent.com/microsoft/netperf/main/setup-runner-linux
CLIENTIP='192.168.0.XXX/24'
sudo apt install net-tools -y

# if eth1 does not exist
sudo ip link set eth1 up

ifconfig # From the output of ifconfig, look for the netadapter (eth0 or eth1 ...) WITHOUT an inet ipv4 address. Usually, this will be eth1.
sudo ip addr add $CLIENTIP dev eth1 # make sure eth1 is indeed the netadapter without an inet ipv4 address.
# Also create a startup script that runs "sudo ip addr add $CLIENTIP dev eth_" so when the VM restarts, the ip persists.
Expand Down
55 changes: 45 additions & 10 deletions netperf-lib.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,24 @@ function NetperfSendCommand {
)

if ($Session -and $Session -ne "NOT_SUPPORTED") {
Write-Host "Sending command (via remote powershell): $Command"
$CallBackName = $env:CallBackName
$RemoteDir = $env:RemoteDir
Invoke-Command -Session $Session -ScriptBlock {
& "$Using:RemoteDir/scripts/$Using:CallBackName" -Command $Using:Command -WorkingDir $Using:RemoteDir
if ($isWindows) {
Write-Host "Sending command (via remote powershell): $RemoteDir/scripts/$CallBackName -Command $Command -WorkingDir $RemoteDir"
Invoke-Command -Session $Session -ScriptBlock {
& pwsh -NoProfile -NonInteractive -WorkingDirectory $Using:RemoteDir -File `
"$Using:RemoteDir/scripts/$Using:CallBackName" `
-Command $Using:Command `
-WorkingDir $Using:RemoteDir
}
} else {
Write-Host "Sending command (via remote powershell): sudo -n pwsh -NoProfile -NonInteractive -File $RemoteDir/scripts/$CallBackName -Command $Command -WorkingDir $RemoteDir"
Invoke-Command -Session $Session -ScriptBlock {
& sudo -n pwsh -NoProfile -NonInteractive -WorkingDirectory $Using:RemoteDir -File `
"$Using:RemoteDir/scripts/$Using:CallBackName" `
-Command $Using:Command `
-WorkingDir $Using:RemoteDir
}
}
return
}
Expand Down Expand Up @@ -112,12 +125,12 @@ function NetperfWaitServerFinishExecution {

function InitNetperfLib {
param (
$CallbackName,
$CallBackName,
$RemoteDir,
$RemoteName,
$UserNameOnLinux
)
$env:CallbackName = $CallbackName
$env:CallBackName = $CallBackName
$env:RemoteDir = $RemoteDir
$env:RemoteName = $RemoteName
$env:UserNameOnLinux = $UserNameOnLinux
Expand All @@ -126,6 +139,7 @@ function InitNetperfLib {

# Set up the connection to the peer over remote powershell.
Write-Host "Connecting to $RemoteName"
Write-Host "Using Callback Script: $RemoteDir/scripts/$CallBackName"
$Attempts = 0
while ($Attempts -lt 5) {
try {
Expand Down Expand Up @@ -160,16 +174,37 @@ function InitNetperfLib {
function Copy-RepoToPeer {
param($Session)
$RemoteDir = $env:RemoteDir
$UserNameOnLinux = $env:UserNameOnLinux
if (!($Session -eq "NOT_SUPPORTED")) {
# Copy the artifacts to the peer.
Write-Host "Copying files to peer"
Invoke-Command -Session $Session -ScriptBlock {
if (Test-Path $Using:RemoteDir) {
Remove-Item -Force -Recurse $Using:RemoteDir | Out-Null
if ($isWindows) {
Invoke-Command -Session $Session -ScriptBlock {
if (Test-Path $Using:RemoteDir) {
Remove-Item -Force -Recurse $Using:RemoteDir | Out-Null
}
New-Item -ItemType Directory -Path $Using:RemoteDir -Force | Out-Null
}
} else {
Invoke-Command -Session $Session -ScriptBlock {
# Create tmp script
$Script = @"
if (Test-Path $Using:RemoteDir) {
Remove-Item -Force -Recurse $Using:RemoteDir | Out-Null
}
New-Item -ItemType Directory -Path $Using:RemoteDir -Force | Out-Null
chown $Using:UserNameOnLinux:$Using:UserNameOnLinux $Using:RemoteDir
chmod 755 $Using:RemoteDir
"@
# Create file
New-Item -ItemType File -Path "$Using:RemoteDir/../tmp_script.ps1" -Force | Out-Null
Set-Content -Path "$Using:RemoteDir/../tmp_script.ps1" -Value $Script -Force
& sudo -n pwsh -NoProfile -NonInteractive -File `
"$Using:RemoteDir/../tmp_script.ps1"
}
New-Item -ItemType Directory -Path $Using:RemoteDir -Force | Out-Null
}
Copy-Item -ToSession $Session -Path ./* -Destination "$RemoteDir" -Recurse

Copy-Item -ToSession $Session -Path ./*, ./.* -Destination "$RemoteDir" -Recurse -Force
} else {
Write-Host "Not using remote powershell, assuming peer has checked out the repo."
}
Expand Down
Loading