From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Shuah Khan <shuah@kernel•org>
Cc: Muhammad Usama Anjum <usama.anjum@collabora•com>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>,
Mark Brown <broonie@kernel•org>,
Nathan Chancellor <nathan@kernel•org>,
Shuah Khan <skhan@linuxfoundation•org>,
Thomas Gleixner <tglx@linutronix•de>
Subject: linux-next: manual merge of the kselftest tree with Linus' tree
Date: Mon, 15 Apr 2024 14:39:01 +1000 [thread overview]
Message-ID: <20240415143901.578b3b4e@canb.auug.org.au> (raw)
[-- 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 --]
next reply other threads:[~2024-04-15 4:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-15 4:39 Stephen Rothwell [this message]
2024-04-16 23:56 ` linux-next: manual merge of the kselftest tree with Linus' tree Shuah Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240415143901.578b3b4e@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=broonie@kernel$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=nathan@kernel$(echo .)org \
--cc=shuah@kernel$(echo .)org \
--cc=skhan@linuxfoundation$(echo .)org \
--cc=tglx@linutronix$(echo .)de \
--cc=usama.anjum@collabora$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox