diff options
author | Rehas Sachdeva <aquannie@gmail.com> | 2017-01-04 11:55:00 -0500 |
---|---|---|
committer | Matthew Wilcox <mawilcox@microsoft.com> | 2017-02-13 21:44:04 -0500 |
commit | 73bc029b76482260a144219786d19951f561716e (patch) | |
tree | 92fd2111d3da8e9eea6d43f926f5b9368f924d82 /tools/testing/radix-tree/linux | |
parent | 5eeb2d23df29212f901a36dabf16f93d8bd50814 (diff) | |
download | talos-obmc-linux-73bc029b76482260a144219786d19951f561716e.tar.gz talos-obmc-linux-73bc029b76482260a144219786d19951f561716e.zip |
radix tree test suite: Dial down verbosity with -v
Make the output of radix tree test suite less verbose by default and add
-v and -vv command line options for increasing level of verbosity.
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
Diffstat (limited to 'tools/testing/radix-tree/linux')
-rw-r--r-- | tools/testing/radix-tree/linux/radix-tree.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/radix-tree/linux/radix-tree.h b/tools/testing/radix-tree/linux/radix-tree.h index f4d8532e1bef..ddd135fa3af7 100644 --- a/tools/testing/radix-tree/linux/radix-tree.h +++ b/tools/testing/radix-tree/linux/radix-tree.h @@ -3,6 +3,7 @@ #include "../../../../include/linux/radix-tree.h" extern int kmalloc_verbose; +extern int test_verbose; static inline void trace_call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *head)) @@ -12,6 +13,11 @@ static inline void trace_call_rcu(struct rcu_head *head, offsetof(struct radix_tree_node, rcu_head)); call_rcu(head, func); } + +#define printv(verbosity_level, fmt, ...) \ + if(test_verbose >= verbosity_level) \ + printf(fmt, ##__VA_ARGS__) + #undef call_rcu #define call_rcu(x, y) trace_call_rcu(x, y) |