@@ -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;
@@
@@ -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
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(-)