Skip to content

Commit 2107c35

Browse files
committed
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: e119981 ("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>
1 parent d617f0d commit 2107c35

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tools/testing/selftests/landlock/fs_test.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,8 +2011,7 @@ static void test_execute(struct __test_metadata *const _metadata, const int err,
20112011
ASSERT_EQ(1, WIFEXITED(status));
20122012
ASSERT_EQ(err ? 2 : 0, WEXITSTATUS(status))
20132013
{
2014-
TH_LOG("Unexpected return code for \"%s\": %s", path,
2015-
strerror(errno));
2014+
TH_LOG("Unexpected return code for \"%s\"", path);
20162015
};
20172016
}
20182017

0 commit comments

Comments
 (0)