linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the kselftest tree with Linus' tree
@ 2024-04-15  4:39 Stephen Rothwell
  2024-04-16 23:56 ` Shuah Khan
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2024-04-15  4:39 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Muhammad Usama Anjum, Linux Kernel Mailing List,
	Linux Next Mailing List, Mark Brown, Nathan Chancellor,
	Shuah Khan, Thomas Gleixner

[-- Attachment #1: Type: text/plain, Size: 2541 bytes --]

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);

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: linux-next: manual merge of the kselftest tree with Linus' tree
  2024-04-15  4:39 linux-next: manual merge of the kselftest tree with Linus' tree Stephen Rothwell
@ 2024-04-16 23:56 ` Shuah Khan
  0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2024-04-16 23:56 UTC (permalink / raw)
  To: Stephen Rothwell, Shuah Khan
  Cc: Muhammad Usama Anjum, Linux Kernel Mailing List,
	Linux Next Mailing List, Mark Brown, Nathan Chancellor,
	Thomas Gleixner, Shuah Khan

On 4/14/24 22:39, Stephen Rothwell wrote:
> 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.
> 

Rebased to Linux 6.9-rc4 and resolved these two merge conflicts
in linux-kselftest next.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-16 23:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-15  4:39 linux-next: manual merge of the kselftest tree with Linus' tree Stephen Rothwell
2024-04-16 23:56 ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).