From 3ec528eeeb1921ae588d32934d2798ca5da1d249 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Wed, 5 Mar 2014 11:51:50 +0100 Subject: [PATCH] Fix test bogus-missing-gateway. --- src/surf/surfxml_parse.c | 7 +++++++ teshsuite/simdag/platforms/bogus_missing_gateway.tesh | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/surf/surfxml_parse.c b/src/surf/surfxml_parse.c index 6c757e587c..f36eb0f5fb 100644 --- a/src/surf/surfxml_parse.c +++ b/src/surf/surfxml_parse.c @@ -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) { diff --git a/teshsuite/simdag/platforms/bogus_missing_gateway.tesh b/teshsuite/simdag/platforms/bogus_missing_gateway.tesh index ade421e7ed..f571ffa06c 100644 --- a/teshsuite/simdag/platforms/bogus_missing_gateway.tesh +++ b/teshsuite/simdag/platforms/bogus_missing_gateway.tesh @@ -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 +> [ 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 +> [ 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" -- 2.20.1