From c39bcc677ba32400eeaa7281dd9f173c4b17c227 Mon Sep 17 00:00:00 2001 From: Razvan Damachi Date: Wed, 30 Aug 2017 12:30:50 +0200 Subject: [PATCH] Tidy up the process management test. The test now spawns 1 client on core 3, executing 'spawn on core 7' requests. After 150 requests, the client exists successfully (before it used to loop). Signed-off-by: Razvan Damachi --- tools/harness/tests/proc_mgmt_test.py | 2 +- usr/tests/proc_mgmt_test/main.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/harness/tests/proc_mgmt_test.py b/tools/harness/tests/proc_mgmt_test.py index aac7c38..0753e70 100644 --- a/tools/harness/tests/proc_mgmt_test.py +++ b/tools/harness/tests/proc_mgmt_test.py @@ -23,7 +23,7 @@ class ProcMgmtTest(TestCommon): def get_modules(self, build, machine): modules = super(ProcMgmtTest, self).get_modules(build, machine) - n = 3 + n = 1 for i in range(n): modules.add_module("proc_mgmt_test", ["core=3", str(i), str(n)]) # modules.add_module("proc_mgmt_test", ["core=3", "1"]) diff --git a/usr/tests/proc_mgmt_test/main.c b/usr/tests/proc_mgmt_test/main.c index 82e6904..b70acff 100644 --- a/usr/tests/proc_mgmt_test/main.c +++ b/usr/tests/proc_mgmt_test/main.c @@ -19,7 +19,7 @@ #include #define PROC_MGMT_BENCH 1 -#define PROC_MGMT_BENCH_MIN_RUNS 120 +#define PROC_MGMT_BENCH_MIN_RUNS 150 int my_id; // int total_ids; @@ -102,13 +102,13 @@ int main(int argc, char **argv) assert(err_is_ok(err)); tscperus /= 1000; - coreid_t target_core = 0;//strcmp(argv[1], "1") == 0 ? 1 : 2; + coreid_t target_core = 7;//strcmp(argv[1], "1") == 0 ? 1 : 2; char *spawn_argv[] = { "proc_mgmt_test", "noop", NULL }; my_id = atoi(argv[1]); struct capref domain_cap; // total_ids = atoi(argv[2]); - barrelfish_usleep((0 - 10 * my_id) * 1000 * 1000); + barrelfish_usleep((0 - 1 * my_id) * 100 * 1000); // ctl = bench_ctl_init(BENCH_MODE_FIXEDRUNS, 1, 100); do { @@ -121,7 +121,7 @@ int main(int argc, char **argv) tsc_end = bench_tsc(); result = calculate_time(tsc_start, tsc_end); - barrelfish_usleep(2 * 1000 * 1000); + barrelfish_usleep(0 * 1000 * 1000); }while (!bench_ctl_add_run(ctl, &result)); // } while (true); @@ -130,7 +130,6 @@ int main(int argc, char **argv) bench_ctl_destroy(ctl); barrelfish_usleep(5 * 1000 * 1000); - while (true); printf("TEST DONE\n"); } else { -- 1.7.2.5