X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/00ae4a50c96340ea9a1f097f4b26dc57b122a86e..14ccdee10b09e9b80221e526f7c2ac3bf13b6a2f:/teshsuite/msg/storage/storage_basic.c diff --git a/teshsuite/msg/storage/storage_basic.c b/teshsuite/msg/storage/storage_basic.c index d352f27363..b56ea02179 100644 --- a/teshsuite/msg/storage/storage_basic.c +++ b/teshsuite/msg/storage/storage_basic.c @@ -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,17 @@ 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, "other usage", xbt_strdup("gpfs"), xbt_free); + } + xbt_dynar_free(&storages); +} + int client(int argc, char *argv[]) { hsm_put("server","/sd1/doc/simgrid/examples/cxx/autoDestination/FinalizeTask.cxx","/sd2/scratch/toto.cxx"); @@ -177,13 +189,14 @@ int server(int argc, char *argv[]) char *dest = MSG_task_get_data(to_execute); sg_size_t size_to_write = (sg_size_t)MSG_task_get_data_size(to_execute); write_local_file(dest, size_to_write); - } + } MSG_task_destroy(to_execute); to_execute = NULL; } storage_info(MSG_host_self()); + dump_platform_storages(); return 1; }