All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v1] sched/sched_stress:Modify sched driver param to run long term testcases
@ 2020-10-16  9:51 Luo Fenglin
  2020-10-16  9:51 ` [LTP] [PATCH v2] sched/sched_stress:Fixed param of sched_tc Luo Fenglin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Luo Fenglin @ 2020-10-16  9:51 UTC (permalink / raw)
  To: ltp

From: luofenglin <luofenglin1@huawei.com>

Add sched_driver process slots param to 10, then long term testcases can run.
Additionally, add sched_driver run time 0.05 hour, long term testcases
run 1/5 of total time.

Signed-off-by: luofenglin <luofenglin1@huawei.com>
---
 testcases/kernel/sched/sched_stress/sched_driver.c  | 6 +++++-
 testcases/kernel/sched/sched_stress/sched_stress.sh | 3 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/sched/sched_stress/sched_driver.c b/testcases/kernel/sched/sched_stress/sched_driver.c
index 61573d788..1bee9d130 100644
--- a/testcases/kernel/sched/sched_stress/sched_driver.c
+++ b/testcases/kernel/sched/sched_stress/sched_driver.c
@@ -202,8 +202,12 @@ int main(int argc, char **argv)

 	/*
 	 * Start the long-term testcases running
+	 * Run time set 1/5 of total
 	 */
-	start_long_term_testcases(long_term_slot_total, argv[2]);
+	char run_long_term_time[20];
+	int runlongtime = runseconds / 5;
+	sprintf(run_long_term_time, "%d", runlongtime);
+	start_long_term_testcases(long_term_slot_total, run_long_term_time);
 	short_term_slot_total = workslots / 2;
 	fflush(stdout);

diff --git a/testcases/kernel/sched/sched_stress/sched_stress.sh b/testcases/kernel/sched/sched_stress/sched_stress.sh
index 797d0601b..0205446a7 100755
--- a/testcases/kernel/sched/sched_stress/sched_stress.sh
+++ b/testcases/kernel/sched/sched_stress/sched_stress.sh
@@ -30,6 +30,7 @@ export KERNEL=./sched_datafile
 touch $KERNEL
 echo 0.000000 > sch.measure
 export RAWDEV=`df / | grep dev | awk {'print $1'}`
-sched_driver -s 0.9 -t 0.02 -p 2 > /tmp/tmp$$
+echo "Result file: /tmp/tmp$$"
+sched_driver -s 0.9 -t 0.05 -p 10 -d > /tmp/tmp$$
 tail -n 5 /tmp/tmp$$
 rm -rf /tmp/tmp$$ ./sched_datafile sch.measure
--
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-01-06 10:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16  9:51 [LTP] [PATCH v1] sched/sched_stress:Modify sched driver param to run long term testcases Luo Fenglin
2020-10-16  9:51 ` [LTP] [PATCH v2] sched/sched_stress:Fixed param of sched_tc Luo Fenglin
2021-01-06 10:29   ` Cyril Hrubis
2020-10-16  9:51 ` [LTP] [PATCH v3] sched/sched_stress:Bugfix for setting real time priority Luo Fenglin
2021-01-06 10:44   ` Cyril Hrubis
2021-01-06 10:25 ` [LTP] [PATCH v1] sched/sched_stress:Modify sched driver param to run long term testcases Cyril Hrubis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.