Some kselftests generate temporary binaries that are not tracked by TEST_GEN_PROGS. Add EXTRA_CLEAN entry to remove process_log during `make kselftest-clean`.
Signed-off-by: Madhur Kumar madhurkumar004@gmail.com --- tools/testing/selftests/acct/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/acct/Makefile b/tools/testing/selftests/acct/Makefile index 7e025099cf65..16eb97079e63 100644 --- a/tools/testing/selftests/acct/Makefile +++ b/tools/testing/selftests/acct/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 TEST_GEN_PROGS := acct_syscall CFLAGS += -Wall +EXTRA_CLEAN := process_log
-include ../lib.mk \ No newline at end of file +include ../lib.mk
Some kselftests generate temporary binaries that are not tracked by TEST_GEN_PROGS. Add EXTRA_CLEAN entry to remove tmpshmcstat during `make kselftest-clean`.
Signed-off-by: Madhur Kumar madhurkumar004@gmail.com --- 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
On 9/22/25 03:10, Madhur Kumar wrote:
Some kselftests generate temporary binaries that are not tracked by TEST_GEN_PROGS. Add EXTRA_CLEAN entry to remove tmpshmcstat during `make kselftest-clean`.
This isn't really accurate. tmpshmcstat is generated when when test runs. Include this information in the change log and send new version of this patch.
Signed-off-by: Madhur Kumar madhurkumar004@gmail.com
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
thanks, -- Shuah
On 9/22/25 03:10, Madhur Kumar wrote:
Some kselftests generate temporary binaries that are not tracked by TEST_GEN_PROGS. Add EXTRA_CLEAN entry to remove process_log during `make kselftest-clean`.
Signed-off-by: Madhur Kumar madhurkumar004@gmail.com
tools/testing/selftests/acct/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/acct/Makefile b/tools/testing/selftests/acct/Makefile index 7e025099cf65..16eb97079e63 100644 --- a/tools/testing/selftests/acct/Makefile +++ b/tools/testing/selftests/acct/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 TEST_GEN_PROGS := acct_syscall CFLAGS += -Wall +EXTRA_CLEAN := process_log -include ../lib.mk \ No newline at end of file
+include ../lib.mk
Why is this deleted and added back
Please fix the patch and send v2.
thanks, -- Shuah
From: Madhur Kumar madhurkumar004@gmail.com To: Shuah Khan skhan@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, shuah@kernel.org Subject: Re: [PATCH 1/2] selftests/acct: add cleanup for leftover process_log binary In-Reply-To: d8df684e-0c09-44ea-87a4-cdbaf65ab0b8@linuxfoundation.org
Hi Shuah,
Addition and deletion of the line happens due to the newline at the end of file. Code unchanged otherwise.
Regards, Madhur Kumar
Some kselftests generate temporary binaries that are not tracked by TEST_GEN_PROGS. Add EXTRA_CLEAN entry to remove process_log during `make kselftest-clean`.
v2: - Fix newline issue at end of Makefile (caused add/delete in git diff) - Code otherwise unchanged
Signed-off-by: Madhur Kumar madhurkumar004@gmail.com --- tools/testing/selftests/acct/Makefile | 1 + 1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/acct/Makefile b/tools/testing/selftests/acct/Makefile index 7e025099cf65..fd14128bbddb 100644 --- a/tools/testing/selftests/acct/Makefile +++ b/tools/testing/selftests/acct/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 TEST_GEN_PROGS := acct_syscall CFLAGS += -Wall +EXTRA_CLEAN := process_log
include ../lib.mk \ No newline at end of file
On 9/25/25 02:34, Madhur Kumar wrote:
Some kselftests generate temporary binaries that are not tracked by TEST_GEN_PROGS. Add EXTRA_CLEAN entry to remove process_log during `make kselftest-clean`.
This information below doesn't belong in the change log
v2:
- Fix newline issue at end of Makefile (caused add/delete in git diff)
- Code otherwise unchanged
Signed-off-by: Madhur Kumar madhurkumar004@gmail.com
Add patch version information here.
tools/testing/selftests/acct/Makefile | 1 + 1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/acct/Makefile b/tools/testing/selftests/acct/Makefile index 7e025099cf65..fd14128bbddb 100644 --- a/tools/testing/selftests/acct/Makefile +++ b/tools/testing/selftests/acct/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 TEST_GEN_PROGS := acct_syscall CFLAGS += -Wall +EXTRA_CLEAN := process_log include ../lib.mk
This line below is still odd.
\ No newline at end of file
Start without any changes, make the change, commit, and send v3. Refer to a few patches on the mailing list for examples on where the patch version information should be added.
thanks, -- Shuah
The acct_syscall test generates a process_log binary after it runs, but this file is not removed by 'make kselftest-clean'. Add an EXTRA_CLEAN entry to ensure the binary gets cleaned up properly.
Signed-off-by: Madhur Kumar madhurkumar004@gmail.com ---
v3: - refined changed log wording - Removed patch version info from commit log (kept only problem/fix).
v2: - Fix newline issue at end of Makefile (caused add/delete in git diff) - Code otherwise unchanged --- tools/testing/selftests/acct/Makefile | 1 + 1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/acct/Makefile b/tools/testing/selftests/acct/Makefile index 7e025099cf65..fd14128bbddb 100644 --- a/tools/testing/selftests/acct/Makefile +++ b/tools/testing/selftests/acct/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 TEST_GEN_PROGS := acct_syscall CFLAGS += -Wall +EXTRA_CLEAN := process_log
include ../lib.mk \ No newline at end of file
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@gmail.com ---
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
linux-kselftest-mirror@lists.linaro.org