Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
leak plug and test AS properties
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 28 Mar 2017 08:48:22 +0000 (10:48 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 28 Mar 2017 08:48:22 +0000 (10:48 +0200)
examples/msg/platform-properties/platform-properties.c
examples/msg/platform-properties/platform-properties.tesh
src/surf/xml/surfxml_sax_cb.cpp

index dfc751f..83acf80 100644 (file)
@@ -64,6 +64,13 @@ static int david(int argc, char *argv[]) {/* Dump what we have on a remote host
 
 static int bob(int argc, char *argv[])
 {
+  /* this host also tests the properties of the AS*/
+  msg_as_t root = MSG_environment_get_routing_root();
+  XBT_INFO("== Print the properties of the AS");
+  XBT_INFO("   Process property: filename -> %s", MSG_environment_as_get_property_value(root, "filename"));
+  XBT_INFO("   Process property: date -> %s", MSG_environment_as_get_property_value(root, "date"));
+  XBT_INFO("   Process property: author -> %s", MSG_environment_as_get_property_value(root, "author"));
+
   /* Get the property list of current bob process */
   xbt_dict_t props = MSG_process_get_properties(MSG_process_self());
   xbt_dict_cursor_t cursor = NULL;
index 518a2db..aea23f3 100644 (file)
@@ -12,6 +12,10 @@ $ $SG_TEST_EXENV ${bindir:=.}/platform-properties$EXEEXT ${srcdir:=.}/prop.xml $
 > [  0.000000] (0:maestro@) Host 'node-2.acme.org' runs at 1000000000 flops/s
 > [  0.000000] (0:maestro@) Host 'node-3.acme.org' runs at 1000000000 flops/s
 > [  0.000000] (0:maestro@) Host 'node-4.acme.org' runs at 1000000000 flops/s
+> [  0.000000] (2:bob@host1) == Print the properties of the AS
+> [  0.000000] (2:bob@host1)    Process property: filename -> prop.xml
+> [  0.000000] (2:bob@host1)    Process property: date -> 31-08-12
+> [  0.000000] (2:bob@host1)    Process property: author -> pnavarro
 > [  0.000000] (2:bob@host1) == Print the properties of the process
 > [  0.000000] (2:bob@host1)    Process property: SomeProp -> SomeValue
 > [  0.000000] (2:bob@host1) == Try to get a process property that does not exist
index b0c48e4..43f712c 100644 (file)
@@ -484,7 +484,7 @@ void STag_surfxml_prop()
     XBT_DEBUG("Set AS property %s -> %s", A_surfxml_prop_id, A_surfxml_prop_value);
     simgrid::s4u::NetZone* netzone = simgrid::s4u::Engine::instance()->netzoneByNameOrNull(A_surfxml_AS_id);
 
-    netzone->setProperty(A_surfxml_prop_id, xbt_strdup(A_surfxml_prop_value));
+    netzone->setProperty(A_surfxml_prop_id, A_surfxml_prop_value);
   }
   else{
     if (!current_property_set)