selftests/landlock: Fix error message
BugLink: https://bugs.launchpad.net/bugs/2111953
[ 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: e1199815b4 ("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>
Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com>
Signed-off-by: Mehmet Basaran <mehmet.basaran@canonical.com>
This commit is contained in:
committed by
Mehmet Basaran
parent
cf20a3e3c6
commit
fc740756d9
@@ -1971,8 +1971,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);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user