selftests/damon: test non-context inputs to rm_contexts file
authorSeongJae Park <sj@kernel.org>
Mon, 7 Nov 2022 16:50:01 +0000 (16:50 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 30 Nov 2022 23:58:47 +0000 (15:58 -0800)
commitd7ec8f421ade2817983963a106b0085cc478c17b
tree85fab93cae3b18ae14c414ad44b91309525fb04f
parentd8dd5e979d09c7463618853fb4aedd88e3efc8ae
selftests/damon: test non-context inputs to rm_contexts file

There was a bug[1] that triggered by writing non-context DAMON debugfs
file names to the 'rm_contexts' DAMON debugfs file.  Add a selftest for
the bug to avoid it happen again.

[1] https://lore.kernel.org/damon/000000000000ede3ac05ec4abf8e@google.com/

Link: https://lkml.kernel.org/r/20221107165001.5717-3-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/damon/Makefile
tools/testing/selftests/damon/debugfs_rm_non_contexts.sh [new file with mode: 0644]