Re: [PATCH v7 1/6] selftests/mm: make file helpers return errors

From: Mike Rapoport

Date: Mon Aug 24 2026 - 03:59:33 EST


On Thu, 13 Aug 2026 23:42:25 +0530, Sarthak Sharma <sarthak.sharma@xxxxxxx> wrote:
> Change read_file(), write_file(), read_num(), write_num() and
> write_num_ignore_einval() in vm_util.c to report failures to callers
> instead of exiting from the helper.
>
> Make read_file() return a negative errno on failure and 0 on success, so
> callers can distinguish a successful read from an I/O error. Also make
> read_num() reject negative and malformed values.
>
> [...]

Acked-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>

--
Sincerely yours,
Mike.