Skip to content
Commit 3b8e7f5c authored by Adam Sindelar's avatar Adam Sindelar Committed by akpm
Browse files

selftests/vm: fix errno handling in mrelease_test

mrelease_test should return KSFT_SKIP when process_mrelease is not
defined, but due to a perror call consuming the errno, it returns
KSFT_FAIL.

This patch decides the exit code before calling perror.

[adam@wowsignal.io: fix remaining instances of errno mishandling]
  Link: https://lkml.kernel.org/r/20220706141602.10159-1-adam@wowsignal.io
Link: https://lkml.kernel.org/r/20220704173351.19595-1-adam@wowsignal.io
Fixes: 33776141

 ("selftests: vm: add process_mrelease tests")
Signed-off-by: default avatarAdam Sindelar <adam@wowsignal.io>
Reviewed-by: default avatarDavid Vernet <void@manifault.com>
Reviewed-by: default avatarSuren Baghdasaryan <surenb@google.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent d6e103a7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment