Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH 1/2] selftests/acct: add cleanup for leftover process_log binary
@ 2025-09-22  9:10 Madhur Kumar
  2025-09-22  9:10 ` [PATCH 2/2] selftests/cachestat: add cleanup for leftover tmpshmcstat binary Madhur Kumar
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Madhur Kumar @ 2025-09-22  9:10 UTC (permalink / raw)
  To: shuah; +Cc: linux-kernel, linux-kselftest, 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`.

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
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] selftests/cachestat: add cleanup for leftover tmpshmcstat binary
  2025-09-22  9:10 [PATCH 1/2] selftests/acct: add cleanup for leftover process_log binary Madhur Kumar
@ 2025-09-22  9:10 ` Madhur Kumar
  2025-09-25 19:35   ` Shuah Khan
  2025-09-24 23:24 ` [PATCH 1/2] selftests/acct: add cleanup for leftover process_log binary Shuah Khan
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Madhur Kumar @ 2025-09-22  9:10 UTC (permalink / raw)
  To: shuah; +Cc: linux-kernel, linux-kselftest, Madhur Kumar

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
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] selftests/acct: add cleanup for leftover process_log binary
  2025-09-22  9:10 [PATCH 1/2] selftests/acct: add cleanup for leftover process_log binary Madhur Kumar
  2025-09-22  9:10 ` [PATCH 2/2] selftests/cachestat: add cleanup for leftover tmpshmcstat binary Madhur Kumar
@ 2025-09-24 23:24 ` Shuah Khan
  2025-09-25  7:46   ` Madhur Kumar
  2025-09-25  8:34   ` [PATCH v2 " Madhur Kumar
  2025-09-26 21:26 ` [PATCH v3 " Madhur Kumar
  2025-09-27 16:11 ` [PATCH v2 2/2] selftests/cachestat: add cleanup for leftover tmpshmcstat file Madhur Kumar
  3 siblings, 2 replies; 9+ messages in thread
From: Shuah Khan @ 2025-09-24 23:24 UTC (permalink / raw)
  To: Madhur Kumar, shuah; +Cc: linux-kernel, linux-kselftest, Shuah Khan

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] selftests/acct: add cleanup for leftover process_log binary
  2025-09-24 23:24 ` [PATCH 1/2] selftests/acct: add cleanup for leftover process_log binary Shuah Khan
@ 2025-09-25  7:46   ` Madhur Kumar
  2025-09-25  8:34   ` [PATCH v2 " Madhur Kumar
  1 sibling, 0 replies; 9+ messages in thread
From: Madhur Kumar @ 2025-09-25  7:46 UTC (permalink / raw)
  To: skhan; +Cc: linux-kernel, linux-kselftest, madhurkumar004, 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/2] selftests/acct: add cleanup for leftover process_log binary
  2025-09-24 23:24 ` [PATCH 1/2] selftests/acct: add cleanup for leftover process_log binary Shuah Khan
  2025-09-25  7:46   ` Madhur Kumar
@ 2025-09-25  8:34   ` Madhur Kumar
  2025-09-25 19:23     ` Shuah Khan
  1 sibling, 1 reply; 9+ messages in thread
From: Madhur Kumar @ 2025-09-25  8:34 UTC (permalink / raw)
  To: skhan; +Cc: linux-kernel, linux-kselftest, madhurkumar004, shuah

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
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 1/2] selftests/acct: add cleanup for leftover process_log binary
  2025-09-25  8:34   ` [PATCH v2 " Madhur Kumar
@ 2025-09-25 19:23     ` Shuah Khan
  0 siblings, 0 replies; 9+ messages in thread
From: Shuah Khan @ 2025-09-25 19:23 UTC (permalink / raw)
  To: Madhur Kumar; +Cc: linux-kernel, linux-kselftest, shuah, Shuah Khan

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] selftests/cachestat: add cleanup for leftover tmpshmcstat binary
  2025-09-22  9:10 ` [PATCH 2/2] selftests/cachestat: add cleanup for leftover tmpshmcstat binary Madhur Kumar
@ 2025-09-25 19:35   ` Shuah Khan
  0 siblings, 0 replies; 9+ messages in thread
From: Shuah Khan @ 2025-09-25 19:35 UTC (permalink / raw)
  To: Madhur Kumar, shuah; +Cc: linux-kernel, linux-kselftest

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v3 1/2] selftests/acct: add cleanup for leftover process_log binary
  2025-09-22  9:10 [PATCH 1/2] selftests/acct: add cleanup for leftover process_log binary Madhur Kumar
  2025-09-22  9:10 ` [PATCH 2/2] selftests/cachestat: add cleanup for leftover tmpshmcstat binary Madhur Kumar
  2025-09-24 23:24 ` [PATCH 1/2] selftests/acct: add cleanup for leftover process_log binary Shuah Khan
@ 2025-09-26 21:26 ` Madhur Kumar
  2025-09-27 16:11 ` [PATCH v2 2/2] selftests/cachestat: add cleanup for leftover tmpshmcstat file Madhur Kumar
  3 siblings, 0 replies; 9+ messages in thread
From: Madhur Kumar @ 2025-09-26 21:26 UTC (permalink / raw)
  To: shuah; +Cc: linux-kernel, linux-kselftest, Madhur Kumar

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
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 2/2] selftests/cachestat: add cleanup for leftover tmpshmcstat file
  2025-09-22  9:10 [PATCH 1/2] selftests/acct: add cleanup for leftover process_log binary Madhur Kumar
                   ` (2 preceding siblings ...)
  2025-09-26 21:26 ` [PATCH v3 " Madhur Kumar
@ 2025-09-27 16:11 ` Madhur Kumar
  3 siblings, 0 replies; 9+ messages in thread
From: Madhur Kumar @ 2025-09-27 16:11 UTC (permalink / raw)
  To: shuah; +Cc: linux-kernel, linux-kselftest, Madhur Kumar

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
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-09-27 16:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-22  9:10 [PATCH 1/2] selftests/acct: add cleanup for leftover process_log binary Madhur Kumar
2025-09-22  9:10 ` [PATCH 2/2] selftests/cachestat: add cleanup for leftover tmpshmcstat binary Madhur Kumar
2025-09-25 19:35   ` Shuah Khan
2025-09-24 23:24 ` [PATCH 1/2] selftests/acct: add cleanup for leftover process_log binary Shuah Khan
2025-09-25  7:46   ` Madhur Kumar
2025-09-25  8:34   ` [PATCH v2 " Madhur Kumar
2025-09-25 19:23     ` Shuah Khan
2025-09-26 21:26 ` [PATCH v3 " Madhur Kumar
2025-09-27 16:11 ` [PATCH v2 2/2] selftests/cachestat: add cleanup for leftover tmpshmcstat file Madhur Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox