From e70e13f9cd57cb772d2b0486a04d5fdc017f8e2f Mon Sep 17 00:00:00 2001 From: Emmanuel Roullit Date: Wed, 14 Mar 2012 17:24:59 +0100 Subject: [PATCH] Sort expected and result output of 'list' tests. There is no guarantee that getifaddrs(3) builds a list where the device are in order of registration. With a significant amount of interfaces, the result is scrambled and there is no way for dabbad to sort this. --- dabba/test/t1000-list.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dabba/test/t1000-list.sh b/dabba/test/t1000-list.sh index 8d095df..1718515 100755 --- a/dabba/test/t1000-list.sh +++ b/dabba/test/t1000-list.sh @@ -71,7 +71,9 @@ test_expect_success "invoke dabba list with dabbad" " $DABBA_PATH/dabba list > result && killall dabbad && generate_yaml_list > expected && - test_cmp expected result + sort -o expected_sorted expected && + sort -o result_sorted result && + test_cmp expected_sorted result_sorted " test_expect_success DUMMY_DEV "Setup: Create $interface_nr dummy interfaces" " @@ -84,7 +86,9 @@ test_expect_success DUMMY_DEV "invoke dabba list with dabbad with $interface_nr $DABBA_PATH/dabba list > result && killall dabbad && generate_yaml_list > expected && - test_cmp expected result + sort -o expected_sorted expected && + sort -o result_sorted result && + test_cmp expected_sorted result_sorted " test_expect_success DUMMY_DEV "Cleanup: Remove all dummy interfaces" " -- 2.11.4.GIT