selftest: sort dbcheck output to avoid sort order impacting results
authorAndrew Bartlett <abartlet@samba.org>
Fri, 25 Aug 2017 05:37:05 +0000 (17:37 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 20 Sep 2017 06:15:22 +0000 (08:15 +0200)
The GUID index code will change the returned results order

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
testprogs/blackbox/dbcheck-links.sh

index fb66d14e6f1577d8b643889eeff82071cfb07d30..17973e974296c68af8e2474a658308d6aeac318f 100755 (executable)
@@ -59,7 +59,9 @@ dbcheck() {
     if [ "$?" != "1" ]; then
        return 1
     fi
-    diff $tmpfile $release_dir/expected-dbcheck-link-output.txt
+    sort $tmpfile > $tmpfile.sorted
+    sort $release_dir/expected-dbcheck-link-output.txt > $tmpfile.expected
+    diff -u $tmpfile.sorted $tmpfile.expected
     if [ "$?" != "0" ]; then
        return 1
     fi