From patchwork Sun Jan 27 09:42:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 10782741 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C2B7513B4 for ; Sun, 27 Jan 2019 09:44:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A23A92880C for ; Sun, 27 Jan 2019 09:44:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D49628825; Sun, 27 Jan 2019 09:44:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0DA332880C for ; Sun, 27 Jan 2019 09:43:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726453AbfA0Jmz (ORCPT ); Sun, 27 Jan 2019 04:42:55 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:46335 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726441AbfA0Jmz (ORCPT ); Sun, 27 Jan 2019 04:42:55 -0500 Received: by mail-pl1-f193.google.com with SMTP id t13so6430731ply.13 for ; Sun, 27 Jan 2019 01:42:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=se7BxVIyNFcNpVxegQ8rA3stfJpqK+Q8feAKjvC+8o8=; b=cCxh0pjZt9JNQXMBF5JTAvFYt3iSLnEzcEUVGy4QWwYqbJV5FZYk/3PGZXUxoW0I9S zfE2jg2eOo5IhLlq/G8ifY17KIxU9WIAizu5OANSyrZIyBQLvy7pP9+nONOr/ItliSvZ ekjYh+soAYoCLJP44Uy6ogtlaM6/YiTCnw4vo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=se7BxVIyNFcNpVxegQ8rA3stfJpqK+Q8feAKjvC+8o8=; b=WQC04A4adgy/jj3LCZ+URn2/01LJb3ncbJrThQnTgCp1ue58hA5z/lZSkyp07tLQqm eeSuVQz946/O6lWBFKL6c3L06H1d2J4NmN/Aded5ad0UF2xokpiRi0H6DY+dGdpdlv5Y TWWztM107zFyqCEqx7lx3aoUqFS+9xbZF4Dd3z0gc8DgPTNOifL0VorWFofKK//+ctbb 7ko7yrT1rvRgdIbFjEW2YQOjBjJ7DvK6n0mgRqOzgk9Zs6nX4Pj8c5l5QX0ZgHBgllVc qAnSCpT3BccVzcTdR6umVlBWl+J/RVhB5cee5uY/owIkqSdnDOfswikZg2Az49utHPDF NxqA== X-Gm-Message-State: AJcUukeaHiwgLyXi6zcE9VqFWWiYbq80prfok20EpgGqTOFN+I5f3bsh Wyz125qkMsNwtcX0mNb0f2ESWg== X-Google-Smtp-Source: ALg8bN7HSMa9Ovaoy2hKbA10DPN30A6ot4mxWcIjJCfKmDnvp+DlwW6Y3gCGtsNCeR2EhqUPQ7S8ag== X-Received: by 2002:a17:902:74cc:: with SMTP id f12mr17808403plt.134.1548582174394; Sun, 27 Jan 2019 01:42:54 -0800 (PST) Received: from www.outflux.net (173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133]) by smtp.gmail.com with ESMTPSA id y5sm51388777pge.49.2019.01.27.01.42.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 27 Jan 2019 01:42:53 -0800 (PST) Date: Sun, 27 Jan 2019 01:42:51 -0800 From: Kees Cook To: Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, ndesaulniers@google.com Subject: [PATCH] selftests/harness: Update named initializer syntax Message-ID: <20190127094251.GA9391@beast> MIME-Version: 1.0 Content-Disposition: inline Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The harness was still using old-style GNU named initializer syntax. Fix this so Clang will stop warning: seccomp_bpf.c:2924:1: warning: use of GNU old-style field designator extension [-Wgnu-designator] ./../kselftest_harness.h:147:25: note: expanded from macro 'TEST' ^ ./../kselftest_harness.h:172:5: note: expanded from macro '__TEST_IMPL' fn: &test_name, termsig: _signal }; \ ^ Signed-off-by: Kees Cook Reviewed-by: Nick Desaulniers --- tools/testing/selftests/kselftest_harness.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h index 76d654ef3234..2d90c98eeb67 100644 --- a/tools/testing/selftests/kselftest_harness.h +++ b/tools/testing/selftests/kselftest_harness.h @@ -168,8 +168,8 @@ #define __TEST_IMPL(test_name, _signal) \ static void test_name(struct __test_metadata *_metadata); \ static struct __test_metadata _##test_name##_object = \ - { name: "global." #test_name, \ - fn: &test_name, termsig: _signal }; \ + { .name = "global." #test_name, \ + .fn = &test_name, .termsig = _signal }; \ static void __attribute__((constructor)) _register_##test_name(void) \ { \ __register_test(&_##test_name##_object); \ @@ -304,9 +304,9 @@ } \ static struct __test_metadata \ _##fixture_name##_##test_name##_object = { \ - name: #fixture_name "." #test_name, \ - fn: &wrapper_##fixture_name##_##test_name, \ - termsig: signal, \ + .name = #fixture_name "." #test_name, \ + .fn = &wrapper_##fixture_name##_##test_name, \ + .termsig = signal, \ }; \ static void __attribute__((constructor)) \ _register_##fixture_name##_##test_name(void) \