Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp736914pxu; Fri, 23 Oct 2020 12:00:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxt7wLpO/+YBYJRth/HrvsEfB+Kc3liKGpjb00mi2yeTtTwp3BvePhVySn1aL9cVON/35g5 X-Received: by 2002:a17:906:49cf:: with SMTP id w15mr2602287ejv.252.1603479646704; Fri, 23 Oct 2020 12:00:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603479646; cv=none; d=google.com; s=arc-20160816; b=mQALuscnBrh4t3e/xma1IXGHvbky+erXaVjXRCI/dDAhoO3+ZJW9IRKqXTTcrliDfn 8ZmgYwzobOEsEvTeCRo9bXedhWVguh4bsB77mfExDKYOJl4OTDUTTpmzrPn89uT55QKd L6KpDUHJTKeQufKlYLy5UVqmKPivFVvrKvovSFM1gzW/OyS552oB+VC6S81W4hzlXQT/ 8isQSKlwR8hnLX1YLQiXKDCb7uh0hdMGj+Poh6iq+5vHDOpyFycZEmO/rDQhzvTRJ7Uk cD8xDpqD+pVGXLNN28vwUNouA22EDuYZE8Wd+Of0KiY1B8URYob+UOlm47fVDXvLz5Ve WPNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BE28vr3ldFBEafoUhUhSftLJWHULe1EekcnhFGapYMM=; b=IJtHPBrgiRYfDHC/1/ALJcn+xzj5pe3VDr5guCJEkd679/SDqHHOa3jKaIroodEzkb svEI2ZNMKVVWktX9jmoFHAwIJN9VAgVAUnK3PyYxGRMxs/qDxHasdiOicBbM7QDiio+d qRQ7FX/KFyJMqGwIrWX/YRRakLfoXRcOOpWXcWWEcXaMxY6Emy33KN4ftIuSKF3nqkdU XjH5vGhmtJDIA4uBKwpMRSDObEHUtxua33gC41CmPjvolaNFPWdhxmKz0i06G4UBjj+A CMhEszVkNEZ6A68eLcdnKSQOZR+ABrMU/GCWHghFYrNRQf5om7Ze96/y4+Y3TpKsth5f A3og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gXOgNeCk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z13si308009edq.478.2020.10.23.12.00.23; Fri, 23 Oct 2020 12:00:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gXOgNeCk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753629AbgJWRjG (ORCPT + 99 others); Fri, 23 Oct 2020 13:39:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753627AbgJWRjF (ORCPT ); Fri, 23 Oct 2020 13:39:05 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29501C0613D2 for ; Fri, 23 Oct 2020 10:39:05 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id x13so1796471pgp.7 for ; Fri, 23 Oct 2020 10:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=BE28vr3ldFBEafoUhUhSftLJWHULe1EekcnhFGapYMM=; b=gXOgNeCk0DWPr02xsOcY0kJj7Eqyp8wWIlaUKo6ogWwWvs+trPWedAA18N2K0SZP+Y nG5wIUVGGTIs8+tjQoNkP/55c4Fjhb6wq+4mKwGGqzWCAsc/12vo9Qy9i9juM7FcyvJO mUCc99keb39LEFtPSBaRDKDpBWEQmepy5hwbA= 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:references :mime-version:content-disposition:in-reply-to; bh=BE28vr3ldFBEafoUhUhSftLJWHULe1EekcnhFGapYMM=; b=RHkITTR2Q4m0zKWIkHyw7nQZbx6mhhBHQ7IxK246It6pgi8iClnUG3C8UVch74tSJn nLflZIxqqCLumjW2rDGHdC30p/tPzlnhMNHdFhOnfK9aQ/PNfn5D7lww9Y57H8K3nEKx YprCc/1t6ch1tSXAdsfBSGFLdOnePtN+/SdGnpwuDXC2GTID3Sfb+RCIAzHCB956VhsO 98c3/OeKf5JqJNf7XwB6rSJY866rpq1Ta1gZEfZME11BuNHSltdF8zIubWi2n0nekJ7d 3+/1ZVbapyTdM7RcTZNA7/j/memrjcaTb9vlgstFJ0SqbDCUstlOAYisMQAa6lJZyvge MtYA== X-Gm-Message-State: AOAM533CiMP8EHVjvWHi4vhWCM6hMOttV/ZG98MgN0wxoVtPif4m+rmH gt5p6aKjln7IjXL6x7sjR6IClQ== X-Received: by 2002:a17:90b:3649:: with SMTP id nh9mr3727436pjb.123.1603474744707; Fri, 23 Oct 2020 10:39:04 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id g22sm2757066pfh.147.2020.10.23.10.39.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 10:39:03 -0700 (PDT) Date: Fri, 23 Oct 2020 10:39:02 -0700 From: Kees Cook To: Mauro Carvalho Chehab Cc: Linux Doc Mailing List , Jonathan Corbet , Andy Lutomirski , Shuah Khan , Will Drewry , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v3 55/56] selftests: kselftest_harness.h: partially fix kernel-doc markups Message-ID: <202010231036.B41FB56D@keescook> References: <8d816b5a5f31600176fd9ad5e58c0a74bf79f8dd.1603469755.git.mchehab+huawei@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8d816b5a5f31600176fd9ad5e58c0a74bf79f8dd.1603469755.git.mchehab+huawei@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 23, 2020 at 06:33:42PM +0200, Mauro Carvalho Chehab wrote: > The kernel-doc markups on this file are weird: they don't > follow what's specified at: > > Documentation/doc-guide/kernel-doc.rst > > In particular, markups should use this format: > identifier - description > > and not this: > identifier(args) > > The way the definitions are inside this file cause the > parser to completely miss the identifier name of each > function. > > This prevents improving the script to do some needed validation > tests. > > Address this part. Yet, furter changes are needed in order > for it to fully follow the specs. > > Signed-off-by: Mauro Carvalho Chehab > --- > tools/testing/selftests/kselftest_harness.h | 66 ++++++++++----------- > 1 file changed, 33 insertions(+), 33 deletions(-) > > diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h > index f19804df244c..665d04f3b802 100644 > --- a/tools/testing/selftests/kselftest_harness.h > +++ b/tools/testing/selftests/kselftest_harness.h > @@ -79,7 +79,7 @@ > #endif > > /** > - * TH_LOG(fmt, ...) > + * TH_LOG() > * > * @fmt: format string > * @...: optional arguments Hmmm. Yeah, this does need fixing, but I don't want to lose the "examples". Some have stuff like this before the description: * .. code-block:: c * * TH_LOG(format, ...) which retains it, but many don't. Can you add the code-block:: c sections where they're missing so this doesn't lose the syntax hints when just looking at the header file alone. -Kees > @@ -113,7 +113,7 @@ > __FILE__, __LINE__, _metadata->name, ##__VA_ARGS__) > > /** > - * SKIP(statement, fmt, ...) > + * SKIP() > * > * @statement: statement to run after reporting SKIP > * @fmt: format string > @@ -136,7 +136,7 @@ > } while (0) > > /** > - * TEST(test_name) - Defines the test function and creates the registration > + * TEST() - Defines the test function and creates the registration > * stub > * > * @test_name: test name > @@ -155,7 +155,7 @@ > #define TEST(test_name) __TEST_IMPL(test_name, -1) > > /** > - * TEST_SIGNAL(test_name, signal) > + * TEST_SIGNAL() > * > * @test_name: test name > * @signal: signal number > @@ -195,7 +195,7 @@ > struct __test_metadata __attribute__((unused)) *_metadata) > > /** > - * FIXTURE_DATA(datatype_name) - Wraps the struct name so we have one less > + * FIXTURE_DATA() - Wraps the struct name so we have one less > * argument to pass around > * > * @datatype_name: datatype name > @@ -212,7 +212,7 @@ > #define FIXTURE_DATA(datatype_name) struct _test_data_##datatype_name > > /** > - * FIXTURE(fixture_name) - Called once per fixture to setup the data and > + * FIXTURE() - Called once per fixture to setup the data and > * register > * > * @fixture_name: fixture name > @@ -239,7 +239,7 @@ > FIXTURE_DATA(fixture_name) > > /** > - * FIXTURE_SETUP(fixture_name) - Prepares the setup function for the fixture. > + * FIXTURE_SETUP() - Prepares the setup function for the fixture. > * *_metadata* is included so that EXPECT_* and ASSERT_* work correctly. > * > * @fixture_name: fixture name > @@ -265,7 +265,7 @@ > __attribute__((unused)) *variant) > > /** > - * FIXTURE_TEARDOWN(fixture_name) > + * FIXTURE_TEARDOWN() > * *_metadata* is included so that EXPECT_* and ASSERT_* work correctly. > * > * @fixture_name: fixture name > @@ -286,7 +286,7 @@ > FIXTURE_DATA(fixture_name) __attribute__((unused)) *self) > > /** > - * FIXTURE_VARIANT(fixture_name) - Optionally called once per fixture > + * FIXTURE_VARIANT() - Optionally called once per fixture > * to declare fixture variant > * > * @fixture_name: fixture name > @@ -305,7 +305,7 @@ > #define FIXTURE_VARIANT(fixture_name) struct _fixture_variant_##fixture_name > > /** > - * FIXTURE_VARIANT_ADD(fixture_name, variant_name) - Called once per fixture > + * FIXTURE_VARIANT_ADD() - Called once per fixture > * variant to setup and register the data > * > * @fixture_name: fixture name > @@ -339,7 +339,7 @@ > _##fixture_name##_##variant_name##_variant = > > /** > - * TEST_F(fixture_name, test_name) - Emits test registration and helpers for > + * TEST_F() - Emits test registration and helpers for > * fixture-based test cases > * > * @fixture_name: fixture name > @@ -432,7 +432,7 @@ > */ > > /** > - * ASSERT_EQ(expected, seen) > + * ASSERT_EQ() > * > * @expected: expected value > * @seen: measured value > @@ -443,7 +443,7 @@ > __EXPECT(expected, #expected, seen, #seen, ==, 1) > > /** > - * ASSERT_NE(expected, seen) > + * ASSERT_NE() > * > * @expected: expected value > * @seen: measured value > @@ -454,7 +454,7 @@ > __EXPECT(expected, #expected, seen, #seen, !=, 1) > > /** > - * ASSERT_LT(expected, seen) > + * ASSERT_LT() > * > * @expected: expected value > * @seen: measured value > @@ -465,7 +465,7 @@ > __EXPECT(expected, #expected, seen, #seen, <, 1) > > /** > - * ASSERT_LE(expected, seen) > + * ASSERT_LE() > * > * @expected: expected value > * @seen: measured value > @@ -476,7 +476,7 @@ > __EXPECT(expected, #expected, seen, #seen, <=, 1) > > /** > - * ASSERT_GT(expected, seen) > + * ASSERT_GT() > * > * @expected: expected value > * @seen: measured value > @@ -487,7 +487,7 @@ > __EXPECT(expected, #expected, seen, #seen, >, 1) > > /** > - * ASSERT_GE(expected, seen) > + * ASSERT_GE() > * > * @expected: expected value > * @seen: measured value > @@ -498,7 +498,7 @@ > __EXPECT(expected, #expected, seen, #seen, >=, 1) > > /** > - * ASSERT_NULL(seen) > + * ASSERT_NULL() > * > * @seen: measured value > * > @@ -508,7 +508,7 @@ > __EXPECT(NULL, "NULL", seen, #seen, ==, 1) > > /** > - * ASSERT_TRUE(seen) > + * ASSERT_TRUE() > * > * @seen: measured value > * > @@ -518,7 +518,7 @@ > __EXPECT(0, "0", seen, #seen, !=, 1) > > /** > - * ASSERT_FALSE(seen) > + * ASSERT_FALSE() > * > * @seen: measured value > * > @@ -528,7 +528,7 @@ > __EXPECT(0, "0", seen, #seen, ==, 1) > > /** > - * ASSERT_STREQ(expected, seen) > + * ASSERT_STREQ() > * > * @expected: expected value > * @seen: measured value > @@ -539,7 +539,7 @@ > __EXPECT_STR(expected, seen, ==, 1) > > /** > - * ASSERT_STRNE(expected, seen) > + * ASSERT_STRNE() > * > * @expected: expected value > * @seen: measured value > @@ -550,7 +550,7 @@ > __EXPECT_STR(expected, seen, !=, 1) > > /** > - * EXPECT_EQ(expected, seen) > + * EXPECT_EQ() > * > * @expected: expected value > * @seen: measured value > @@ -561,7 +561,7 @@ > __EXPECT(expected, #expected, seen, #seen, ==, 0) > > /** > - * EXPECT_NE(expected, seen) > + * EXPECT_NE() > * > * @expected: expected value > * @seen: measured value > @@ -572,7 +572,7 @@ > __EXPECT(expected, #expected, seen, #seen, !=, 0) > > /** > - * EXPECT_LT(expected, seen) > + * EXPECT_LT() > * > * @expected: expected value > * @seen: measured value > @@ -583,7 +583,7 @@ > __EXPECT(expected, #expected, seen, #seen, <, 0) > > /** > - * EXPECT_LE(expected, seen) > + * EXPECT_LE() > * > * @expected: expected value > * @seen: measured value > @@ -594,7 +594,7 @@ > __EXPECT(expected, #expected, seen, #seen, <=, 0) > > /** > - * EXPECT_GT(expected, seen) > + * EXPECT_GT() > * > * @expected: expected value > * @seen: measured value > @@ -605,7 +605,7 @@ > __EXPECT(expected, #expected, seen, #seen, >, 0) > > /** > - * EXPECT_GE(expected, seen) > + * EXPECT_GE() > * > * @expected: expected value > * @seen: measured value > @@ -616,7 +616,7 @@ > __EXPECT(expected, #expected, seen, #seen, >=, 0) > > /** > - * EXPECT_NULL(seen) > + * EXPECT_NULL() > * > * @seen: measured value > * > @@ -626,7 +626,7 @@ > __EXPECT(NULL, "NULL", seen, #seen, ==, 0) > > /** > - * EXPECT_TRUE(seen) > + * EXPECT_TRUE() > * > * @seen: measured value > * > @@ -636,7 +636,7 @@ > __EXPECT(0, "0", seen, #seen, !=, 0) > > /** > - * EXPECT_FALSE(seen) > + * EXPECT_FALSE() > * > * @seen: measured value > * > @@ -646,7 +646,7 @@ > __EXPECT(0, "0", seen, #seen, ==, 0) > > /** > - * EXPECT_STREQ(expected, seen) > + * EXPECT_STREQ() > * > * @expected: expected value > * @seen: measured value > @@ -657,7 +657,7 @@ > __EXPECT_STR(expected, seen, ==, 0) > > /** > - * EXPECT_STRNE(expected, seen) > + * EXPECT_STRNE() > * > * @expected: expected value > * @seen: measured value > -- > 2.26.2 > -- Kees Cook