Skip to contentSkip to conversation

perf tests kvm: Avoid leaving perf.data.guest file around

PATCH Applied Ian Rogers 2 participants 3 messages Dec 4, 2025 – Dec 24, 2025 perf events

lore
Share & tools
lore

Ian Rogers

author reviewer
#0 lore raw

PATCH v2 1/2 perf tests kvm: Avoid leaving perf.data.guest file around

Ensure the perf.data output when checking permissions is written to /dev/null so that it isn't left in the directory the test is run.

Fixes b58261584d2f ("perf test kvm: Add some basic perf kvm test coverage")
---
 tools/perf/tests/shell/kvm.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/shell/kvm.sh +1 -1
index 2fafde1a29cc..2a399b83fe80 100755
@@ -118,7 +118,7 @@ setup_qemu() {
 		skip "/dev/kvm not accessible"
 	fi
 
-	if ! perf kvm stat record -a sleep 0.01 >/dev/null 2>&1; then
+	if ! perf kvm stat record -o /dev/null -a sleep 0.01 >/dev/null 2>&1; then
 		skip "No permission to record kvm events"
 	fi
 
Signature · 1 line
2.52.0.223.gf5cc29aaa4-goog
author reviewer
#1 lore raw

PATCH v2 2/2 perf tests top: Make the test exclusive

With sufficient tests running the load causes the top test fails with:

```
123: perf top tests                                                  : FAILED!
 --- start ---
test child forked, pid 629856
Basic perf top test
Basic perf top test [Failed: no sample percentage found]
 ---- end(-1) ----
```

Mark the test exclusive to avoid flakes.

Fixes 75e961730b9e ("perf tests top: Add basic perf top coverage test")

---
v2; Tweak commit message log lines starting "---".

---
 tools/perf/tests/shell/top.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/shell/top.sh +1 -1
index 768ebcf7a89c..ad7fccd09025 100755
@@ -1,5 +1,5 @@
 #!/bin/bash
-# perf top tests
+# perf top tests (exclusive)
 # SPDX-License-Identifier: GPL-2.0
 
 set -e
Signature · 1 line
2.52.0.223.gf5cc29aaa4-goog
maintainer Applied
#2 lore raw
In reply to Ian Rogers
Quoted 4 lines · Ian Rogers

Ensure the perf.data output when checking permissions is written to /dev/null so that it isn't left in the directory the test is run.

Applied to perf-tools, thanks!

Best regards,
Namhyung