]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests/eventfd: correct test name and improve messages
authorRyan Chung <seokwoo.chung130@gmail.com>
Tue, 13 May 2025 07:44:11 +0000 (16:44 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 22 May 2025 21:55:38 +0000 (14:55 -0700)
- Rename test from eventfd_chek_flag_cloexec_and_nonblock to
eventfd_check_flag_cloexec_and_nonblock.

- Make the RDWR‐flag comment declarative:
  “The kernel automatically adds the O_RDWR flag.”
- Update semaphore‐flag failure message to:
  “eventfd semaphore flag check failed: …”

Link: https://lkml.kernel.org/r/20250513074411.6965-1-seokwoo.chung130@gmail.com
Signed-off-by: Ryan Chung <seokwoo.chung130@gmail.com>
Reviewed-by: Wen Yang <wen.yang@linux.dev>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/filesystems/eventfd/eventfd_test.c

index 85acb4e3ef0086fae3ce48d53d40a080446e0270..72d51ad0ee0ed498df6a6e2de022b63d44acb3e8 100644 (file)
@@ -50,7 +50,7 @@ TEST(eventfd_check_flag_rdwr)
        ASSERT_GE(fd, 0);
 
        flags = fcntl(fd, F_GETFL);
-       // since the kernel automatically added O_RDWR.
+       // The kernel automatically adds the O_RDWR flag.
        EXPECT_EQ(flags, O_RDWR);
 
        close(fd);
@@ -85,7 +85,7 @@ TEST(eventfd_check_flag_nonblock)
        close(fd);
 }
 
-TEST(eventfd_chek_flag_cloexec_and_nonblock)
+TEST(eventfd_check_flag_cloexec_and_nonblock)
 {
        int fd, flags;
 
@@ -178,8 +178,7 @@ TEST(eventfd_check_flag_semaphore)
        // The semaphore could only be obtained from fdinfo.
        ret = verify_fdinfo(fd, &err, "eventfd-semaphore: ", 19, "1\n");
        if (ret != 0)
-               ksft_print_msg("eventfd-semaphore check failed, msg: %s\n",
-                               err.msg);
+               ksft_print_msg("eventfd semaphore flag check failed: %s\n", err.msg);
        EXPECT_EQ(ret, 0);
 
        close(fd);