On 4/25/22 1:37 PM, Shuah Khan wrote:
On 4/24/22 1:35 PM, David Rientjes wrote:
On Mon, 18 Apr 2022, Yuanchu Xie wrote:
Currently the damon selftests are not built with the rest of the
selftests. We add damon to the list of targets.
Fixes: b348eb7abd09 ("mm/damon: add user space selftests")
Reviewed-by: SeongJae Park <sj@xxxxxxxxxx>
Signed-off-by: Yuanchu Xie <yuanchu@xxxxxxxxxx>
Acked-by: David Rientjes <rientjes@xxxxxxxxxx>
Thank you. Applied to linux-kselftest next for 5.19-rc1.
The test builds with warnings. Would you like to fix these as
well?
make
gcc huge_count_read_write.c -o linux_5.18/tools/testing/selftests/damon/huge_count_read_write
huge_count_read_write.c: In function ‘write_read_with_huge_count’:
huge_count_read_write.c:23:9: warning: ‘write’ reading 4294967295 bytes from a region of size 1 [-Wstringop-overread]
23 | write(filedesc, "", 0xfffffffful);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from huge_count_read_write.c:8:
/usr/include/unistd.h:378:16: note: in a call to function ‘write’ declared with attribute ‘access (read_only, 2, 3)’
378 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
| ^~~~~
huge_count_read_write.c:25:15: warning: ‘read’ writing 4294967295 bytes into a region of size 25 overflows the destination [-Wstringop-overflow=]
25 | ret = read(filedesc, buf, 0xfffffffful);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
huge_count_read_write.c:14:14: note: destination object ‘buf’ of size 25
14 | char buf[25];
| ^~~
In file included from huge_count_read_write.c:8:
/usr/include/unistd.h:371:16: note: in a call to function ‘read’ declared with attribute ‘access (write_only, 2, 3)’
371 | extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur
| ^~~~
thanks,
-- Shuah