Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1663099

[PATCH v1 1/2] Revert "selftests: kselftest_harness: fix compile warnings"

From Mickaël Salaün <mic@digikod.net>
Newsgroups linux.kernel
Subject [PATCH v1 1/2] Revert "selftests: kselftest_harness: fix compile warnings"
Date 2017-06-11 14:40 +0200
Message-ID <tRajT-54m-1@gated-at.bofh.it> (permalink)
References <tRajT-54m-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v1 0/2] Fix kselftest_harness regression Mickaël Salaün <mic@digikod.net> - 2017-06-11 14:40 +0200
  [PATCH v1 1/2] Revert "selftests: kselftest_harness: fix compile warnings" Mickaël Salaün <mic@digikod.net> - 2017-06-11 14:40 +0200
  [PATCH v1 2/2] selftests: kselftest_harness: Fix compile warning Mickaël Salaün <mic@digikod.net> - 2017-06-11 14:40 +0200
    Re: [PATCH v1 2/2] selftests: kselftest_harness: Fix compile warning Kees Cook <keescook@chromium.org> - 2017-06-12 04:30 +0200
      Re: [PATCH v1 2/2] selftests: kselftest_harness: Fix compile warning Shuah Khan <shuah@kernel.org> - 2017-06-12 22:40 +0200

csiph-web