]> www.infradead.org Git - users/hch/misc.git/commit
selftests/damon/huge_count_read_write: provide sufficiently large buffer for DEPRECAT...
authorAndrew Paniakin <apanyaki@amazon.com>
Mon, 28 Oct 2024 23:30:53 +0000 (16:30 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 7 Nov 2024 22:38:08 +0000 (14:38 -0800)
commit45488345d4b60f5c3a0a5d78fee76f0f3be896b4
tree6c7b2d6da9990084b5e22ecad2c82f76266cf4f4
parent2b1d55498b67ef59bd461236306fa24ae79878e5
selftests/damon/huge_count_read_write: provide sufficiently large buffer for DEPRECATED file read

Patch series "damon/{self,kunit}tests: minor fixups for DAMON debugfs
interface tests".

Fixup small broken window panes in DAMON selftests and kunit tests.

First four patches clean up DAMON debugfs interface selftests output, by
fixing segmentation fault of a test program (patch 1), removing
unnecessary debugging messages (patch 2), and hiding error messages from
expected failures (patches 3 and 4).

Following two patches fix copy-paste mistakes in DAMON Kconfig help
message that copied from debugfs kunit test (patch 5) and a comment on the
debugfs kunit test code (patch 6).

This patch (of 6):

'huge_count_read_write' crashes with segmentation fault when reading
DEPRECATED file of DAMON debugfs interface.  This is not causing any
problem for users or other tests because the purpose of the test is just
ensuring the read is not causing kernel warning messages.  Nonetheless, it
makes the output unnecessarily noisy, and the DEPRECATED file is not
properly being tested.

It happens because the size of the content of the file is larger than the
size of the buffer for the read.  The file contains about 170 characters.
Increase the buffer size to 256 characters.

Link: https://lkml.kernel.org/r/20241028233058.283381-1-sj@kernel.org
Link: https://lkml.kernel.org/r/20241028233058.283381-2-sj@kernel.org
Fixes: b4a002889d24 ("selftests/damon: test debugfs file reads/writes with huge count")
Signed-off-by: Andrew Paniakin <apanyaki@amazon.com>
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Andrew Panyakin <apanyaki@amazon.com>
Cc: Brendan Higgins <brendan.higgins@linux.dev>
Cc: David Gow <davidgow@google.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/damon/huge_count_read_write.c