Skip to content

Commit cf886c4

Browse files
paulmckIngo Molnar
authored andcommitted
rcu: Improve rcutorture diagnostics when bad torture_type specified
Make rcutorture list the available torture_type values when it doesn't like the one specified. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: dipankar@in.ibm.com Cc: mathieu.desnoyers@polymtl.ca Cc: dvhltc@us.ibm.com Cc: niv@us.ibm.com Cc: peterz@infradead.org Cc: rostedt@goodmis.org Cc: Valdis.Kletnieks@vt.edu Cc: dhowells@redhat.com Cc: avi@redhat.com Cc: mtosatti@redhat.com LKML-Reference: <12565226351868-git-send-email-> Signed-off-by: Ingo Molnar <mingo@elte.hu>
1 parent 6417986 commit cf886c4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎kernel/rcutorture.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,8 +1129,12 @@ rcu_torture_init(void)
11291129
break;
11301130
}
11311131
if (i == ARRAY_SIZE(torture_ops)) {
1132-
printk(KERN_ALERT "rcutorture: invalid torture type: \"%s\"\n",
1132+
printk(KERN_ALERT "rcu-torture: invalid torture type: \"%s\"\n",
11331133
torture_type);
1134+
printk(KERN_ALERT "rcu-torture types:");
1135+
for (i = 0; i < ARRAY_SIZE(torture_ops); i++)
1136+
printk(KERN_ALERT " %s", torture_ops[i]->name);
1137+
printk(KERN_ALERT "\n");
11341138
mutex_unlock(&fullstop_mutex);
11351139
return -EINVAL;
11361140
}

0 commit comments

Comments
 (0)