From 3ce45c25af238fb4d9a040abb44597531140db2d Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 1 Mar 2016 22:37:33 +0000 Subject: [PATCH] test-priority: ignore the local preference MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The local preference depends on the rank of the IP address in the list of all IP addresses available of the box running the test. As this value is not fixed we ignore it in the test. Reviewed-by: Olivier Crête Differential Revision: https://phabricator.freedesktop.org/D818 --- tests/test-priority.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test-priority.c b/tests/test-priority.c index 5d8a5e3..1700dd0 100644 --- a/tests/test-priority.c +++ b/tests/test-priority.c @@ -61,17 +61,17 @@ main (void) g_assert_cmpuint (nice_candidate_ice_priority (candidate, TRUE, FALSE), ==, 0x3C0001FF); /* Host tcp-active unreliable */ candidate->transport = NICE_CANDIDATE_TRANSPORT_TCP_ACTIVE; - g_assert_cmpuint (nice_candidate_ice_priority (candidate, FALSE, FALSE), ==, 0x3CC003FF); + g_assert_cmpuint (nice_candidate_ice_priority (candidate, FALSE, FALSE) & 0xFFE000FF, ==, 0x3CC000FF); /* Host tcp-active reliable */ candidate->transport = NICE_CANDIDATE_TRANSPORT_TCP_ACTIVE; /* Host tcp-active reliable */ - g_assert_cmpuint (nice_candidate_ice_priority (candidate, TRUE, FALSE), ==, 0x78C003FF); + g_assert_cmpuint (nice_candidate_ice_priority (candidate, TRUE, FALSE) & 0xFFE000FF, ==, 0x78C000FF); /* srv-reflexive tcp-active reliable */ candidate->type = NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE; candidate->transport = NICE_CANDIDATE_TRANSPORT_TCP_ACTIVE; - g_assert_cmpuint (nice_candidate_ice_priority (candidate, TRUE, FALSE), ==, 0x648003FF); + g_assert_cmpuint (nice_candidate_ice_priority (candidate, TRUE, FALSE) & 0xFFE000FF, ==, 0x648000FF); /* nat-assisted srv-reflexive tcp-active reliable */ - g_assert_cmpuint (nice_candidate_ice_priority (candidate, TRUE, TRUE), ==, 0x698003FF); + g_assert_cmpuint (nice_candidate_ice_priority (candidate, TRUE, TRUE) & 0xFFE000FF, ==, 0x698000FF); nice_candidate_free (candidate); /* test 2 */ -- 2.7.4