[LTP] [PATCH 2/2] starvation: skip test on slow kernel
Li Wang
liwang@redhat.com
Sun Dec 22 08:22:50 CET 2024
Systems with slow kernel configurations may not meet
the performance requirements necessary for the starvation
test to produce valid results.
Skipping the test ensures that it runs only on systems
where its results are meaningful.
Signed-off-by: Li Wang <liwang@redhat.com>
---
testcases/kernel/sched/cfs-scheduler/starvation.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/testcases/kernel/sched/cfs-scheduler/starvation.c b/testcases/kernel/sched/cfs-scheduler/starvation.c
index e707e0865..0fd53a0ca 100644
--- a/testcases/kernel/sched/cfs-scheduler/starvation.c
+++ b/testcases/kernel/sched/cfs-scheduler/starvation.c
@@ -21,6 +21,7 @@
#include <sched.h>
#include "tst_test.h"
+#include "tst_kconfig.h"
#include "tst_safe_clocks.h"
#include "tst_timer.h"
@@ -108,6 +109,9 @@ static void setup(void)
else
timeout = callibrate() / 1000;
+ if (tst_has_slow_kconfig())
+ tst_brk(TCONF, "Skip test due to slow kernel configuration");
+
tst_set_max_runtime(timeout);
}
--
2.47.1
More information about the ltp
mailing list