aboutsummaryrefslogtreecommitdiff
path: root/tests/prom-env-test.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2019-02-23 22:20:39 +0300
committerKevin Wolf <kwolf@redhat.com>2019-02-25 15:03:19 +0100
commit2f30b7c377fa9a7dfbaf6eed56a07be7953e509e (patch)
tree009d1693be03dc02e18bd162ecd4151ad1ba5974 /tests/prom-env-test.c
parent0dc165c1bd544cad4b58f9493d3f6f71fd41705e (diff)
block: improve should_update_child
As it already said in the comment, we don't want to create loops in parent->child relations. So, when we try to append @to to @c, we should check that @c is not in @to children subtree, and we should check it recursively, not only the first level. The patch provides BFS-based search, to check the relations. This is needed for further fleecing-hook filter usage: we need to append it to source, when the hook is already a parent of target, and source may be in a backing chain of target (fleecing-scheme). So, on appending, the hook should not became a child (direct or through children subtree) of the target. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/prom-env-test.c')
0 files changed, 0 insertions, 0 deletions