From ae68749ec3d90fc5e403e8a4950d30b832a9629f Mon Sep 17 00:00:00 2001 From: bcamus Date: Wed, 7 Jun 2017 15:15:06 +0200 Subject: [PATCH 1/1] fixing codacy warnings on multi-core VM tests + using a dedicated platform file for these tests (instead of cluster.xml) --- examples/platforms/cloud-sharing.xml | 11 +++++++++++ examples/platforms/cluster.xml | 9 ++------- teshsuite/msg/cloud-sharing/cloud-sharing.c | 4 +--- teshsuite/msg/cloud-sharing/cloud-sharing.tesh | 2 +- 4 files changed, 15 insertions(+), 11 deletions(-) create mode 100644 examples/platforms/cloud-sharing.xml diff --git a/examples/platforms/cloud-sharing.xml b/examples/platforms/cloud-sharing.xml new file mode 100644 index 0000000000..26addba8d0 --- /dev/null +++ b/examples/platforms/cloud-sharing.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/examples/platforms/cluster.xml b/examples/platforms/cluster.xml index 91a10e1dec..628427b129 100644 --- a/examples/platforms/cluster.xml +++ b/examples/platforms/cluster.xml @@ -11,11 +11,6 @@ | | node-0.acme.org node-99.acme.org --> - - - - - - - + diff --git a/teshsuite/msg/cloud-sharing/cloud-sharing.c b/teshsuite/msg/cloud-sharing/cloud-sharing.c index e44126a908..ee641f21b3 100644 --- a/teshsuite/msg/cloud-sharing/cloud-sharing.c +++ b/teshsuite/msg/cloud-sharing/cloud-sharing.c @@ -104,7 +104,6 @@ static int master_main(int argc, char* argv[]) XBT_INFO("# TEST ON TWO-CORE PMs"); pm0 = MSG_host_by_name("node-0.acme2.org"); - pm1 = MSG_host_by_name("node-1.acme2.org"); xbt_assert(pm0, "Host node-0.acme2.org does not seem to exist"); XBT_INFO("## Test 4 (started): check computation on 2 cores PMs"); @@ -287,7 +286,6 @@ static int master_main(int argc, char* argv[]) XBT_INFO("# TEST ON FOUR-CORE PMs AND TWO-CORE VMs"); pm0 = MSG_host_by_name("node-0.acme4.org"); - pm1 = MSG_host_by_name("node-1.acme4.org"); xbt_assert(pm0, "Host node-0.acme4.org does not seem to exist"); XBT_INFO("## Test 9 (started): check impact of a single VM"); @@ -429,7 +427,7 @@ int main(int argc, char* argv[]) MSG_init(&argc, argv); /* load the platform file */ - const char* platform = "../../platforms/cluster.xml"; + const char* platform = "../../../platforms/cloud-sharing.xml"; if (argc == 2) platform = argv[1]; MSG_create_environment(platform); diff --git a/teshsuite/msg/cloud-sharing/cloud-sharing.tesh b/teshsuite/msg/cloud-sharing/cloud-sharing.tesh index c2e6a27607..bca8349580 100644 --- a/teshsuite/msg/cloud-sharing/cloud-sharing.tesh +++ b/teshsuite/msg/cloud-sharing/cloud-sharing.tesh @@ -1,6 +1,6 @@ #! ./tesh -$ $SG_TEST_EXENV ${bindir:=.}/cloud-sharing$EXEEXT --log=no_loc ${srcdir:=.}/../../../examples/platforms/cluster.xml +$ $SG_TEST_EXENV ${bindir:=.}/cloud-sharing$EXEEXT --log=no_loc ${srcdir:=.}/../../../examples/platforms/cloud-sharing.xml > [node-0.acme.org:master:(1) 0.000000] [msg_test/INFO] # TEST ON SINGLE-CORE PMs > [node-0.acme.org:master:(1) 0.000000] [msg_test/INFO] ## Test 1 (started): check computation on normal PMs > [node-0.acme.org:master:(1) 0.000000] [msg_test/INFO] ### Put a task on a PM -- 2.20.1