]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf tests kvm: Avoid leaving perf.data.guest file around
authorIan Rogers <irogers@google.com>
Thu, 4 Dec 2025 22:55:21 +0000 (14:55 -0800)
committerNamhyung Kim <namhyung@kernel.org>
Tue, 23 Dec 2025 18:13:50 +0000 (10:13 -0800)
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")
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/tests/shell/kvm.sh

index 2fafde1a29cca0a503e50754da5a4520b0e5d627..2a399b83fe8084725962fdb3ae2060901c116349 100755 (executable)
@@ -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