]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests/landlock: Fix error message
authorMickaël Salaün <mic@digikod.net>
Wed, 8 Jan 2025 15:43:28 +0000 (16:43 +0100)
committerMickaël Salaün <mic@digikod.net>
Fri, 17 Jan 2025 18:05:37 +0000 (19:05 +0100)
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>
tools/testing/selftests/landlock/fs_test.c

index 42ce1e79ba8284598ee85450ecaab33d497f91df..a359c0d3107f2dc907d4df12c63ccaa223bacb5a 100644 (file)
@@ -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);
        };
 }