From dc28c6ed1c6643ec19d2e8f94f92955f58c357a7 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Thu, 18 Aug 2022 18:32:33 +0200 Subject: Simplified the protocol hookup code in Makefiles --- proto/static/Makefile | 1 - 1 file changed, 1 deletion(-) (limited to 'proto/static') diff --git a/proto/static/Makefile b/proto/static/Makefile index 26aed31f..de6e819b 100644 --- a/proto/static/Makefile +++ b/proto/static/Makefile @@ -2,6 +2,5 @@ src := static.c obj := $(src-o-files) $(all-daemon) $(cf-local) -$(call proto-build,static_build) tests_objs := $(tests_objs) $(src-o-files) -- cgit v1.2.3 From 05c63ae734f4dcfeb479e4bd69550f6ce4fef1d7 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Wed, 21 Sep 2022 13:39:13 +0200 Subject: Flushing tmp_linpool in tree test and in static protocol --- filter/tree_test.c | 13 +++++++++++++ proto/static/static.c | 5 +++++ 2 files changed, 18 insertions(+) (limited to 'proto/static') diff --git a/filter/tree_test.c b/filter/tree_test.c index 05702f81..d180efbc 100644 --- a/filter/tree_test.c +++ b/filter/tree_test.c @@ -170,6 +170,8 @@ t_balancing(void) show_tree(balanced_tree_from_simple); bt_assert(same_tree(balanced_tree_from_simple, expected_balanced_tree)); + + tmp_flush(); } return 1; @@ -191,6 +193,9 @@ t_balancing_random(void) uint i; for(i = 0; i < 10; i++) { + struct lp_state lps; + lp_save(tmp_linpool, &lps); + struct f_tree *random_degenerated_tree = get_random_degenerated_left_tree(nodes_count); show_tree(random_degenerated_tree); @@ -200,7 +205,11 @@ t_balancing_random(void) show_tree(balanced_tree_from_random); bt_assert(same_tree(balanced_tree_from_random, expected_balanced_tree)); + + lp_restore(tmp_linpool, &lps); } + + tmp_flush(); } return 1; @@ -227,6 +236,8 @@ t_find(void) const struct f_tree *found_tree = find_tree(tree, &looking_up_value); bt_assert((val_compare(&looking_up_value, &(found_tree->from)) == 0) && (val_compare(&looking_up_value, &(found_tree->to)) == 0)); } + + tmp_flush(); } return 1; @@ -283,6 +294,8 @@ t_find_ranges(void) ((val_compare(&needle, &(found_tree->from)) == 1) && (val_compare(&needle, &(found_tree->to)) == -1)) ); } + + tmp_flush(); } return 1; diff --git a/proto/static/static.c b/proto/static/static.c index cb764a1c..42fd20b7 100644 --- a/proto/static/static.c +++ b/proto/static/static.c @@ -494,7 +494,12 @@ static_start(struct proto *P) proto_notify_state(P, PS_UP); WALK_LIST(r, cf->routes) + { + struct lp_state lps; + lp_save(tmp_linpool, &lps); static_add_rte(p, r); + lp_restore(tmp_linpool, &lps); + } return PS_UP; } -- cgit v1.2.3