summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMickaël Salaün <mic@digikod.net>2025-01-08 16:43:28 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-08 09:52:02 +0100
commit627f67b6d0999361abcfd5514f731070da93f6fd (patch)
treea91be4591b7dd0e44127d904a462f1a3c6580e72 /tools
parentc7efca80bdecaff7aac710a0cd508670181e0366 (diff)
downloadlinux-627f67b6d0999361abcfd5514f731070da93f6fd.tar.gz
linux-627f67b6d0999361abcfd5514f731070da93f6fd.tar.bz2
linux-627f67b6d0999361abcfd5514f731070da93f6fd.zip
selftests/landlock: Fix error message
[ Upstream commit 2107c35128ad751b201eb92fe91443450d9e5c37 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-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 720bafa0f87b..c239838c796a 100644
--- a/tools/testing/selftests/landlock/fs_test.c
+++ b/tools/testing/selftests/landlock/fs_test.c
@@ -1861,8 +1861,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);
};
}