[PATCH 2/4] selftests/proc: expand smaps field coverage and require TMPFS
From: deepakraog
Date: Wed Jul 15 2026 - 11:02:55 EST
Gate the test on CONFIG_TMPFS in the selftest config file. Assert
Private_Clean, Private_Dirty, Swap, and SwapPss fields are present in
/proc/$PID/smaps output for the mapped executable page.
Signed-off-by: deepakraog <gaikwad.dcg@xxxxxxxxx>
---
tools/testing/selftests/proc/config | 1 +
tools/testing/selftests/proc/proc-pid-vm.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/proc/config b/tools/testing/selftests/proc/config
index 68fbd2b35..7dfc3d381 100644
--- a/tools/testing/selftests/proc/config
+++ b/tools/testing/selftests/proc/config
@@ -1 +1,2 @@
CONFIG_PROC_FS=y
+CONFIG_TMPFS=y
diff --git a/tools/testing/selftests/proc/proc-pid-vm.c b/tools/testing/selftests/proc/proc-pid-vm.c
index 4e6a3e53f..59535bb3a 100644
--- a/tools/testing/selftests/proc/proc-pid-vm.c
+++ b/tools/testing/selftests/proc/proc-pid-vm.c
@@ -20,7 +20,6 @@
* Test /proc/$PID/smaps_rollup
* Test /proc/$PID/statm
*
- * FIXME require CONFIG_TMPFS which can be disabled
* FIXME test other values from "smaps"
* FIXME support other archs
*/
@@ -409,6 +408,10 @@ int main(void)
"AnonHugePages: 0 kB\n",
"Shared_Hugetlb: 0 kB\n",
"Private_Hugetlb: 0 kB\n",
+ "Private_Clean: 4 kB\n",
+ "Private_Dirty: 0 kB\n",
+ "Swap: 0 kB\n",
+ "SwapPss: 0 kB\n",
"Locked: 0 kB\n",
};
int i;
--
Deepak Rao Gaikwad