From 2cd726a35ce0e6568d74654236a08add21c60a59 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Mon, 23 Feb 2009 03:11:00 +0100 Subject: Make this test readdir order independent When reading directories, different filesystems return files in different orders. Some tests depended on a specific order; remove this dependency by sorting the results before checking them. Signed-off: Andreas Gruenbacher --- test/getfacl-recursive.test | 12 ++++++------ test/sort-getfacl-output | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100755 test/sort-getfacl-output (limited to 'test') diff --git a/test/getfacl-recursive.test b/test/getfacl-recursive.test index 21372bf..b88c211 100644 --- a/test/getfacl-recursive.test +++ b/test/getfacl-recursive.test @@ -4,7 +4,7 @@ Tests for proper path recursion $ mkdir 1/link $ touch 1/link/file $ ln -s `pwd`/1/link 1/2/link - $ getfacl -P -R 1/2 + $ getfacl -P -R 1/2 | ./sort-getfacl-output > # file: 1/2 > # owner: %TUSER > # group: %TGROUP @@ -20,7 +20,7 @@ Tests for proper path recursion > other::r-x > - $ getfacl -R 1/2 + $ getfacl -R 1/2 | ./sort-getfacl-output > # file: 1/2 > # owner: %TUSER > # group: %TGROUP @@ -36,7 +36,7 @@ Tests for proper path recursion > other::r-x > - $ getfacl -R -L 1/2 + $ getfacl -R -L 1/2 | ./sort-getfacl-output > # file: 1/2 > # owner: %TUSER > # group: %TGROUP @@ -66,7 +66,7 @@ Tests for proper path recursion > other::r-- > - $ getfacl -P -R 1 + $ getfacl -P -R 1 | ./sort-getfacl-output > # file: 1 > # owner: %TUSER > # group: %TGROUP @@ -103,7 +103,7 @@ Tests for proper path recursion > other::r-- > - $ getfacl -R 1 + $ getfacl -R 1 | ./sort-getfacl-output > # file: 1 > # owner: %TUSER > # group: %TGROUP @@ -140,7 +140,7 @@ Tests for proper path recursion > other::r-- > - $ getfacl -R -L 1 + $ getfacl -R -L 1 | ./sort-getfacl-output > # file: 1 > # owner: %TUSER > # group: %TGROUP diff --git a/test/sort-getfacl-output b/test/sort-getfacl-output new file mode 100755 index 0000000..9901ed3 --- /dev/null +++ b/test/sort-getfacl-output @@ -0,0 +1,4 @@ +#! /usr/bin/perl -w + +undef $/; +print join("\n\n", sort split(/\n\n/, <>)), "\n\n"; -- cgit v1.2.1