Skip to content

Commit 033b8ed

Browse files
committed
feat: add dracpu-gatherinfo troubleshooting tool
1 parent 90e16f0 commit 033b8ed

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

cmd/dracpu/gatherinfo.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ func validateAndWriteYAML(dir, filename string, data []byte) error {
199199
return fmt.Errorf("path traversal detected")
200200
}
201201

202-
// #nosec G304 -- path constructed from trusted dir + sanitized filename, validated above
202+
// #nosec G703 -- path constructed from trusted dir + sanitized filename, validated above
203203
if err := os.WriteFile(cleanPath, data, 0600); err != nil {
204204
return fmt.Errorf("failed to write %s: %w", filename, err)
205205
}
@@ -402,11 +402,11 @@ type SocketTopology struct {
402402
}
403403

404404
type NUMATopology struct {
405-
ID int `json:"id"`
406-
NumCPUs int `json:"numCPUs"`
407-
CPUSet string `json:"cpuset"`
408-
CPUMask string `json:"cpuMask"`
409-
L3Caches []L3CacheTopology `json:"l3Caches"`
405+
ID int `json:"id"`
406+
NumCPUs int `json:"numCPUs"`
407+
CPUSet string `json:"cpuset"`
408+
CPUMask string `json:"cpuMask"`
409+
L3Caches []L3CacheTopology `json:"l3Caches"`
410410
}
411411

412412
type L3CacheTopology struct {

test/image/dracputester/app.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//go:build linux
2+
13
/*
24
Copyright 2025 The Kubernetes Authors.
35

test/image/dracputester/app_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//go:build linux
2+
13
/*
24
Copyright 2025 The Kubernetes Authors.
35

0 commit comments

Comments
 (0)