summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMickaël Salaün <mic@digikod.net>2025-01-08 18:43:28 +0300
committerMickaël Salaün <mic@digikod.net>2025-01-17 21:05:37 +0300
commit2107c35128ad751b201eb92fe91443450d9e5c37 (patch)
tree0c92cd49d06c26e6a3862772d7f55e2dafdfedb9
parentd617f0d72d8041c7099fd04a62db0f0fa5331c1a (diff)
downloadlinux-2107c35128ad751b201eb92fe91443450d9e5c37.tar.xz
selftests/landlock: Fix error message
The global variable errno may not be set in test_execute(). Do not use it in related error message. Cc: Günther Noack <gnoack@google.com> Fixes: e1199815b47b ("selftests/landlock: Add user space tests") Link: https://lore.kernel.org/r/20250108154338.1129069-21-mic@digikod.net Signed-off-by: Mickaël Salaün <mic@digikod.net>
-rw-r--r--tools/testing/selftests/landlock/fs_test.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/selftests/landlock/fs_test.c b/tools/testing/selftests/landlock/fs_test.c
index 42ce1e79ba82..a359c0d3107f 100644
--- a/tools/testing/selftests/landlock/fs_test.c
+++ b/tools/testing/selftests/landlock/fs_test.c
@@ -2011,8 +2011,7 @@ static void test_execute(struct __test_metadata *const _metadata, const int err,
ASSERT_EQ(1, WIFEXITED(status));
ASSERT_EQ(err ? 2 : 0, WEXITSTATUS(status))
{
- TH_LOG("Unexpected return code for \"%s\": %s", path,
- strerror(errno));
+ TH_LOG("Unexpected return code for \"%s\"", path);
};
}