proc: fix proc-empty-vm test with vsyscall
authorAlexey Dobriyan <adobriyan@gmail.com>
Fri, 27 Oct 2023 14:21:03 +0000 (17:21 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 1 Nov 2023 19:46:59 +0000 (12:46 -0700)
commit20e34aa7e08dbac5d7f757fea81fae8df462aa42
treea4474064e06009b22f73034553107dd40d09159d
parent639931020e1a70308a5c71f4702443429cb6899c
proc: fix proc-empty-vm test with vsyscall

* fix embarassing /proc/*/smaps test bug due to a typo in variable name
  it tested only the first line of the output if vsyscall is enabled:

   ffffffffff600000-ffffffffff601000 r-xp ...

  so test passed but tested only VMA location and permissions.

* add "KSM" entry, unnoticed because (1)

* swap "r-xp" and "--xp" vsyscall test strings,
  also unnoticed because (1)

Link: https://lkml.kernel.org/r/76f42cce-b1ab-45ec-b6b2-4c64f0dccb90@p183
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Tested-by: Swarup Laxman Kotikalapudi<swarupkotikalapudi@mail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/proc/proc-empty-vm.c