summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2009-02-23 03:11:00 +0100
committerAndreas Gruenbacher <agruen@suse.de>2009-02-23 03:11:00 +0100
commit2cd726a35ce0e6568d74654236a08add21c60a59 (patch)
tree51d316e73a178b9b30d02d5bcbae69e5c393aefe /test
parentd17e5c4f938b94dc445f1c5d0c27c6576cea15d5 (diff)
downloadacl-2cd726a35ce0e6568d74654236a08add21c60a59.tar.gz
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 <agruen@suse.de>
Diffstat (limited to 'test')
-rw-r--r--test/getfacl-recursive.test12
-rwxr-xr-xtest/sort-getfacl-output4
2 files changed, 10 insertions, 6 deletions
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";