[PATCH v2 2/2] selftests/cachestat: add cleanup for leftover tmpshmcstat file

From: Madhur Kumar

Date: Sat Sep 27 2025 - 12:12:04 EST


The cachestat test generates a temporary file named
"tmpshmcstat" when it runs, but this file is not removed by
'make kselftest-clean'. Add an EXTRA_CLEAN entry to ensure
the file gets cleaned up properly.

Signed-off-by: Madhur Kumar <madhurkumar004@xxxxxxxxx>
---

v2:
- Corrected subject line to describe "tmpshmcstat" as a file, not a binary.
- Refined commit log for clarity
---
tools/testing/selftests/cachestat/Makefile | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/cachestat/Makefile b/tools/testing/selftests/cachestat/Makefile
index 778b54ebb036..c48065d791a9 100644
--- a/tools/testing/selftests/cachestat/Makefile
+++ b/tools/testing/selftests/cachestat/Makefile
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
TEST_GEN_PROGS := test_cachestat
+EXTRA_CLEAN := tmpshmcstat

CFLAGS += $(KHDR_INCLUDES)
CFLAGS += -Wall
--
2.51.0