fix(amd-stress): include VRAM load in GST burn

This commit is contained in:
2026-03-29 12:03:50 +03:00
parent 4db89e9773
commit 98f0cf0d52
3 changed files with 47 additions and 8 deletions

View File

@@ -5,6 +5,7 @@ import (
"os"
"os/exec"
"path/filepath"
"strings"
"testing"
)
@@ -38,6 +39,36 @@ func TestRunNvidiaAcceptancePackIncludesGPUStress(t *testing.T) {
}
}
func TestAMDStressConfigEnablesVRAMTraffic(t *testing.T) {
t.Parallel()
cfg := amdStressRVSConfig(123)
if !strings.Contains(cfg, "copy_matrix: true") {
t.Fatalf("config missing VRAM copy path:\n%s", cfg)
}
if !strings.Contains(cfg, "duration: 123000") {
t.Fatalf("config missing millisecond duration:\n%s", cfg)
}
}
func TestAMDStressJobsIncludeBandwidthAndGST(t *testing.T) {
t.Parallel()
jobs := amdStressJobs(300, "/tmp/test-amd-gst.conf")
if len(jobs) != 4 {
t.Fatalf("jobs=%d want 4", len(jobs))
}
if got := jobs[1].cmd[0]; got != "rocm-bandwidth-test" {
t.Fatalf("jobs[1]=%q want rocm-bandwidth-test", got)
}
if got := jobs[2].cmd[0]; got != "rvs" {
t.Fatalf("jobs[2]=%q want rvs", got)
}
if got := jobs[2].cmd[2]; got != "/tmp/test-amd-gst.conf" {
t.Fatalf("jobs[2] cfg=%q want /tmp/test-amd-gst.conf", got)
}
}
func TestNvidiaSATJobsUseEnvOverrides(t *testing.T) {
t.Setenv("BEE_GPU_STRESS_SECONDS", "9")
t.Setenv("BEE_GPU_STRESS_SIZE_MB", "96")