summaryrefslogtreecommitdiffstats
path: root/include/linux/torture.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-01-29 07:30:50 -0800
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-02-23 09:01:02 -0800
commitc2884de38e01134ae040d55aa5644049d1bb850f (patch)
treec30e47a8bd1e2fc647bf19965102dac421a959e1 /include/linux/torture.h
parent5ccf60f23d33afd53568cff4f3f421f2ca624401 (diff)
downloadlinux-c2884de38e01134ae040d55aa5644049d1bb850f.tar.gz
linux-c2884de38e01134ae040d55aa5644049d1bb850f.tar.bz2
linux-c2884de38e01134ae040d55aa5644049d1bb850f.zip
rcutorture: Abstract TOROUT_STRING() and friends
These diagnostic macros are not confined to torturing RCU, so this commit makes them available to other torture tests. Also removed the do-while from TOROUT_STRING() in response to checkpatch complaints. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'include/linux/torture.h')
-rw-r--r--include/linux/torture.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/torture.h b/include/linux/torture.h
index 5aae880b6b4e..09be8887fb08 100644
--- a/include/linux/torture.h
+++ b/include/linux/torture.h
@@ -41,6 +41,14 @@
module_param(name, type, 0444); \
MODULE_PARM_DESC(name, msg);
+#define TORTURE_FLAG "-torture:"
+#define TOROUT_STRING(s) \
+ pr_alert("%s" TORTURE_FLAG s "\n", torture_type)
+#define VERBOSE_TOROUT_STRING(s) \
+ do { if (verbose) pr_alert("%s" TORTURE_FLAG s "\n", torture_type); } while (0)
+#define VERBOSE_TOROUT_ERRSTRING(s) \
+ do { if (verbose) pr_alert("%s" TORTURE_FLAG "!!! " s "\n", torture_type); } while (0)
+
/* Low-rider random number generator. */
struct torture_random_state {
unsigned long trs_state;