Re: [PATCH] selftests/mm: check file initialization writes in split_huge_page_test

From: Wei Yang

Date: Tue May 19 2026 - 21:50:05 EST


On Tue, May 19, 2026 at 12:18:13PM -0700, Andrew Morton wrote:
>On Tue, 19 May 2026 02:51:41 +0000 Wei Yang <richard.weiyang@xxxxxxxxx> wrote:
>
>> >Not understanding - cab you please describe more completely?
>> >
>>
>> I mean do this below.
>>
>> diff --git a/tools/testing/selftests/mm/split_huge_page_test.c b/tools/testing/selftests/mm/split_huge_page_test.c
>> index 460fa1f606fd..f30402ece608 100644
>> --- a/tools/testing/selftests/mm/split_huge_page_test.c
>> +++ b/tools/testing/selftests/mm/split_huge_page_test.c
>> @@ -469,7 +469,7 @@ static int create_pagecache_thp_and_fd(const char *testfile, size_t fd_size,
>> }
>> if (write(*fd, "3", 1) != 1) {
>> ksft_perror("write to drop_caches");
>> - goto err_out_unlink;
>> + goto err_out_close;
>> }
>> close(*fd);
>>
>> On error writing this fd, /proc/sys/vm/drop_caches, we forget to close it.
>
>Oh, OK, that's a buglet. Please send a formal fix sometime?

Sure, I am glad to.

--
Wei Yang
Help you, Help me