summaryrefslogtreecommitdiff
path: root/src/test/test_entrynodes.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2014-06-25 15:44:36 -0400
committerGeorge Kadianakis <desnacked@riseup.net>2014-06-25 15:44:36 -0400
commit8bbb217964a8d3a2d77a69f670a53ff65643ff27 (patch)
treed6da1b6b9dcaa51c3136261ef0acca18444c298b /src/test/test_entrynodes.c
parent46d41e6e9b4208b1a951f2d7f14da92606b82195 (diff)
downloadtor-8bbb217964a8d3a2d77a69f670a53ff65643ff27.tar.gz
tor-8bbb217964a8d3a2d77a69f670a53ff65643ff27.zip
Change the interface of entry_is_live() to take a bitmap.
Diffstat (limited to 'src/test/test_entrynodes.c')
-rw-r--r--src/test/test_entrynodes.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/test/test_entrynodes.c b/src/test/test_entrynodes.c
index 528329a8f9..b81f95a393 100644
--- a/src/test/test_entrynodes.c
+++ b/src/test/test_entrynodes.c
@@ -580,20 +580,24 @@ test_entry_is_live(void *arg)
/* Require the node to be stable, but it's not. Should fail.
Also enable 'assume_reachable' because why not. */
- test_node = entry_is_live(test_entry, 1, 0, 1, 0, &msg);
+ test_node = entry_is_live(test_entry,
+ ENTRY_NEED_UPTIME | ENTRY_ASSUME_REACHABLE,
+ &msg);
test_assert(!test_node);
/* Require the node to be fast, but it's not. Should fail. */
- test_node = entry_is_live(test_entry, 0, 1, 1, 0, &msg);
+ test_node = entry_is_live(test_entry,
+ ENTRY_NEED_CAPACITY | ENTRY_ASSUME_REACHABLE,
+ &msg);
test_assert(!test_node);
/* Don't impose any restrictions on the node. Should succeed. */
- test_node = entry_is_live(test_entry, 0, 0, 0, 0, &msg);
+ test_node = entry_is_live(test_entry, 0, &msg);
test_assert(test_node);
tt_ptr_op(test_node, ==, node_get_by_id(test_entry->identity));
/* Require descriptor for this node. It has one so it should succeed. */
- test_node = entry_is_live(test_entry, 0, 0, 0, 1, &msg);
+ test_node = entry_is_live(test_entry, ENTRY_NEED_DESCRIPTOR, &msg);
test_assert(test_node);
tt_ptr_op(test_node, ==, node_get_by_id(test_entry->identity));