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>
This commit is contained in:

committed by
Matthew Wilcox

parent
5eeb2d23df
commit
73bc029b76
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user