[PATCH v2 2/3] test: expand proc smaps coverage and require TMPFS

From: deepakroag

Date: Thu Jul 16 2026 - 07:58:00 EST


Add CONFIG_TMPFS to the selftest config. Assert Private_Clean,
Private_Dirty, Swap, and SwapPss fields in /proc/$PID/smaps output.

Signed-off-by: deepakroag <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