mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] selftests:proc add missing field KSM in smaps_rollup[] array
@ 2023-09-30 12:25 Swarup Laxman Kotiaklapudi
  2023-10-01 19:52 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Swarup Laxman Kotiaklapudi @ 2023-09-30 12:25 UTC (permalink / raw)
  To: shuah, akpm, hughd, linux-kernel, linux-fsdevel, linux-kselftest
  Cc: linux-kernel-mentees, swarupkotikalapudi

Missing field KSM is added in g_smaps_rollup[] array as it
fixes assert in function test_proc_pid_smaps_rollup()

Without this patchset test fails for "proc-empty-vm" as can be seen below:
$make TARGETS="proc" kselftest
...
  selftests: proc: proc-empty-vm
  proc-empty-vm: proc-empty-vm.c:299: test_proc_pid_smaps_rollup:
   Assertion `rv == sizeof(g_smaps_rollup) - 1' failed.
  /usr/bin/timeout: the monitored command dumped core
  Aborted
  not ok 5 selftests: proc: proc-empty-vm # exit=134
...

With this patchset test passes for "proc-empty-vm" as can be seen below:
$make TARGETS="proc" kselftest
....
timeout set to 45
selftests: proc: proc-empty-vm
ok 5 selftests: proc: proc-empty-vm
....

Signed-off-by: Swarup Laxman Kotiaklapudi <swarupkotikalapudi@gmail.com>
---
 tools/testing/selftests/proc/proc-empty-vm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/proc/proc-empty-vm.c b/tools/testing/selftests/proc/proc-empty-vm.c
index b16c13688b88..ee71ce52cb6a 100644
--- a/tools/testing/selftests/proc/proc-empty-vm.c
+++ b/tools/testing/selftests/proc/proc-empty-vm.c
@@ -267,6 +267,7 @@ static const char g_smaps_rollup[] =
 "Private_Dirty:         0 kB\n"
 "Referenced:            0 kB\n"
 "Anonymous:             0 kB\n"
+"KSM:                   0 kB\n"
 "LazyFree:              0 kB\n"
 "AnonHugePages:         0 kB\n"
 "ShmemPmdMapped:        0 kB\n"
-- 
2.34.1


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

* Re: [PATCH] selftests:proc add missing field KSM in smaps_rollup[] array
  2023-09-30 12:25 [PATCH] selftests:proc add missing field KSM in smaps_rollup[] array Swarup Laxman Kotiaklapudi
@ 2023-10-01 19:52 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2023-10-01 19:52 UTC (permalink / raw)
  To: Swarup Laxman Kotiaklapudi
  Cc: shuah, hughd, linux-kernel, linux-fsdevel, linux-kselftest,
	linux-kernel-mentees

On Sat, 30 Sep 2023 17:55:23 +0530 Swarup Laxman Kotiaklapudi <swarupkotikalapudi@gmail.com> wrote:

> Missing field KSM is added in g_smaps_rollup[] array as it
> fixes assert in function test_proc_pid_smaps_rollup()
> 
> Without this patchset test fails for "proc-empty-vm" as can be seen below:
> $make TARGETS="proc" kselftest
> ...
>   selftests: proc: proc-empty-vm
>   proc-empty-vm: proc-empty-vm.c:299: test_proc_pid_smaps_rollup:
>    Assertion `rv == sizeof(g_smaps_rollup) - 1' failed.
>   /usr/bin/timeout: the monitored command dumped core
>   Aborted
>   not ok 5 selftests: proc: proc-empty-vm # exit=134
> ...
> 
> With this patchset test passes for "proc-empty-vm" as can be seen below:
> $make TARGETS="proc" kselftest
> ....
> timeout set to 45
> selftests: proc: proc-empty-vm
> ok 5 selftests: proc: proc-empty-vm
> ....
> 

Thanks.  We fixed this in

commit 9d1be94df5acd486b157e85ffa53d344e5b17e22
Author: Alexey Dobriyan <adobriyan@gmail.com>
Date:   Thu Sep 7 14:10:12 2023 +0300

    selftests/proc: fixup proc-empty-vm test after KSM changes


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

end of thread, other threads:[~2023-10-01 19:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-30 12:25 [PATCH] selftests:proc add missing field KSM in smaps_rollup[] array Swarup Laxman Kotiaklapudi
2023-10-01 19:52 ` Andrew Morton

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

all inboxes | Powered by JetHome®