Commit 95c38322 authored by Paul E. McKenney's avatar Paul E. McKenney Committed by Linus Torvalds

[PATCH] rcutorture: tag success/failure line with module parameters

A long-running rcutorture test can overflow dmesg, so that the line
containing the module parameters is lost.  Although it is usually possible
to retrieve this information from the log files, it is much better to just
tag it onto the final success/failure line so that it may be easily found.
This patch does just that.
Signed-off-by: default avatar"Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent cdb04527
...@@ -441,6 +441,16 @@ rcu_torture_shuffle(void *arg) ...@@ -441,6 +441,16 @@ rcu_torture_shuffle(void *arg)
return 0; return 0;
} }
static inline void
rcu_torture_print_module_parms(char *tag)
{
printk(KERN_ALERT TORTURE_FLAG "--- %s: nreaders=%d "
"stat_interval=%d verbose=%d test_no_idle_hz=%d "
"shuffle_interval = %d\n",
tag, nrealreaders, stat_interval, verbose, test_no_idle_hz,
shuffle_interval);
}
static void static void
rcu_torture_cleanup(void) rcu_torture_cleanup(void)
{ {
...@@ -483,9 +493,10 @@ rcu_torture_cleanup(void) ...@@ -483,9 +493,10 @@ rcu_torture_cleanup(void)
rcu_barrier(); rcu_barrier();
rcu_torture_stats_print(); /* -After- the stats thread is stopped! */ rcu_torture_stats_print(); /* -After- the stats thread is stopped! */
printk(KERN_ALERT TORTURE_FLAG if (atomic_read(&n_rcu_torture_error))
"--- End of test: %s\n", rcu_torture_print_module_parms("End of test: FAILURE");
atomic_read(&n_rcu_torture_error) == 0 ? "SUCCESS" : "FAILURE"); else
rcu_torture_print_module_parms("End of test: SUCCESS");
} }
static int static int
...@@ -501,11 +512,7 @@ rcu_torture_init(void) ...@@ -501,11 +512,7 @@ rcu_torture_init(void)
nrealreaders = nreaders; nrealreaders = nreaders;
else else
nrealreaders = 2 * num_online_cpus(); nrealreaders = 2 * num_online_cpus();
printk(KERN_ALERT TORTURE_FLAG "--- Start of test: nreaders=%d " rcu_torture_print_module_parms("Start of test");
"stat_interval=%d verbose=%d test_no_idle_hz=%d "
"shuffle_interval = %d\n",
nrealreaders, stat_interval, verbose, test_no_idle_hz,
shuffle_interval);
fullstop = 0; fullstop = 0;
/* Set up the freelist. */ /* Set up the freelist. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment