Commit f2bdf7dc authored by Paul E. McKenney's avatar Paul E. McKenney

scftorture: Warn on individual scf_torture_init() error conditions

When running scftorture as a module, any scf_torture_init() issues will be
reflected in the error code from modprobe or insmod, as the case may be.
However, these error codes are not available when running scftorture
built-in, for example, when using the kvm.sh script.  This commit
therefore adds WARN_ON_ONCE() to allow distinguishing scf_torture_init()
errors when running scftorture built-in.
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent c3d0258d
...@@ -606,17 +606,17 @@ static int __init scf_torture_init(void) ...@@ -606,17 +606,17 @@ static int __init scf_torture_init(void)
if (onoff_interval > 0) { if (onoff_interval > 0) {
firsterr = torture_onoff_init(onoff_holdoff * HZ, onoff_interval, NULL); firsterr = torture_onoff_init(onoff_holdoff * HZ, onoff_interval, NULL);
if (firsterr) if (torture_init_error(firsterr))
goto unwind; goto unwind;
} }
if (shutdown_secs > 0) { if (shutdown_secs > 0) {
firsterr = torture_shutdown_init(shutdown_secs, scf_torture_cleanup); firsterr = torture_shutdown_init(shutdown_secs, scf_torture_cleanup);
if (firsterr) if (torture_init_error(firsterr))
goto unwind; goto unwind;
} }
if (stutter > 0) { if (stutter > 0) {
firsterr = torture_stutter_init(stutter, stutter); firsterr = torture_stutter_init(stutter, stutter);
if (firsterr) if (torture_init_error(firsterr))
goto unwind; goto unwind;
} }
...@@ -637,12 +637,12 @@ static int __init scf_torture_init(void) ...@@ -637,12 +637,12 @@ static int __init scf_torture_init(void)
scf_stats_p[i].cpu = i; scf_stats_p[i].cpu = i;
firsterr = torture_create_kthread(scftorture_invoker, (void *)&scf_stats_p[i], firsterr = torture_create_kthread(scftorture_invoker, (void *)&scf_stats_p[i],
scf_stats_p[i].task); scf_stats_p[i].task);
if (firsterr) if (torture_init_error(firsterr))
goto unwind; goto unwind;
} }
if (stat_interval > 0) { if (stat_interval > 0) {
firsterr = torture_create_kthread(scf_torture_stats, NULL, scf_torture_stats_task); firsterr = torture_create_kthread(scf_torture_stats, NULL, scf_torture_stats_task);
if (firsterr) if (torture_init_error(firsterr))
goto unwind; goto unwind;
} }
......
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