]> git.hungrycats.org Git - linux/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Sep 2026 11:36:16 +0000 (13:36 +0200)
[ Upstream commit b3d1dcd02c8cc1da723c1e9a6b74849ed94b6d30 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/perf/tests/shell/kvm.sh

index 85089f8c2d48b3898a5d3bf1a1125444828d6d90..5244c3ddfb1cffab5f92776898c12dfc9dacb219 100755 (executable)
@@ -133,7 +133,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