kselftests: cgroup: update kmem test for new vmstat implementation
authorJohannes Weiner <hannes@cmpxchg.org>
Fri, 30 Apr 2021 05:56:33 +0000 (22:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 30 Apr 2021 18:20:38 +0000 (11:20 -0700)
commit4bbcc5a41c5449f6a67edb3fbc2dccae9c6724db
tree5d83c7d6abc40ff6a9bf1c70b1157b634a67afcd
parent2cd21c89800c2203331e5564df2155757ded2e86
kselftests: cgroup: update kmem test for new vmstat implementation

With memcg having switched to rstat, memory.stat output is precise.
Update the cgroup selftest to reflect the expectations and error
tolerances of the new implementation.

Also add newly tracked types of memory to the memory.stat side of the
equation, since they're included in memory.current and could throw false
positives.

Link: https://lkml.kernel.org/r/20210209163304.77088-9-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Reviewed-by: Michal Koutný <mkoutny@suse.com>
Acked-by: Roman Gushchin <guro@fb.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
tools/testing/selftests/cgroup/test_kmem.c