]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/mm/mlock: print error on failure
authorBrendan Jackman <jackmanb@google.com>
Tue, 11 Mar 2025 13:18:23 +0000 (13:18 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 17 Mar 2025 05:06:40 +0000 (22:06 -0700)
commit1ddae9d67ee11886f9a35b78ad837eb26559e9ab
tree48fbaded929dba6e5d291fff0f35564718d55aba
parent5d2146a3354f8eeb1f9f9581ee9a40e0a9d2c714
selftests/mm/mlock: print error on failure

It's not really possible to start diagnosing this without knowing the
actual error.

Also update the mlock2 helper to behave like libc would by setting errno
and returning -1.

Link: https://lkml.kernel.org/r/20250311-mm-selftests-v4-12-dec210a658f5@google.com
Signed-off-by: Brendan Jackman <jackmanb@google.com>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Mateusz Guzik <mjguzik@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/mlock-random-test.c
tools/testing/selftests/mm/mlock2.h