All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 7/7] Reference LTP-002 rule in Cocci scripts
Date: Tue, 29 Jun 2021 08:27:10 +0100	[thread overview]
Message-ID: <20210629072710.23800-8-rpalethorpe@suse.com> (raw)
In-Reply-To: <20210629072710.23800-1-rpalethorpe@suse.com>

Avoid duplication of rule description

Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---
 scripts/coccinelle/libltp-test-macro-vars.cocci | 6 +-----
 scripts/coccinelle/libltp-test-macro.cocci      | 4 +---
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/scripts/coccinelle/libltp-test-macro-vars.cocci b/scripts/coccinelle/libltp-test-macro-vars.cocci
index ed5459a48..e0fe4e2a7 100644
--- a/scripts/coccinelle/libltp-test-macro-vars.cocci
+++ b/scripts/coccinelle/libltp-test-macro-vars.cocci
@@ -1,11 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 // Copyright (c) 2021 SUSE LLC  <rpalethorpe@suse.com>
 
-// The TEST macro should not be used in the library because it sets
-// TST_RET and TST_ERR which are global variables. The test author
-// only expects these to be changed if *they* call TEST directly.
-
-// Find all positions where TEST's variables are used
+// Find violations of LTP-002
 @ find_use exists @
 expression E;
 @@
diff --git a/scripts/coccinelle/libltp-test-macro.cocci b/scripts/coccinelle/libltp-test-macro.cocci
index 7563d23aa..86c55c6c4 100644
--- a/scripts/coccinelle/libltp-test-macro.cocci
+++ b/scripts/coccinelle/libltp-test-macro.cocci
@@ -1,9 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 // Copyright (c) 2021 SUSE LLC  <rpalethorpe@suse.com>
 
-// The TEST macro should not be used in the library because it sets
-// TST_RET and TST_ERR which are global variables. The test author
-// only expects these to be changed if *they* call TEST directly.
+// Find and fix violations of rule LTP-002
 
 // Set with -D fix
 virtual fix
-- 
2.31.1


  parent reply	other threads:[~2021-06-29  7:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-29  7:27 [LTP] [PATCH 0/7] Sparse based checker and rule proposal Richard Palethorpe
2021-06-29  7:27 ` [LTP] [PATCH 1/7] Add Sparse based checker and TST_RET/ERR check Richard Palethorpe
2021-07-08 13:19   ` Cyril Hrubis
2021-07-09  7:47     ` Richard Palethorpe
2021-06-29  7:27 ` [LTP] [PATCH 2/7] Add 'make check' to the build system Richard Palethorpe
2021-06-29  7:27 ` [LTP] [PATCH 3/7] meltdown: Set CFLAGS for check targets Richard Palethorpe
2021-07-08 13:11   ` Cyril Hrubis
2021-07-09  7:49     ` Richard Palethorpe
2021-06-29  7:27 ` [LTP] [PATCH 4/7] doc: Add rules and recommendations list Richard Palethorpe
2021-07-08 13:34   ` Cyril Hrubis
2021-06-29  7:27 ` [LTP] [PATCH 5/7] doc: Remind authors and maintainers to run make check Richard Palethorpe
2021-07-08 13:35   ` Cyril Hrubis
2021-06-29  7:27 ` [LTP] [PATCH 6/7] doc: Document TEST macro and state TST_RET/ERR rule LTP-002 Richard Palethorpe
2021-07-01  7:17   ` Richard Palethorpe
2021-06-29  7:27 ` Richard Palethorpe [this message]
2021-07-08 13:38 ` [LTP] [PATCH 0/7] Sparse based checker and rule proposal Cyril Hrubis

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=20210629072710.23800-8-rpalethorpe@suse.com \
    --to=rpalethorpe@suse.com \
    --cc=ltp@lists.linux.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.