Skip to content

Commit 2b1388f

Browse files
committed
scftorture: Shut down if nonsensical arguments given
If (say) a 10-hour scftorture run is started, but the module parameters are so nonsensical that the run doesn't even start, then scftorture will wait the full ten hours when run built into a guest OS. This commit therefore shuts down the system in this case so that the error is reported immediately instead of ten hours hence. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
1 parent 2f611d0 commit 2b1388f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

kernel/scftorture.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,10 @@ static int __init scf_torture_init(void)
651651
unwind:
652652
torture_init_end();
653653
scf_torture_cleanup();
654+
if (shutdown_secs) {
655+
WARN_ON(!IS_MODULE(CONFIG_SCF_TORTURE_TEST));
656+
kernel_power_off();
657+
}
654658
return firsterr;
655659
}
656660

0 commit comments

Comments
 (0)