[PATCH 4/4] perf test: Simplify perf kvm record/report tests
From: Namhyung Kim
Date: Tue Jun 23 2026 - 03:06:07 EST
It can now pass command line arguments to perf kvm record --host.
Let's pass 'sleep 1' directly rather than running it in background.
Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
---
tools/perf/tests/shell/kvm.sh | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/tools/perf/tests/shell/kvm.sh b/tools/perf/tests/shell/kvm.sh
index f88e859025c42c32..4ca10388748dee93 100755
--- a/tools/perf/tests/shell/kvm.sh
+++ b/tools/perf/tests/shell/kvm.sh
@@ -63,13 +63,7 @@ test_kvm_record_report() {
echo "Recording kvm profile for pid ${qemu_pid}..."
# Use --host to avoid needing guest symbols/mounts for this simple test
# We just want to verify the command runs and produces data
- # We run in background and kill it because 'perf kvm record' appends options
- # after the command, which breaks 'sleep' (e.g. it gets '-e cycles').
- perf kvm --host record -p "${qemu_pid}" -o "${perfdata}" &
- rec_pid=$!
- sleep 1
- kill -INT "${rec_pid}"
- wait "${rec_pid}" || true
+ perf kvm --host record -p "${qemu_pid}" -o "${perfdata}" sleep 1
echo "Reporting kvm profile..."
# Check for some standard output from report
--
2.54.0