Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Improve code coverage
authorPierre Veyre <pierre.veyre@cc.in2p3.fr>
Tue, 27 May 2014 08:44:16 +0000 (10:44 +0200)
committerPierre Veyre <pierre.veyre@cc.in2p3.fr>
Tue, 27 May 2014 08:51:18 +0000 (10:51 +0200)
teshsuite/msg/storage/storage_basic.c
teshsuite/msg/storage/storage_basic.tesh

index d352f27..0ca80ad 100644 (file)
@@ -17,6 +17,7 @@ sg_size_t read_local_file(const char *src);
 void dump_storage_by_name(char *name);
 void display_storage_content(msg_storage_t storage);
 void get_set_storage_data(const char *storage_name);
+void dump_platform_storages(void);
 int client(int argc, char *argv[]);
 int server(int argc, char *argv[]);
 
@@ -139,6 +140,16 @@ void get_set_storage_data(const char *storage_name){
   xbt_free(data);
 }
 
+void dump_platform_storages(void){
+       unsigned int cursor;
+       xbt_dynar_t storages = MSG_storages_as_dynar();
+       msg_storage_t storage;
+       xbt_dynar_foreach(storages, cursor, storage){
+               XBT_INFO("Storage %s is attached to %s", MSG_storage_get_name(storage), MSG_storage_get_host(storage));
+               MSG_storage_set_property_value(storage, "usage", xbt_strdup("gpfs"), NULL);
+       }
+}
+
 int client(int argc, char *argv[])
 {
   hsm_put("server","/sd1/doc/simgrid/examples/cxx/autoDestination/FinalizeTask.cxx","/sd2/scratch/toto.cxx");
@@ -184,6 +195,7 @@ int server(int argc, char *argv[])
   }
 
   storage_info(MSG_host_self());
+  dump_platform_storages();
   return 1;
 }
 
index 288ebc3..69f466a 100644 (file)
@@ -57,4 +57,7 @@ $ storage_basic --cfg=path:${srcdir:=.} ${srcdir:=.}/platform.xml ${srcdir:=.}/d
 > [  3.208145] (1:server@server)       /doc/simgrid/examples/cxx/basic/Main.cxx size: 10 bytes
 > [  3.208145] (1:server@server)       /scratch/toto.cxx size: 500001 bytes
 > [  3.208145] (1:server@server)       /doc/simgrid/examples/cxx/basic/Slave.cxx size: 10 bytes
+> [  3.208145] (1:server@server) Storage cdisk is attached to client
+> [  3.208145] (1:server@server) Storage sdisk1 is attached to server
+> [  3.208145] (1:server@server) Storage sdisk2 is attached to server
 > [  3.208145] (0:@) Simulated time: 3.20814