Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add tests for msg/mc.
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 7 May 2010 09:30:00 +0000 (09:30 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 7 May 2010 09:30:00 +0000 (09:30 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7718 48e7efb5-ca39-0410-a469-dd3cf9ba447f

buildtools/Cmake/src/CMakeTest.txt
examples/msg/mc/bugged1.c
examples/msg/mc/bugged1.tesh [new file with mode: 0644]
examples/msg/mc/bugged2.c
examples/msg/mc/bugged2.tesh [new file with mode: 0644]
examples/msg/mc/centralized.tesh [new file with mode: 0644]
examples/msg/mc/centralized_mutex.c

index 2745333..1e2e19c 100644 (file)
@@ -141,7 +141,6 @@ IF(HAVE_TRACING)
   ADD_TEST(tracing-process-migration ${PROJECT_DIRECTORY}/tools/tesh/tesh --cd ${PROJECT_DIRECTORY}/examples/msg tracing/procmig.tesh)
 ENDIF(HAVE_TRACING)
 
-
 IF(${ARCH_32_BITS})
   ADD_TEST(gras-ping-sg-32     ${PROJECT_DIRECTORY}/tools/tesh/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/ping test_sg_32)
   ADD_TEST(gras-rpc-sg-32      ${PROJECT_DIRECTORY}/tools/tesh/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/rpc test_sg_32)
@@ -210,8 +209,13 @@ ADD_TEST(ruby-masterslave  ${PROJECT_DIRECTORY}/tools/tesh/tesh --cd ${PROJECT_DI
 ADD_TEST(ruby-ping_pong                ${PROJECT_DIRECTORY}/tools/tesh/tesh --cd ${PROJECT_DIRECTORY}/examples/ruby PingPong.tesh)
 ADD_TEST(ruby-quicksort                ${PROJECT_DIRECTORY}/tools/tesh/tesh --cd ${PROJECT_DIRECTORY}/examples/ruby Quicksort.tesh)
 endif(HAVE_RUBY)
+
 # END TESH TESTS
 
+ADD_TEST(mc-bugged1                    ${PROJECT_DIRECTORY}/tools/tesh/tesh --cd ${PROJECT_DIRECTORY}/examples/msg/mc bugged1.tesh)
+ADD_TEST(mc-bugged2                    ${PROJECT_DIRECTORY}/tools/tesh/tesh --cd ${PROJECT_DIRECTORY}/examples/msg/mc bugged2.tesh)
+ADD_TEST(mc-centralized                ${PROJECT_DIRECTORY}/tools/tesh/tesh --cd ${PROJECT_DIRECTORY}/examples/msg/mc centralized.tesh)
+
 if(HAVE_JAVA)
 # java examples
 ADD_TEST(java-basic    ${PROJECT_DIRECTORY}/buildtools/Cmake/test_java.sh ${PROJECT_DIRECTORY}/examples/java/basic BasicTest ${PROJECT_DIRECTORY})
index ce8a687..23b783e 100644 (file)
@@ -44,7 +44,7 @@ int main(int argc,char*argv[]) {
 
  MSG_function_register("client", client);
 
- MSG_launch_application("deploy.xml");
+ MSG_launch_application("deploy_bugged1.xml");
 
  MSG_main();
 
diff --git a/examples/msg/mc/bugged1.tesh b/examples/msg/mc/bugged1.tesh
new file mode 100644 (file)
index 0000000..77506f2
--- /dev/null
@@ -0,0 +1,7 @@
+#! ./tesh
+
+$ ./bugged1
+> [HostB:client:(2) 0.008753] [example/INFO] Sent!
+> [HostC:client:(3) 0.017506] [example/INFO] Sent!
+> [HostD:client:(4) 0.026259] [example/INFO] Sent!
+> [HostA:server:(1) 0.026259] [example/INFO] OK
index 55574ae..b7d2b65 100644 (file)
@@ -50,9 +50,9 @@ int main(int argc,char*argv[])
 
   MSG_function_register("client", client);
 
-  MSG_launch_application("deploy.xml");
+  MSG_launch_application("deploy_bugged2.xml");
 
   MSG_main();
 
   return 0;
-}
\ No newline at end of file
+}
diff --git a/examples/msg/mc/bugged2.tesh b/examples/msg/mc/bugged2.tesh
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/examples/msg/mc/centralized.tesh b/examples/msg/mc/centralized.tesh
new file mode 100644 (file)
index 0000000..f286bce
--- /dev/null
@@ -0,0 +1,49 @@
+#! ./tesh
+
+$ ./centralized
+> [Fafard:client:(2) 0.000000] [centralized/INFO] Ask the request
+> [Boivin:client:(3) 0.000000] [centralized/INFO] Ask the request
+> [TeX:client:(4) 0.000000] [centralized/INFO] Ask the request
+> [Geoff:client:(5) 0.000000] [centralized/INFO] Ask the request
+> [Disney:client:(6) 0.000000] [centralized/INFO] Ask the request
+> [Tremblay:coordinator:(1) 1.455805] [centralized/INFO] CS idle. Grant immediatly
+> [Fafard:client:(2) 2.911610] [centralized/INFO] got the answer. Sleep a bit and release it
+> [Tremblay:coordinator:(1) 3.612177] [centralized/INFO] CS already used. Queue the request
+> [Tremblay:coordinator:(1) 4.929109] [centralized/INFO] CS already used. Queue the request
+> [Tremblay:coordinator:(1) 6.078341] [centralized/INFO] CS already used. Queue the request
+> [Tremblay:coordinator:(1) 7.404111] [centralized/INFO] CS already used. Queue the request
+> [Tremblay:coordinator:(1) 8.859915] [centralized/INFO] CS release. Grant to queued requests (queue size: 4)
+> [Disney:client:(6) 10.185685] [centralized/INFO] got the answer. Sleep a bit and release it
+> [Fafard:client:(2) 10.859915] [centralized/INFO] Ask the request
+> [Tremblay:coordinator:(1) 12.315720] [centralized/INFO] CS already used. Queue the request
+> [Tremblay:coordinator:(1) 13.641490] [centralized/INFO] CS release. Grant to queued requests (queue size: 4)
+> [Fafard:client:(2) 15.097295] [centralized/INFO] got the answer. Sleep a bit and release it
+> [Tremblay:coordinator:(1) 17.553100] [centralized/INFO] CS release. Grant to queued requests (queue size: 3)
+> [Geoff:client:(5) 18.702332] [centralized/INFO] got the answer. Sleep a bit and release it
+> [Fafard:client:(2) 19.553100] [centralized/INFO] Got all the CS I wanted, quit now
+> [Disney:client:(6) 19.641490] [centralized/INFO] Ask the request
+> [Tremblay:coordinator:(1) 20.967260] [centralized/INFO] CS already used. Queue the request
+> [Tremblay:coordinator:(1) 22.116492] [centralized/INFO] CS release. Grant to queued requests (queue size: 3)
+> [Disney:client:(6) 23.442262] [centralized/INFO] got the answer. Sleep a bit and release it
+> [Tremblay:coordinator:(1) 25.768032] [centralized/INFO] CS release. Grant to queued requests (queue size: 2)
+> [TeX:client:(4) 27.084964] [centralized/INFO] got the answer. Sleep a bit and release it
+> [Geoff:client:(5) 27.116492] [centralized/INFO] Ask the request
+> [Tremblay:coordinator:(1) 28.265724] [centralized/INFO] CS already used. Queue the request
+> [Tremblay:coordinator:(1) 29.582656] [centralized/INFO] CS release. Grant to queued requests (queue size: 2)
+> [Geoff:client:(5) 30.731888] [centralized/INFO] got the answer. Sleep a bit and release it
+> [Disney:client:(6) 31.768032] [centralized/INFO] Got all the CS I wanted, quit now
+> [Tremblay:coordinator:(1) 32.881120] [centralized/INFO] CS release. Grant to queued requests (queue size: 1)
+> [Boivin:client:(3) 33.581687] [centralized/INFO] got the answer. Sleep a bit and release it
+> [TeX:client:(4) 33.582656] [centralized/INFO] Ask the request
+> [Tremblay:coordinator:(1) 34.899588] [centralized/INFO] CS already used. Queue the request
+> [Tremblay:coordinator:(1) 35.600155] [centralized/INFO] CS release. Grant to queued requests (queue size: 1)
+> [TeX:client:(4) 36.917087] [centralized/INFO] got the answer. Sleep a bit and release it
+> [Geoff:client:(5) 37.881120] [centralized/INFO] Got all the CS I wanted, quit now
+> [Boivin:client:(3) 38.600155] [centralized/INFO] Ask the request
+> [Tremblay:coordinator:(1) 39.234019] [centralized/INFO] CS release. resource now idle
+> [Tremblay:coordinator:(1) 39.934586] [centralized/INFO] CS idle. Grant immediatly
+> [Boivin:client:(3) 40.635153] [centralized/INFO] got the answer. Sleep a bit and release it
+> [Tremblay:coordinator:(1) 42.335720] [centralized/INFO] CS release. resource now idle
+> [Tremblay:coordinator:(1) 42.335720] [centralized/INFO] Received all releases, quit now
+> [TeX:client:(4) 43.234019] [centralized/INFO] Got all the CS I wanted, quit now
+> [Boivin:client:(3) 45.335720] [centralized/INFO] Got all the CS I wanted, quit now
\ No newline at end of file
index 3d6ed63..f6d11f8 100644 (file)
@@ -80,7 +80,7 @@ int main(int argc, char*argv[]) {
   MSG_create_environment("../msg_platform.xml");
   MSG_function_register("coordinator", coordinator);
   MSG_function_register("client", client);
-  MSG_launch_application("deploy.xml");
+  MSG_launch_application("deploy_mutex.xml");
   MSG_main();
   return 0;
 }