lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240415143901.578b3b4e@canb.auug.org.au>
Date: Mon, 15 Apr 2024 14:39:01 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Shuah Khan <shuah@...nel.org>
Cc: Muhammad Usama Anjum <usama.anjum@...labora.com>, Linux Kernel Mailing
 List <linux-kernel@...r.kernel.org>, Linux Next Mailing List
 <linux-next@...r.kernel.org>, Mark Brown <broonie@...nel.org>, Nathan
 Chancellor <nathan@...nel.org>, Shuah Khan <skhan@...uxfoundation.org>,
 Thomas Gleixner <tglx@...utronix.de>
Subject: linux-next: manual merge of the kselftest tree with Linus' tree

Hi all,

Today's linux-next merge of the kselftest tree got a conflict in:

  tools/testing/selftests/kselftest.h

between commit:

  f7d5bcd35d42 ("selftests: kselftest: Mark functions that unconditionally call exit() as __noreturn")

from Linus' tree and commit:

  5d3a9274f0d1 ("kselftest: Add mechanism for reporting a KSFT_ result code")
  f07041728422 ("selftests: add ksft_exit_fail_perror()")

from the kselftest tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc tools/testing/selftests/kselftest.h
index 7b89362da4bf,2cd93d220f43..000000000000
--- a/tools/testing/selftests/kselftest.h
+++ b/tools/testing/selftests/kselftest.h
@@@ -303,7 -302,28 +306,28 @@@ void ksft_test_result_code(int exit_cod
  	va_end(args);
  }
  
+ /**
+  * ksft_test_result() - Report test success based on truth of condition
+  *
+  * @condition: if true, report test success, otherwise failure.
+  */
+ #define ksft_test_result_report(result, fmt, ...) do {		\
+ 	switch (result) {					\
+ 	case KSFT_PASS:						\
+ 		ksft_test_result_pass(fmt, ##__VA_ARGS__);	\
+ 		break;						\
+ 	case KSFT_FAIL:						\
+ 		ksft_test_result_fail(fmt, ##__VA_ARGS__);	\
+ 		break;						\
+ 	case KSFT_XFAIL:					\
+ 		ksft_test_result_xfail(fmt, ##__VA_ARGS__);	\
+ 		break;						\
+ 	case KSFT_SKIP:						\
+ 		ksft_test_result_skip(fmt, ##__VA_ARGS__);	\
+ 		break;						\
+ 	} } while (0)
+ 
 -static inline int ksft_exit_pass(void)
 +static inline __noreturn int ksft_exit_pass(void)
  {
  	ksft_print_cnts();
  	exit(KSFT_PASS);
@@@ -351,7 -371,20 +375,20 @@@ static inline __noreturn __printf(1, 2
  	exit(KSFT_FAIL);
  }
  
+ static inline void ksft_exit_fail_perror(const char *msg)
+ {
+ #ifndef NOLIBC
+ 	ksft_exit_fail_msg("%s: %s (%d)\n", msg, strerror(errno), errno);
+ #else
+ 	/*
+ 	 * nolibc doesn't provide strerror() and it seems
+ 	 * inappropriate to add one, just print the errno.
+ 	 */
+ 	ksft_exit_fail_msg("%s: %d)\n", msg, errno);
+ #endif
+ }
+ 
 -static inline int ksft_exit_xfail(void)
 +static inline __noreturn int ksft_exit_xfail(void)
  {
  	ksft_print_cnts();
  	exit(KSFT_XFAIL);

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ