mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-24 01:09:38 -05:00
scftorture: Always log error message
Unconditionally log messages corresponding to errors. Acked-by: Davidlohr Bueso <dbueso@suse.de> Signed-off-by: Li Zhijian <zhijianx.li@intel.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
This commit is contained in:
parent
86e7ed1bd5
commit
809da9bf80
1 changed files with 4 additions and 5 deletions
|
@ -41,8 +41,7 @@
|
||||||
#define VERBOSE_SCFTORTOUT(s, x...) \
|
#define VERBOSE_SCFTORTOUT(s, x...) \
|
||||||
do { if (verbose) pr_alert(SCFTORT_FLAG s "\n", ## x); } while (0)
|
do { if (verbose) pr_alert(SCFTORT_FLAG s "\n", ## x); } while (0)
|
||||||
|
|
||||||
#define VERBOSE_SCFTORTOUT_ERRSTRING(s, x...) \
|
#define SCFTORTOUT_ERRSTRING(s, x...) pr_alert(SCFTORT_FLAG "!!! " s "\n", ## x)
|
||||||
do { if (verbose) pr_alert(SCFTORT_FLAG "!!! " s "\n", ## x); } while (0)
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_AUTHOR("Paul E. McKenney <paulmck@kernel.org>");
|
MODULE_AUTHOR("Paul E. McKenney <paulmck@kernel.org>");
|
||||||
|
@ -584,14 +583,14 @@ static int __init scf_torture_init(void)
|
||||||
if (weight_resched1 == 0 && weight_single1 == 0 && weight_single_rpc1 == 0 &&
|
if (weight_resched1 == 0 && weight_single1 == 0 && weight_single_rpc1 == 0 &&
|
||||||
weight_single_wait1 == 0 && weight_many1 == 0 && weight_many_wait1 == 0 &&
|
weight_single_wait1 == 0 && weight_many1 == 0 && weight_many_wait1 == 0 &&
|
||||||
weight_all1 == 0 && weight_all_wait1 == 0) {
|
weight_all1 == 0 && weight_all_wait1 == 0) {
|
||||||
VERBOSE_SCFTORTOUT_ERRSTRING("all zero weights makes no sense");
|
SCFTORTOUT_ERRSTRING("all zero weights makes no sense");
|
||||||
firsterr = -EINVAL;
|
firsterr = -EINVAL;
|
||||||
goto unwind;
|
goto unwind;
|
||||||
}
|
}
|
||||||
if (IS_BUILTIN(CONFIG_SCF_TORTURE_TEST))
|
if (IS_BUILTIN(CONFIG_SCF_TORTURE_TEST))
|
||||||
scf_sel_add(weight_resched1, SCF_PRIM_RESCHED, false);
|
scf_sel_add(weight_resched1, SCF_PRIM_RESCHED, false);
|
||||||
else if (weight_resched1)
|
else if (weight_resched1)
|
||||||
VERBOSE_SCFTORTOUT_ERRSTRING("built as module, weight_resched ignored");
|
SCFTORTOUT_ERRSTRING("built as module, weight_resched ignored");
|
||||||
scf_sel_add(weight_single1, SCF_PRIM_SINGLE, false);
|
scf_sel_add(weight_single1, SCF_PRIM_SINGLE, false);
|
||||||
scf_sel_add(weight_single_rpc1, SCF_PRIM_SINGLE_RPC, true);
|
scf_sel_add(weight_single_rpc1, SCF_PRIM_SINGLE_RPC, true);
|
||||||
scf_sel_add(weight_single_wait1, SCF_PRIM_SINGLE, true);
|
scf_sel_add(weight_single_wait1, SCF_PRIM_SINGLE, true);
|
||||||
|
@ -622,7 +621,7 @@ static int __init scf_torture_init(void)
|
||||||
nthreads = num_online_cpus();
|
nthreads = num_online_cpus();
|
||||||
scf_stats_p = kcalloc(nthreads, sizeof(scf_stats_p[0]), GFP_KERNEL);
|
scf_stats_p = kcalloc(nthreads, sizeof(scf_stats_p[0]), GFP_KERNEL);
|
||||||
if (!scf_stats_p) {
|
if (!scf_stats_p) {
|
||||||
VERBOSE_SCFTORTOUT_ERRSTRING("out of memory");
|
SCFTORTOUT_ERRSTRING("out of memory");
|
||||||
firsterr = -ENOMEM;
|
firsterr = -ENOMEM;
|
||||||
goto unwind;
|
goto unwind;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue