Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix test bogus-missing-gateway.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 5 Mar 2014 10:51:50 +0000 (11:51 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 5 Mar 2014 10:54:13 +0000 (11:54 +0100)
src/surf/surfxml_parse.c
teshsuite/simdag/platforms/bogus_missing_gateway.tesh

index 6c757e5..f36eb0f 100644 (file)
@@ -768,6 +768,13 @@ void ETag_surfxml_ASroute(void){
   ASroute.gw_src = sg_routing_edge_by_name_or_null(A_surfxml_ASroute_gw___src);
   ASroute.gw_dst = sg_routing_edge_by_name_or_null(A_surfxml_ASroute_gw___dst);
 
+  if (A_surfxml_ASroute_gw___src && !ASroute.gw_src)
+    surf_parse_error("gw_src=\"%s\" not found for ASroute from \"%s\" to \"%s\"",
+                     A_surfxml_ASroute_gw___src, ASroute.src, ASroute.dst);
+  if (A_surfxml_ASroute_gw___dst && !ASroute.gw_dst)
+    surf_parse_error("gw_dst=\"%s\" not found for ASroute from \"%s\" to \"%s\"",
+                     A_surfxml_ASroute_gw___dst, ASroute.src, ASroute.dst);
+
   ASroute.link_list = parsed_link_list;
 
   switch (A_surfxml_ASroute_symmetrical) {
index ade421e..f571ffa 100644 (file)
@@ -1,7 +1,9 @@
+! expect signal SIGABRT
 $ ${bindir:=.}/flatifier bogus_missing_src_gateway.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n"
 > [  0.000000] [0:@] surf_workstation_model_init_ptask_L07
-> [  0.000000] [0:@] Parse error <some informative message>
+> [  0.000000] [0:@] Parse error at bogus_missing_src_gateway.xml:16: gw_src="nod-cluster_router.cluster.us" not found for ASroute from "us" to "fr"
 
+! expect signal SIGABRT
 $ ${bindir:=.}/flatifier bogus_missing_dst_gateway.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n"
 > [  0.000000] [0:@] surf_workstation_model_init_ptask_L07
-> [  0.000000] [0:@] Parse error <some informative message>
+> [  0.000000] [0:@] Parse error at bogus_missing_dst_gateway.xml:16: gw_dst="neud-grappe_router.grappe.fr" not found for ASroute from "us" to "fr"