]> www.infradead.org Git - users/willy/pagecache.git/commit
selftests/mm: vm_util: split up /proc/self/smaps parsing
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Tue, 14 Jan 2025 16:06:47 +0000 (17:06 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 26 Jan 2025 04:22:44 +0000 (20:22 -0800)
commit3c479b5dc60b297a9e327ac2734475c1d68b4443
treef9bc7111b6b99522878110a99fd128cfb39678b2
parentb2a79f62133aa687d8d966dd524192d9706bf3de
selftests/mm: vm_util: split up /proc/self/smaps parsing

Upcoming changes want to reuse the /proc/self/smaps parsing logic to parse
the VmFlags field.

As that works differently from the currently parsed HugePage counters,
split up the logic so common functionality can be shared.

While reworking this code, also use the correct sscanf placeholder for the
"uint64_t thp" variable.

Link: https://lkml.kernel.org/r/20250114-virtual_address_range-tests-v4-3-6fd7269934a5@linutronix.de
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Cc: Dev Jain <dev.jain@arm.com>
Cc: kernel test robot <oliver.sang@intel.com>
Cc: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/vm_util.c