Re: [PATCH v4] selftests/mm: ksm-functional-tests: fix partial write handling

From: David Hildenbrand (Arm)

Date: Mon May 04 2026 - 09:02:39 EST


On 5/4/26 10:13, Vineet Agarwal wrote:
> Update write() checks to properly detect and handle partial writes.
>
> Previously, the write() calls used <= 0 to detect failure. This
> condition is never true for partial writes (ret > 0 but ret < len),
> so partial writes were silently treated as success.
>
> Fix this by verifying that write() returns the full expected length
> and treating any mismatch as failure.
>
> Signed-off-by: Vineet Agarwal <agarwal.vineet2006@xxxxxxxxx>
>

Thanks!

Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>

--
Cheers,

David