From: Luo Fenglin <luofenglin1@huawei.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2] sched/sched_stress:Fixed param of sched_tc
Date: Fri, 16 Oct 2020 17:51:15 +0800 [thread overview]
Message-ID: <1602841876-91490-2-git-send-email-luofenglin1@huawei.com> (raw)
In-Reply-To: <1602841876-91490-1-git-send-email-luofenglin1@huawei.com>
From: luofenglin <luofenglin1@huawei.com>
Rt flag of sched_tc must like "-pfixed" or "-pvariable"
Signed-off-by: luofenglin <luofenglin1@huawei.com>
---
.../kernel/sched/sched_stress/sched_driver.c | 51 ++++++++++---------
1 file changed, 27 insertions(+), 24 deletions(-)
diff --git a/testcases/kernel/sched/sched_stress/sched_driver.c b/testcases/kernel/sched/sched_stress/sched_driver.c
index 1bee9d130..475369b46 100644
--- a/testcases/kernel/sched/sched_stress/sched_driver.c
+++ b/testcases/kernel/sched/sched_stress/sched_driver.c
@@ -621,25 +621,28 @@ char *execution_time; /* runtime hours to pass to each testcase */
printf("long-term slots available: %d\n",
long_term_slot_total);
+ char timeparam[30];
+ sprintf(timeparam, "-t%s", execution_time);
+
for (i = 0; i < (long_term_slot_total / 4); i++) {
#if defined(_IA64) && !defined(__64BIT__)
- start_testcase("./sched_tc0.32", "sched_tc0 -t", execution_time,
- " -p1", NULL, NULL);
- start_testcase("./sched_tc2.32", "sched_tc2", execution_time,
- "1", NULL, NULL);
- start_testcase("./sched_tc0.32", "sched_tc0 -t", execution_time,
- " -p0", NULL, NULL);
- start_testcase("./sched_tc2.32", "sched_tc2", execution_time,
- "0", NULL, NULL);
+ start_testcase("./sched_tc0.32", "sched_tc0", timeparam,
+ "-pfixed", "-d", NULL);
+ start_testcase("./sched_tc2.32", "sched_tc2", timeparam,
+ "-pfixed", "-d", NULL);
+ start_testcase("./sched_tc0.32", "sched_tc0", timeparam,
+ "-pvariable", "-d", NULL);
+ start_testcase("./sched_tc2.32", "sched_tc2", timeparam,
+ "-pvariable", "-d", NULL);
#else
- start_testcase("./sched_tc0", "sched_tc0 -t", execution_time,
- " -p1", NULL, NULL);
- start_testcase("./sched_tc2", "sched_tc2", execution_time, "1",
- NULL, NULL);
- start_testcase("./sched_tc0", "sched_tc0 -t", execution_time,
- " -p0", NULL, NULL);
- start_testcase("./sched_tc2", "sched_tc2", execution_time, "0",
- NULL, NULL);
+ start_testcase("./sched_tc0", "sched_tc0", timeparam,
+ "-pfixed", "-d", NULL);
+ start_testcase("./sched_tc2", "sched_tc2", timeparam, "-pfixed",
+ "-d", NULL);
+ start_testcase("./sched_tc0", "sched_tc0", timeparam,
+ "-pvariable", "-d", NULL);
+ start_testcase("./sched_tc2", "sched_tc2", timeparam, "-pvariable",
+ "-d", NULL);
#endif
}
}
@@ -674,22 +677,22 @@ void start_short_term_testcases(int short_term_slot_total,
for (i = 0; i < (short_term_slots / 4); i++) {
#if defined(_IA64) && !defined(__64BIT__)
- start_testcase("./sched_tc1.32", "sched_tc1", "1", NULL, NULL,
+ start_testcase("./sched_tc1.32", "sched_tc1", "-pfixed", "-d", NULL,
NULL);
- start_testcase("./sched_tc3.32", "sched_tc3", "1", NULL, NULL,
+ start_testcase("./sched_tc3.32", "sched_tc3", "-pfixed", "-d", NULL,
NULL);
- start_testcase("./sched_tc1.32", "sched_tc1", "0", NULL, NULL,
+ start_testcase("./sched_tc1.32", "sched_tc1", "-pvariable", "-d", NULL,
NULL);
- start_testcase("./sched_tc3.32", "sched_tc3", "0", NULL, NULL,
+ start_testcase("./sched_tc3.32", "sched_tc3", "-pvariable", "-d", NULL,
NULL);
#else
- start_testcase("./sched_tc1", "sched_tc1", "1", NULL, NULL,
+ start_testcase("./sched_tc1", "sched_tc1", "-pfixed", "-d", NULL,
NULL);
- start_testcase("./sched_tc3", "sched_tc3", "1", NULL, NULL,
+ start_testcase("./sched_tc3", "sched_tc3", "-pfixed", "-d", NULL,
NULL);
- start_testcase("./sched_tc1", "sched_tc1", "0", NULL, NULL,
+ start_testcase("./sched_tc1", "sched_tc1", "-pvariable", "-d", NULL,
NULL);
- start_testcase("./sched_tc3", "sched_tc3", "0", NULL, NULL,
+ start_testcase("./sched_tc3", "sched_tc3", "-pvariable", "-d", NULL,
NULL);
#endif
#if 0
--
2.17.1
next prev parent reply other threads:[~2020-10-16 9:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Luo Fenglin [this message]
2021-01-06 10:29 ` [LTP] [PATCH v2] sched/sched_stress:Fixed param of sched_tc 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1602841876-91490-2-git-send-email-luofenglin1@huawei.com \
--to=luofenglin1@huawei.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox