From: "Mickaël Salaün" <mic@digikod.net>
To: linux-kernel@vger.kernel.org
Cc: "Mickaël Salaün" <mic@digikod.net>,
"Andy Lutomirski" <luto@amacapital.net>,
"Kees Cook" <keescook@chromium.org>,
"Shuah Khan" <shuah@kernel.org>, "Will Drewry" <wad@chromium.org>,
linux-kselftest@vger.kernel.org, linux-next@vger.kernel.org,
"Shuah Khan" <shuahkh@osg.samsung.com>
Subject: [PATCH v1 1/2] Revert "selftests: kselftest_harness: fix compile warnings"
Date: Sun, 11 Jun 2017 14:32:57 +0200 [thread overview]
Message-ID: <20170611123258.19624-2-mic@digikod.net> (raw)
In-Reply-To: <20170611123258.19624-1-mic@digikod.net>
This reverts commit f3380b7b8a72f435daceb49f7f7513f3ea2ce5ea.
The OPTIONAL_HANDLER macro, called by all ASSERT_* and EXPECT_* macros,
must support an optional error handler. This is done with an optional
block after the "for" loop.
This enable to pass 52/52 seccomp-bpf tests instead of 42/52.
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Kees Cook <keescook@chromium.org>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Will Drewry <wad@chromium.org>
---
tools/testing/selftests/kselftest_harness.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h
index 432245faeab3..c56f72e07cd7 100644
--- a/tools/testing/selftests/kselftest_harness.h
+++ b/tools/testing/selftests/kselftest_harness.h
@@ -555,8 +555,7 @@
* return while still providing an optional block to the API consumer.
*/
#define OPTIONAL_HANDLER(_assert) \
- for (; _metadata->trigger; _metadata->trigger = __bail(_assert)) \
- ;
+ for (; _metadata->trigger; _metadata->trigger = __bail(_assert))
#define __EXPECT(_expected, _seen, _t, _assert) do { \
/* Avoid multiple evaluation of the cases */ \
--
2.11.0
next prev parent reply other threads:[~2017-06-11 12:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-11 12:32 [PATCH v1 0/2] Fix kselftest_harness regression Mickaël Salaün
2017-06-11 12:32 ` Mickaël Salaün [this message]
2017-06-11 12:32 ` [PATCH v1 2/2] selftests: kselftest_harness: Fix compile warning Mickaël Salaün
2017-06-12 2:22 ` Kees Cook
2017-06-12 20:31 ` 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=20170611123258.19624-2-mic@digikod.net \
--to=mic@digikod.net \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=shuah@kernel.org \
--cc=shuahkh@osg.samsung.com \
--cc=wad@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).