[PATCH] selftests/futex: fix incorrect result reporting of futex_wait test item

Yuwen Chen posted 1 patch 3 days, 18 hours ago
.../selftests/futex/functional/futex_wait.c   | 64 ++++---------------
1 file changed, 14 insertions(+), 50 deletions(-)
[PATCH] selftests/futex: fix incorrect result reporting of futex_wait test item
Posted by Yuwen Chen 3 days, 18 hours ago
Convert the code to use EXPECT/ASSERT() variants, which ensures that the
overall test result is fail if one of the EXPECT()s fails.

Signed-off-by: Yuwen Chen <ywen.chen@foxmail.com>
---
 .../selftests/futex/functional/futex_wait.c   | 64 ++++---------------
 1 file changed, 14 insertions(+), 50 deletions(-)

diff --git a/tools/testing/selftests/futex/functional/futex_wait.c b/tools/testing/selftests/futex/functional/futex_wait.c
index 7b88794090071..4361809e669db 100644
--- a/tools/testing/selftests/futex/functional/futex_wait.c
+++ b/tools/testing/selftests/futex/functional/futex_wait.c
@@ -41,61 +41,39 @@ TEST(private_futex)
 	unsigned int flags = FUTEX_PRIVATE_FLAG;
 	u_int32_t f_private = 0;
 	pthread_t waiter;
-	int res;
 
 	futex = &f_private;
 
 	/* Testing a private futex */
-	ksft_print_dbg_msg("Calling private futex_wait on futex: %p\n", futex);
-	if (pthread_create(&waiter, NULL, waiterfn, (void *) &flags))
-		ksft_exit_fail_msg("pthread_create failed\n");
+	ASSERT_EQ(0, pthread_create(&waiter, NULL, waiterfn, (void *) &flags));
 
 	usleep(WAKE_WAIT_US);
 
-	ksft_print_dbg_msg("Calling private futex_wake on futex: %p\n", futex);
-	res = futex_wake(futex, 1, FUTEX_PRIVATE_FLAG);
-	if (res != 1) {
-		ksft_test_result_fail("futex_wake private returned: %d %s\n",
-				      errno, strerror(errno));
-	} else {
-		ksft_test_result_pass("futex_wake private succeeds\n");
-	}
+	EXPECT_EQ(1, futex_wake(futex, 1, FUTEX_PRIVATE_FLAG));
 }
 
 TEST(anon_page)
 {
 	u_int32_t *shared_data;
 	pthread_t waiter;
-	int res, shm_id;
+	int shm_id;
 
 	/* Testing an anon page shared memory */
 	shm_id = shmget(IPC_PRIVATE, 4096, IPC_CREAT | 0666);
-	if (shm_id < 0) {
-		if (errno == ENOSYS)
-			ksft_exit_skip("shmget syscall not supported\n");
-		perror("shmget");
-		exit(1);
-	}
+	if (shm_id < 0 && errno == ENOSYS)
+		SKIP(return, "shmget syscall not supported");
+	ASSERT_LE(0, shm_id);
 
 	shared_data = shmat(shm_id, NULL, 0);
 
 	*shared_data = 0;
 	futex = shared_data;
 
-	ksft_print_dbg_msg("Calling shared (page anon) futex_wait on futex: %p\n", futex);
-	if (pthread_create(&waiter, NULL, waiterfn, NULL))
-		ksft_exit_fail_msg("pthread_create failed\n");
+	ASSERT_EQ(0, pthread_create(&waiter, NULL, waiterfn, NULL));
 
 	usleep(WAKE_WAIT_US);
 
-	ksft_print_dbg_msg("Calling shared (page anon) futex_wake on futex: %p\n", futex);
-	res = futex_wake(futex, 1, 0);
-	if (res != 1) {
-		ksft_test_result_fail("futex_wake shared (page anon) returned: %d %s\n",
-				      errno, strerror(errno));
-	} else {
-		ksft_test_result_pass("futex_wake shared (page anon) succeeds\n");
-	}
+	EXPECT_EQ(1, futex_wake(futex, 1, 0));
 
 	shmdt(shared_data);
 }
@@ -104,39 +82,25 @@ TEST(file_backed)
 {
 	u_int32_t f_private = 0;
 	pthread_t waiter;
-	int res, fd;
+	int fd;
 	void *shm;
 
 	/* Testing a file backed shared memory */
-	fd = open(SHM_PATH, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
-	if (fd < 0)
-		ksft_exit_fail_msg("open\n");
-
-	if (ftruncate(fd, sizeof(f_private)))
-		ksft_exit_fail_msg("ftruncate\n");
+	ASSERT_LE(0, (fd = open(SHM_PATH, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR)));
+	ASSERT_EQ(0, ftruncate(fd, sizeof(f_private)));
 
 	shm = mmap(NULL, sizeof(f_private), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-	if (shm == MAP_FAILED)
-		ksft_exit_fail_msg("mmap\n");
+	ASSERT_NE(MAP_FAILED, shm);
 
 	memcpy(shm, &f_private, sizeof(f_private));
 
 	futex = shm;
 
-	ksft_print_dbg_msg("Calling shared (file backed) futex_wait on futex: %p\n", futex);
-	if (pthread_create(&waiter, NULL, waiterfn, NULL))
-		ksft_exit_fail_msg("pthread_create failed\n");
+	ASSERT_EQ(0, pthread_create(&waiter, NULL, waiterfn, NULL));
 
 	usleep(WAKE_WAIT_US);
 
-	ksft_print_dbg_msg("Calling shared (file backed) futex_wake on futex: %p\n", futex);
-	res = futex_wake(shm, 1, 0);
-	if (res != 1) {
-		ksft_test_result_fail("futex_wake shared (file backed) returned: %d %s\n",
-				      errno, strerror(errno));
-	} else {
-		ksft_test_result_pass("futex_wake shared (file backed) succeeds\n");
-	}
+	EXPECT_EQ(1, futex_wake(shm, 1, 0));
 
 	munmap(shm, sizeof(f_private));
 	remove(SHM_PATH);
-- 
2.34.1
Re: [PATCH] selftests/futex: fix incorrect result reporting of futex_wait test item
Posted by kernel test robot 2 days, 22 hours ago
Hi Yuwen,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tip/locking/core]
[also build test WARNING on linus/master v6.19-rc8 next-20260205]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Yuwen-Chen/selftests-futex-fix-incorrect-result-reporting-of-futex_wait-test-item/20260205-110734
base:   tip/locking/core
patch link:    https://lore.kernel.org/r/tencent_7D6D776D157570FF8C9FB9DE9D9FE5257C0A%40qq.com
patch subject: [PATCH] selftests/futex: fix incorrect result reporting of futex_wait test item
config: powerpc64-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260205/202602052333.1Bhrssu1-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project f43d6834093b19baf79beda8c0337ab020ac5f17)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260205/202602052333.1Bhrssu1-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602052333.1Bhrssu1-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from futex_wait.c:8:
   /usr/include/pthread.h:698:6: error: 'regparm' is not valid on this platform
     698 |      __cleanup_fct_attribute;
         |      ^~~~~~~~~~~~~~~~~~~~~~~
   /usr/include/bits/pthreadtypes-arch.h:52:50: note: expanded from macro '__cleanup_fct_attribute'
      52 | # define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
         |                                                  ^            ~
   In file included from futex_wait.c:8:
   /usr/include/pthread.h:710:3: error: 'regparm' is not valid on this platform
     710 |   __cleanup_fct_attribute;
         |   ^~~~~~~~~~~~~~~~~~~~~~~
   /usr/include/bits/pthreadtypes-arch.h:52:50: note: expanded from macro '__cleanup_fct_attribute'
      52 | # define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
         |                                                  ^            ~
   In file included from futex_wait.c:8:
   /usr/include/pthread.h:733:6: error: 'regparm' is not valid on this platform
     733 |      __cleanup_fct_attribute;
         |      ^~~~~~~~~~~~~~~~~~~~~~~
   /usr/include/bits/pthreadtypes-arch.h:52:50: note: expanded from macro '__cleanup_fct_attribute'
      52 | # define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
         |                                                  ^            ~
   In file included from futex_wait.c:8:
   /usr/include/pthread.h:746:3: error: 'regparm' is not valid on this platform
     746 |   __cleanup_fct_attribute;
         |   ^~~~~~~~~~~~~~~~~~~~~~~
   /usr/include/bits/pthreadtypes-arch.h:52:50: note: expanded from macro '__cleanup_fct_attribute'
      52 | # define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
         |                                                  ^            ~
   In file included from futex_wait.c:8:
   /usr/include/pthread.h:751:6: error: 'regparm' is not valid on this platform
     751 |      __cleanup_fct_attribute __attribute__ ((__noreturn__))
         |      ^~~~~~~~~~~~~~~~~~~~~~~
   /usr/include/bits/pthreadtypes-arch.h:52:50: note: expanded from macro '__cleanup_fct_attribute'
      52 | # define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
         |                                                  ^            ~
   In file included from futex_wait.c:14:
   In file included from ../../kselftest_harness.h:63:
   In file included from /usr/include/stdio.h:437:
   /usr/include/bits/floatn.h:97:9: error: __float128 is not supported on this target
      97 | typedef __float128 _Float128;
         |         ^
>> futex_wait.c:48:2: warning: format specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'uintmax_t' (aka 'unsigned long long') [-Wformat]
      48 |         ASSERT_EQ(0, pthread_create(&waiter, NULL, waiterfn, (void *) &flags));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:513:2: note: expanded from macro 'ASSERT_EQ'
     513 |         __EXPECT(expected, #expected, seen, #seen, ==, 1)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:767:21: note: expanded from macro '__EXPECT'
     766 |                         __TH_LOG("Expected %s (%ju) %s %s (%ju)", \
         |                                                ~~~
     767 |                                  _expected_str, __exp_print, #_t, \
         |                                                 ^~~~~~~~~~~
   ../../kselftest_harness.h:108:43: note: expanded from macro '__TH_LOG'
     107 |                 fprintf(TH_LOG_STREAM, "# %s:%d:%s:" fmt "\n", \
         |                                                      ~~~
     108 |                         __FILE__, __LINE__, _metadata->name, ##__VA_ARGS__)
         |                                                                ^~~~~~~~~~~
>> futex_wait.c:48:2: warning: format specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'uintmax_t' (aka 'unsigned long long') [-Wformat]
      48 |         ASSERT_EQ(0, pthread_create(&waiter, NULL, waiterfn, (void *) &flags));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:513:2: note: expanded from macro 'ASSERT_EQ'
     513 |         __EXPECT(expected, #expected, seen, #seen, ==, 1)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:768:17: note: expanded from macro '__EXPECT'
     766 |                         __TH_LOG("Expected %s (%ju) %s %s (%ju)", \
         |                                                            ~~~
     767 |                                  _expected_str, __exp_print, #_t, \
     768 |                                  _seen_str, __seen_print); \
         |                                             ^~~~~~~~~~~~
   ../../kselftest_harness.h:108:43: note: expanded from macro '__TH_LOG'
     107 |                 fprintf(TH_LOG_STREAM, "# %s:%d:%s:" fmt "\n", \
         |                                                      ~~~
     108 |                         __FILE__, __LINE__, _metadata->name, ##__VA_ARGS__)
         |                                                                ^~~~~~~~~~~
>> futex_wait.c:48:2: warning: format specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'uintmax_t' (aka 'unsigned long long') [-Wformat]
      48 |         ASSERT_EQ(0, pthread_create(&waiter, NULL, waiterfn, (void *) &flags));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:513:2: note: expanded from macro 'ASSERT_EQ'
     513 |         __EXPECT(expected, #expected, seen, #seen, ==, 1)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:775:21: note: expanded from macro '__EXPECT'
     774 |                         __TH_LOG("Expected %s (%ju) %s %s (%jd)", \
         |                                                ~~~
     775 |                                  _expected_str, __exp_print, #_t, \
         |                                                 ^~~~~~~~~~~
   ../../kselftest_harness.h:108:43: note: expanded from macro '__TH_LOG'
     107 |                 fprintf(TH_LOG_STREAM, "# %s:%d:%s:" fmt "\n", \
         |                                                      ~~~
     108 |                         __FILE__, __LINE__, _metadata->name, ##__VA_ARGS__)
         |                                                                ^~~~~~~~~~~
>> futex_wait.c:48:2: warning: format specifies type 'intmax_t' (aka 'long') but the argument has type 'intmax_t' (aka 'long long') [-Wformat]
      48 |         ASSERT_EQ(0, pthread_create(&waiter, NULL, waiterfn, (void *) &flags));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:513:2: note: expanded from macro 'ASSERT_EQ'
     513 |         __EXPECT(expected, #expected, seen, #seen, ==, 1)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:776:17: note: expanded from macro '__EXPECT'
     774 |                         __TH_LOG("Expected %s (%ju) %s %s (%jd)", \
         |                                                            ~~~
     775 |                                  _expected_str, __exp_print, #_t, \
     776 |                                  _seen_str, __seen_print); \
         |                                             ^~~~~~~~~~~~
   ../../kselftest_harness.h:108:43: note: expanded from macro '__TH_LOG'
     107 |                 fprintf(TH_LOG_STREAM, "# %s:%d:%s:" fmt "\n", \
         |                                                      ~~~
     108 |                         __FILE__, __LINE__, _metadata->name, ##__VA_ARGS__)
         |                                                                ^~~~~~~~~~~
>> futex_wait.c:48:2: warning: format specifies type 'intmax_t' (aka 'long') but the argument has type 'intmax_t' (aka 'long long') [-Wformat]
      48 |         ASSERT_EQ(0, pthread_create(&waiter, NULL, waiterfn, (void *) &flags));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:513:2: note: expanded from macro 'ASSERT_EQ'
     513 |         __EXPECT(expected, #expected, seen, #seen, ==, 1)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:783:21: note: expanded from macro '__EXPECT'
     782 |                         __TH_LOG("Expected %s (%jd) %s %s (%ju)", \
         |                                                ~~~
     783 |                                  _expected_str, __exp_print, #_t, \
         |                                                 ^~~~~~~~~~~
   ../../kselftest_harness.h:108:43: note: expanded from macro '__TH_LOG'
     107 |                 fprintf(TH_LOG_STREAM, "# %s:%d:%s:" fmt "\n", \
         |                                                      ~~~
     108 |                         __FILE__, __LINE__, _metadata->name, ##__VA_ARGS__)
         |                                                                ^~~~~~~~~~~
>> futex_wait.c:48:2: warning: format specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'uintmax_t' (aka 'unsigned long long') [-Wformat]
      48 |         ASSERT_EQ(0, pthread_create(&waiter, NULL, waiterfn, (void *) &flags));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:513:2: note: expanded from macro 'ASSERT_EQ'
     513 |         __EXPECT(expected, #expected, seen, #seen, ==, 1)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:784:17: note: expanded from macro '__EXPECT'
     782 |                         __TH_LOG("Expected %s (%jd) %s %s (%ju)", \
         |                                                            ~~~
     783 |                                  _expected_str, __exp_print, #_t, \
     784 |                                  _seen_str, __seen_print); \
         |                                             ^~~~~~~~~~~~
   ../../kselftest_harness.h:108:43: note: expanded from macro '__TH_LOG'
     107 |                 fprintf(TH_LOG_STREAM, "# %s:%d:%s:" fmt "\n", \
         |                                                      ~~~
     108 |                         __FILE__, __LINE__, _metadata->name, ##__VA_ARGS__)
         |                                                                ^~~~~~~~~~~
>> futex_wait.c:48:2: warning: format specifies type 'intmax_t' (aka 'long') but the argument has type 'intmax_t' (aka 'long long') [-Wformat]
      48 |         ASSERT_EQ(0, pthread_create(&waiter, NULL, waiterfn, (void *) &flags));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:513:2: note: expanded from macro 'ASSERT_EQ'
     513 |         __EXPECT(expected, #expected, seen, #seen, ==, 1)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:791:21: note: expanded from macro '__EXPECT'
     790 |                         __TH_LOG("Expected %s (%jd) %s %s (%jd)", \
         |                                                ~~~
     791 |                                  _expected_str, __exp_print, #_t, \
         |                                                 ^~~~~~~~~~~
   ../../kselftest_harness.h:108:43: note: expanded from macro '__TH_LOG'
     107 |                 fprintf(TH_LOG_STREAM, "# %s:%d:%s:" fmt "\n", \
         |                                                      ~~~
     108 |                         __FILE__, __LINE__, _metadata->name, ##__VA_ARGS__)
         |                                                                ^~~~~~~~~~~
>> futex_wait.c:48:2: warning: format specifies type 'intmax_t' (aka 'long') but the argument has type 'intmax_t' (aka 'long long') [-Wformat]
      48 |         ASSERT_EQ(0, pthread_create(&waiter, NULL, waiterfn, (void *) &flags));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:513:2: note: expanded from macro 'ASSERT_EQ'
     513 |         __EXPECT(expected, #expected, seen, #seen, ==, 1)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:792:17: note: expanded from macro '__EXPECT'
     790 |                         __TH_LOG("Expected %s (%jd) %s %s (%jd)", \
         |                                                            ~~~
     791 |                                  _expected_str, __exp_print, #_t, \
     792 |                                  _seen_str, __seen_print); \
         |                                             ^~~~~~~~~~~~
   ../../kselftest_harness.h:108:43: note: expanded from macro '__TH_LOG'
     107 |                 fprintf(TH_LOG_STREAM, "# %s:%d:%s:" fmt "\n", \
         |                                                      ~~~
     108 |                         __FILE__, __LINE__, _metadata->name, ##__VA_ARGS__)
         |                                                                ^~~~~~~~~~~
   futex_wait.c:52:2: warning: format specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'uintmax_t' (aka 'unsigned long long') [-Wformat]
      52 |         EXPECT_EQ(1, futex_wake(futex, 1, FUTEX_PRIVATE_FLAG));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:631:2: note: expanded from macro 'EXPECT_EQ'
     631 |         __EXPECT(expected, #expected, seen, #seen, ==, 0)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:767:21: note: expanded from macro '__EXPECT'
     766 |                         __TH_LOG("Expected %s (%ju) %s %s (%ju)", \
         |                                                ~~~
     767 |                                  _expected_str, __exp_print, #_t, \
         |                                                 ^~~~~~~~~~~
   ../../kselftest_harness.h:108:43: note: expanded from macro '__TH_LOG'
     107 |                 fprintf(TH_LOG_STREAM, "# %s:%d:%s:" fmt "\n", \
         |                                                      ~~~
     108 |                         __FILE__, __LINE__, _metadata->name, ##__VA_ARGS__)
         |                                                                ^~~~~~~~~~~
   futex_wait.c:52:2: warning: format specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'uintmax_t' (aka 'unsigned long long') [-Wformat]
      52 |         EXPECT_EQ(1, futex_wake(futex, 1, FUTEX_PRIVATE_FLAG));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:631:2: note: expanded from macro 'EXPECT_EQ'
     631 |         __EXPECT(expected, #expected, seen, #seen, ==, 0)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:768:17: note: expanded from macro '__EXPECT'
     766 |                         __TH_LOG("Expected %s (%ju) %s %s (%ju)", \
         |                                                            ~~~
     767 |                                  _expected_str, __exp_print, #_t, \
     768 |                                  _seen_str, __seen_print); \
         |                                             ^~~~~~~~~~~~
   ../../kselftest_harness.h:108:43: note: expanded from macro '__TH_LOG'
     107 |                 fprintf(TH_LOG_STREAM, "# %s:%d:%s:" fmt "\n", \
         |                                                      ~~~
     108 |                         __FILE__, __LINE__, _metadata->name, ##__VA_ARGS__)
         |                                                                ^~~~~~~~~~~
   futex_wait.c:52:2: warning: format specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'uintmax_t' (aka 'unsigned long long') [-Wformat]
      52 |         EXPECT_EQ(1, futex_wake(futex, 1, FUTEX_PRIVATE_FLAG));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:631:2: note: expanded from macro 'EXPECT_EQ'
     631 |         __EXPECT(expected, #expected, seen, #seen, ==, 0)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:775:21: note: expanded from macro '__EXPECT'
     774 |                         __TH_LOG("Expected %s (%ju) %s %s (%jd)", \
         |                                                ~~~
     775 |                                  _expected_str, __exp_print, #_t, \
         |                                                 ^~~~~~~~~~~
   ../../kselftest_harness.h:108:43: note: expanded from macro '__TH_LOG'
     107 |                 fprintf(TH_LOG_STREAM, "# %s:%d:%s:" fmt "\n", \
         |                                                      ~~~
     108 |                         __FILE__, __LINE__, _metadata->name, ##__VA_ARGS__)
         |                                                                ^~~~~~~~~~~
   futex_wait.c:52:2: warning: format specifies type 'intmax_t' (aka 'long') but the argument has type 'intmax_t' (aka 'long long') [-Wformat]
      52 |         EXPECT_EQ(1, futex_wake(futex, 1, FUTEX_PRIVATE_FLAG));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:631:2: note: expanded from macro 'EXPECT_EQ'
     631 |         __EXPECT(expected, #expected, seen, #seen, ==, 0)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:776:17: note: expanded from macro '__EXPECT'
     774 |                         __TH_LOG("Expected %s (%ju) %s %s (%jd)", \
         |                                                            ~~~
     775 |                                  _expected_str, __exp_print, #_t, \
     776 |                                  _seen_str, __seen_print); \
         |                                             ^~~~~~~~~~~~
   ../../kselftest_harness.h:108:43: note: expanded from macro '__TH_LOG'
     107 |                 fprintf(TH_LOG_STREAM, "# %s:%d:%s:" fmt "\n", \
         |                                                      ~~~
     108 |                         __FILE__, __LINE__, _metadata->name, ##__VA_ARGS__)
         |                                                                ^~~~~~~~~~~
   futex_wait.c:52:2: warning: format specifies type 'intmax_t' (aka 'long') but the argument has type 'intmax_t' (aka 'long long') [-Wformat]
      52 |         EXPECT_EQ(1, futex_wake(futex, 1, FUTEX_PRIVATE_FLAG));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:631:2: note: expanded from macro 'EXPECT_EQ'
     631 |         __EXPECT(expected, #expected, seen, #seen, ==, 0)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../kselftest_harness.h:783:21: note: expanded from macro '__EXPECT'
     782 |                         __TH_LOG("Expected %s (%jd) %s %s (%ju)", \
         |                                                ~~~
     783 |                                  _expected_str, __exp_print, #_t, \
         |                                                 ^~~~~~~~~~~
   ../../kselftest_harness.h:108:43: note: expanded from macro '__TH_LOG'
     107 |                 fprintf(TH_LOG_STREAM, "# %s:%d:%s:" fmt "\n", \
         |                                                      ~~~
     108 |                         __FILE__, __LINE__, _metadata->name, ##__VA_ARGS__)
         |                                                                ^~~~~~~~~~~
   futex_wait.c:52:2: warning: format specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'uintmax_t' (aka 'unsigned long long') [-Wformat]
      52 |         EXPECT_EQ(1, futex_wake(futex, 1, FUTEX_PRIVATE_FLAG));

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki