Patchwork [1/1] acl: enable ptest support

login
register
mail settings
Submitter Chong.Lu@windriver.com
Date Jan. 10, 2014, 9:13 a.m.
Message ID <4ea0f4383800204370680a87a91c4e5f95c73e80.1389344939.git.Chong.Lu@windriver.com>
Download mbox | patch
Permalink /patch/64519/
State New
Headers show

Comments

Chong.Lu@windriver.com - Jan. 10, 2014, 9:13 a.m.
Install acl test suite and run it as ptest.
nfs test cases need depend on nfs service. So exclude them order to
make ptest all pass.

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
---
 meta/recipes-support/attr/acl.inc                  |  15 +-
 .../attr/acl/acl-make-ptest-pass.patch             | 457 +++++++++++++++++++++
 meta/recipes-support/attr/acl/run-ptest            |   5 +
 3 files changed, 476 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-support/attr/acl/acl-make-ptest-pass.patch
 create mode 100644 meta/recipes-support/attr/acl/run-ptest
Saul Wold - Jan. 10, 2014, 5:21 p.m.
On 01/10/2014 01:13 AM, Chong Lu wrote:
> Install acl test suite and run it as ptest.
> nfs test cases need depend on nfs service. So exclude them order to
> make ptest all pass.
>
> Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
> ---
>   meta/recipes-support/attr/acl.inc                  |  15 +-
>   .../attr/acl/acl-make-ptest-pass.patch             | 457 +++++++++++++++++++++
>   meta/recipes-support/attr/acl/run-ptest            |   5 +
>   3 files changed, 476 insertions(+), 1 deletion(-)
>   create mode 100644 meta/recipes-support/attr/acl/acl-make-ptest-pass.patch
>   create mode 100644 meta/recipes-support/attr/acl/run-ptest
>
> diff --git a/meta/recipes-support/attr/acl.inc b/meta/recipes-support/attr/acl.inc
> index a461232..4bacf80 100644
> --- a/meta/recipes-support/attr/acl.inc
> +++ b/meta/recipes-support/attr/acl.inc
> @@ -9,7 +9,10 @@ LIC_FILES_CHKSUM = "file://doc/COPYING;md5=c781d70ed2b4d48995b790403217a249 \
>                       file://doc/COPYING.LGPL;md5=9e9a206917f8af112da634ce3ab41764"
>
>   DEPENDS = "attr"
> -SRC_URI = "http://download.savannah.gnu.org/releases/acl/${BP}.src.tar.gz"
> +SRC_URI = "http://download.savannah.gnu.org/releases/acl/${BP}.src.tar.gz \
> +           file://acl-make-ptest-pass.patch \
> +           file://run-ptest \
> +"
>
>   require ea-acl.inc
>
> @@ -24,3 +27,13 @@ do_install_append() {
>   	sed -i ${D}${libdir}/libacl.la -e \
>   	    s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
>   }
> +
> +inherit ptest
> +
> +do_install_ptest() {
> +	tar -cf - test/ --exclude nfs | ( cd ${D}${PTEST_PATH} && tar -xf - )
> +	mkdir ${D}${PTEST_PATH}/include
> +	cp ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
> +}
> +
> +RDEPENDS_${PN}-ptest = "coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix"
> diff --git a/meta/recipes-support/attr/acl/acl-make-ptest-pass.patch b/meta/recipes-support/attr/acl/acl-make-ptest-pass.patch
> new file mode 100644
> index 0000000..89c03c2
> --- /dev/null
> +++ b/meta/recipes-support/attr/acl/acl-make-ptest-pass.patch
> @@ -0,0 +1,457 @@
> +acl: make ptest pass
> +
> +Upstream-Status: Inappropriate [embedded specific]
> +
> +The daemon user must be a member in the bin group, else permissions.test
> +will fail. So add daemon user to bin group.
> +Many results of `ls' are incorrect in some test cases, modify them to make
> +ptest pass.
> +
This does not seem quite right, you don't just change the tests to "make 
ptest pass" What's wrong with the output of ls?  Is this because it's 
using busybox's ls instead of coreutils version of ls?

If that's the case then we should really have the acl-ptest package have 
an RDEPENDS on coreutils.

Sau!

> +Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
> +---
> + test/Makefile              |    2 +-
> + test/cp.test               |    8 ++---
> + test/misc.test             |   86 ++++++++++++++++++++++----------------------
> + test/root/permissions.test |    2 +-
> + test/root/setfacl.test     |    2 +-
> + test/sbits-restore.test    |    6 ++--
> + 6 files changed, 53 insertions(+), 53 deletions(-)
> +
> +diff --git a/test/Makefile b/test/Makefile
> +index d2baac8..6063a56 100644
> +--- a/test/Makefile
> ++++ b/test/Makefile
> +@@ -42,7 +42,7 @@ $(NFS):
> + 	@echo "NFS specific tests"; echo "*** $@ ***"; perl run $@
> +
> + $(ROOT):
> +-	@echo "Note: Tests must run as root"; echo "*** $@ ***"; perl run $@
> ++	@echo "Note: Tests must run as root"; echo "*** $@ ***"; usermod -G bin daemon; perl run $@
> +
> + .PHONY: $(TESTS) $(NFS) $(ROOT)
> + .NOTPARALLEL:
> +diff --git a/test/cp.test b/test/cp.test
> +index 0867f63..54bee3b 100644
> +--- a/test/cp.test
> ++++ b/test/cp.test
> +@@ -6,16 +6,16 @@ The cp utility should only copy ACLs if `-p' is given.
> + 	$ touch f
> + 	$ setfacl -m u:bin:rw f
> + 	$ ls -l f | awk -- '{ print $1 }'
> +-	> -rw-rw-r--+
> ++	> -rw-rw-r--
> + 	
> + 	$ cp f g
> +-	$ ls -l g | awk -- '{ print $1 }' | sed 's/\.$//g'
> ++	$ ls -l g | awk -- '{ print $1 }'
> + 	> -rw-r--r--
> + 	
> + 	$ rm g
> + 	$ cp -p f g
> + 	$ ls -l f | awk -- '{ print $1 }'
> +-	> -rw-rw-r--+
> ++	> -rw-rw-r--
> + 	
> + 	$ mkdir h
> + 	$ echo blubb > h/x
> +@@ -33,7 +33,7 @@ The cp utility should only copy ACLs if `-p' is given.
> + 	> other::r--
> + 	>
> +
> +-	$ cp -rp h i
> ++	$ cp -a h i
> + 	$ getfacl --omit-header i/x
> + 	> user::rw-
> + 	> user:bin:rwx
> +diff --git a/test/misc.test b/test/misc.test
> +index 6e98053..83080e2 100644
> +--- a/test/misc.test
> ++++ b/test/misc.test
> +@@ -11,7 +11,7 @@ Only change a base ACL:
> + 	$ setfacl -m u::r f
> + 	$ setfacl -m u::rw,u:bin:rw f
> + 	$ ls -dl f | awk '{print $1}'
> +-	> -rw-rw----+
> ++	> -rw-rw----
> + 	
> + 	$ getfacl --omit-header f
> + 	> user::rw-
> +@@ -26,7 +26,7 @@ Only change a base ACL:
> + 	$ touch f
> + 	$ setfacl -m u:bin:rw f
> + 	$ ls -dl f | awk '{print $1}'
> +-	> -rw-rw-r--+
> ++	> -rw-rw-r--
> +
> + 	$ getfacl --omit-header f
> + 	> user::rw-
> +@@ -41,7 +41,7 @@ Only change a base ACL:
> + 	$ mkdir d
> + 	$ setfacl -m u:bin:rwx d
> + 	$ ls -dl d | awk '{print $1}'
> +-	> drwxrwx---+
> ++	> drwxrwx---
> +
> + 	$ getfacl --omit-header d
> + 	> user::rwx
> +@@ -56,7 +56,7 @@ Only change a base ACL:
> + 	$ mkdir d
> + 	$ setfacl -m u:bin:rwx d
> + 	$ ls -dl d | awk '{print $1}'
> +-	> drwxrwxr-x+
> ++	> drwxrwxr-x
> +
> + 	$ getfacl --omit-header d
> + 	> user::rwx
> +@@ -75,12 +75,12 @@ Multiple users
> + 	$ touch f
> + 	$ setfacl -m u:bin:rw,u:daemon:r f
> + 	$ ls -dl f | awk '{print $1}'
> +-	> -rw-rw-r--+
> ++	> -rw-rw-r--
> +
> + 	$ getfacl --omit-header f
> + 	> user::rw-
> +-	> user:bin:rw-
> + 	> user:daemon:r--
> ++	> user:bin:rw-
> + 	> group::r--
> + 	> mask::rw-
> + 	> other::r--
> +@@ -90,12 +90,12 @@ Multiple groups
> + 	
> + 	$ setfacl -m g:users:rw,g:daemon:r f
> + 	$ ls -dl f | awk '{print $1}'
> +-	> -rw-rw-r--+
> ++	> -rw-rw-r--
> +
> + 	$ getfacl --omit-header f
> + 	> user::rw-
> +-	> user:bin:rw-
> + 	> user:daemon:r--
> ++	> user:bin:rw-
> + 	> group::r--
> + 	> group:daemon:r--
> + 	> group:users:rw-
> +@@ -107,12 +107,12 @@ Remove one group
> + 	
> + 	$ setfacl -x g:users f
> + 	$ ls -dl f | awk '{print $1}'
> +-	> -rw-rw-r--+
> ++	> -rw-rw-r--
> +
> + 	$ getfacl --omit-header f
> + 	> user::rw-
> +-	> user:bin:rw-
> + 	> user:daemon:r--
> ++	> user:bin:rw-
> + 	> group::r--
> + 	> group:daemon:r--
> + 	> mask::rw-
> +@@ -123,7 +123,7 @@ Remove one user
> + 	
> + 	$ setfacl -x u:daemon f
> + 	$ ls -dl f | awk '{print $1}'
> +-	> -rw-rw-r--+
> ++	> -rw-rw-r--
> +
> + 	$ getfacl --omit-header f
> + 	> user::rw-
> +@@ -142,12 +142,12 @@ Default ACL
> + 	$ mkdir d
> + 	$ setfacl -m u:bin:rwx,u:daemon:rw,d:u:bin:rwx,d:m:rx d
> + 	$ ls -dl d | awk '{print $1}'
> +-	> drwxrwx---+
> ++	> drwxrwx---
> +
> + 	$ getfacl --omit-header d
> + 	> user::rwx
> +-	> user:bin:rwx
> + 	> user:daemon:rw-
> ++	> user:bin:rwx
> + 	> group::r-x
> + 	> mask::rwx
> + 	> other::---
> +@@ -163,7 +163,7 @@ Umask now ignored?
> + 	$ umask 027
> + 	$ touch d/f
> + 	$ ls -dl d/f | awk '{print $1}'
> +-	> -rw-r-----+
> ++	> -rw-r-----
> +
> + 	$ getfacl --omit-header d/f
> + 	> user::rw-
> +@@ -177,7 +177,7 @@ Umask now ignored?
> + 	$ umask 022
> + 	$ touch d/f
> + 	$ ls -dl d/f | awk '{print $1}'
> +-	> -rw-r-----+
> ++	> -rw-r-----
> +
> + 	$ getfacl --omit-header d/f
> + 	> user::rw-
> +@@ -194,7 +194,7 @@ Default ACL copying
> + 	$ umask 000
> + 	$ mkdir d/d
> + 	$ ls -dl d/d | awk '{print $1}'
> +-	> drwxr-x---+
> ++	> drwxr-x---
> +
> + 	$ getfacl --omit-header d/d
> + 	> user::rwx
> +@@ -213,7 +213,7 @@ Default ACL copying
> + 	$ umask 022
> + 	$ mkdir d/d
> + 	$ ls -dl d/d | awk '{print $1}'
> +-	> drwxr-x---+
> ++	> drwxr-x---
> +
> + 	$ getfacl --omit-header d/d
> + 	> user::rwx
> +@@ -232,20 +232,20 @@ Add some users and groups
> +
> + 	$ setfacl -nm u:daemon:rx,d:u:daemon:rx,g:users:rx,g:daemon:rwx d/d
> + 	$ ls -dl d/d | awk '{print $1}'
> +-	> drwxr-x---+
> ++	> drwxr-x---
> +
> + 	$ getfacl --omit-header d/d
> + 	> user::rwx
> +-	> user:bin:rwx	#effective:r-x
> + 	> user:daemon:r-x
> ++	> user:bin:rwx	#effective:r-x
> + 	> group::r-x
> + 	> group:daemon:rwx	#effective:r-x
> + 	> group:users:r-x
> + 	> mask::r-x
> + 	> other::---
> + 	> default:user::rwx
> +-	> default:user:bin:rwx	#effective:r-x
> + 	> default:user:daemon:r-x
> ++	> default:user:bin:rwx	#effective:r-x
> + 	> default:group::r-x
> + 	> default:mask::r-x
> + 	> default:other::---
> +@@ -254,24 +254,24 @@ Add some users and groups
> + Symlink in directory with default ACL?
> + 	
> + 	$ ln -s d d/l
> +-	$ ls -dl d/l | awk '{print $1}' | sed 's/\.$//g'
> ++	$ ls -dl d/l | awk '{print $1}'
> + 	> lrwxrwxrwx
> +
> + 	$ ls -dl -L d/l | awk '{print $1}'
> +-	> drwxr-x---+
> ++	> drwxr-x---
> +
> + 	$ getfacl --omit-header d/l
> + 	> user::rwx
> +-	> user:bin:rwx	#effective:r-x
> + 	> user:daemon:r-x
> ++	> user:bin:rwx	#effective:r-x
> + 	> group::r-x
> + 	> group:daemon:rwx	#effective:r-x
> + 	> group:users:r-x
> + 	> mask::r-x
> + 	> other::---
> + 	> default:user::rwx
> +-	> default:user:bin:rwx	#effective:r-x
> + 	> default:user:daemon:r-x
> ++	> default:user:bin:rwx	#effective:r-x
> + 	> default:group::r-x
> + 	> default:mask::r-x
> + 	> default:other::---
> +@@ -283,20 +283,20 @@ Does mask manipulation work?
> + 	
> + 	$ setfacl -m g:daemon:rx,u:bin:rx d/d
> + 	$ ls -dl d/d | awk '{print $1}'
> +-	> drwxr-x---+
> ++	> drwxr-x---
> +
> + 	$ getfacl --omit-header d/d
> + 	> user::rwx
> +-	> user:bin:r-x
> + 	> user:daemon:r-x
> ++	> user:bin:r-x
> + 	> group::r-x
> + 	> group:daemon:r-x
> + 	> group:users:r-x
> + 	> mask::r-x
> + 	> other::---
> + 	> default:user::rwx
> +-	> default:user:bin:rwx	#effective:r-x
> + 	> default:user:daemon:r-x
> ++	> default:user:bin:rwx	#effective:r-x
> + 	> default:group::r-x
> + 	> default:mask::r-x
> + 	> default:other::---
> +@@ -304,20 +304,20 @@ Does mask manipulation work?
> +
> + 	$ setfacl -m d:u:bin:rwx d/d
> + 	$ ls -dl d/d | awk '{print $1}'
> +-	> drwxr-x---+
> ++	> drwxr-x---
> +
> + 	$ getfacl --omit-header d/d
> + 	> user::rwx
> +-	> user:bin:r-x
> + 	> user:daemon:r-x
> ++	> user:bin:r-x
> + 	> group::r-x
> + 	> group:daemon:r-x
> + 	> group:users:r-x
> + 	> mask::r-x
> + 	> other::---
> + 	> default:user::rwx
> +-	> default:user:bin:rwx
> + 	> default:user:daemon:r-x
> ++	> default:user:bin:rwx
> + 	> default:group::r-x
> + 	> default:mask::rwx
> + 	> default:other::---
> +@@ -329,12 +329,12 @@ Remove the default ACL
> + 	
> + 	$ setfacl -k d
> + 	$ ls -dl d | awk '{print $1}'
> +-	> drwxrwx---+
> ++	> drwxrwx---
> +
> + 	$ getfacl --omit-header d
> + 	> user::rwx
> +-	> user:bin:rwx
> + 	> user:daemon:rw-
> ++	> user:bin:rwx
> + 	> group::r-x
> + 	> mask::rwx
> + 	> other::---
> +@@ -343,7 +343,7 @@ Remove the default ACL
> + Reset to base entries
> + 	
> + 	$ setfacl -b d
> +-	$ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
> ++	$ ls -dl d | awk '{print $1}'
> + 	> drwxr-x---
> +
> + 	$ getfacl --omit-header d
> +@@ -355,7 +355,7 @@ Reset to base entries
> + Now, chmod should change the group_obj entry
> + 	
> + 	$ chmod 775 d
> +-	$ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
> ++	$ ls -dl d | awk '{print $1}'
> + 	> drwxrwxr-x
> + 	
> + 	$ getfacl --omit-header d
> +@@ -369,18 +369,18 @@ Now, chmod should change the group_obj entry
> + 	$ mkdir d
> + 	$ setfacl -m u:daemon:rwx,u:bin:rx,d:u:daemon:rwx,d:u:bin:rx d
> + 	$ ls -dl d | awk '{print $1}'
> +-	> drwxrwxr-x+
> ++	> drwxrwxr-x
> +
> + 	$ getfacl --omit-header d
> + 	> user::rwx
> +-	> user:bin:r-x
> + 	> user:daemon:rwx
> ++	> user:bin:r-x
> + 	> group::rwx
> + 	> mask::rwx
> + 	> other::r-x
> + 	> default:user::rwx
> +-	> default:user:bin:r-x
> + 	> default:user:daemon:rwx
> ++	> default:user:bin:r-x
> + 	> default:group::rwx
> + 	> default:mask::rwx
> + 	> default:other::r-x
> +@@ -388,18 +388,18 @@ Now, chmod should change the group_obj entry
> +
> + 	$ chmod 750 d
> + 	$ ls -dl d | awk '{print $1}'
> +-	> drwxr-x---+
> ++	> drwxr-x---
> +
> + 	$ getfacl --omit-header d
> + 	> user::rwx
> +-	> user:bin:r-x
> + 	> user:daemon:rwx	#effective:r-x
> ++	> user:bin:r-x
> + 	> group::rwx	#effective:r-x
> + 	> mask::r-x
> + 	> other::---
> + 	> default:user::rwx
> +-	> default:user:bin:r-x
> + 	> default:user:daemon:rwx
> ++	> default:user:bin:r-x
> + 	> default:group::rwx
> + 	> default:mask::rwx
> + 	> default:other::r-x
> +@@ -407,18 +407,18 @@ Now, chmod should change the group_obj entry
> +
> + 	$ chmod 750 d
> + 	$ ls -dl d | awk '{print $1}'
> +-	> drwxr-x---+
> ++	> drwxr-x---
> +
> + 	$ getfacl --omit-header d
> + 	> user::rwx
> +-	> user:bin:r-x
> + 	> user:daemon:rwx	#effective:r-x
> ++	> user:bin:r-x
> + 	> group::rwx	#effective:r-x
> + 	> mask::r-x
> + 	> other::---
> + 	> default:user::rwx
> +-	> default:user:bin:r-x
> + 	> default:user:daemon:rwx
> ++	> default:user:bin:r-x
> + 	> default:group::rwx
> + 	> default:mask::rwx
> + 	> default:other::r-x
> +diff --git a/test/root/permissions.test b/test/root/permissions.test
> +index afaf5f0..042005a 100644
> +--- a/test/root/permissions.test
> ++++ b/test/root/permissions.test
> +@@ -217,7 +217,7 @@ Test if symlinks are properly followed.
> + 	$ ln -s g l
> + 	$ setfacl -m u:bin:rw l
> + 	$ ls -l g | awk -- '{ print $1, $3, $4 }'
> +-	> -rw-rw----+ root root
> ++	> -rw-rw---- root root
> +
> +
> + Test if ACLs are effective for block and character special files, fifos,
> +diff --git a/test/root/setfacl.test b/test/root/setfacl.test
> +index 630e9fb..6726e63 100644
> +--- a/test/root/setfacl.test
> ++++ b/test/root/setfacl.test
> +@@ -13,7 +13,7 @@ Setfacl utility tests. Run these tests on a filesystem with ACL support.
> +
> + 	$ setfacl -m m:- g
> + 	$ ls -dl g | awk '{print $1}'
> +-	> -rw-------+
> ++	> -rw-------
> +
> + 	$ getfacl g
> + 	> # file: g
> +diff --git a/test/sbits-restore.test b/test/sbits-restore.test
> +index de21340..e5e4fb2 100644
> +--- a/test/sbits-restore.test
> ++++ b/test/sbits-restore.test
> +@@ -13,10 +13,10 @@ Ensure setting of SUID/SGID/sticky via --restore works
> + 	$ touch d/g
> + 	$ touch d/u
> + 	$ setfacl --restore d.acl
> +-	$ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
> ++	$ ls -dl d | awk '{print $1}'
> + 	> drwxr-xr-t
> +-	$ ls -dl d/u | awk '{print $1}' | sed 's/\.$//g'
> ++	$ ls -dl d/u | awk '{print $1}'
> + 	> -rwSr--r--
> +-	$ ls -dl d/g | awk '{print $1}' | sed 's/\.$//g'
> ++	$ ls -dl d/g | awk '{print $1}'
> + 	> -rw-r-Sr--
> + 	$ rm -Rf d
> +--
> +1.7.9.5
> +
> diff --git a/meta/recipes-support/attr/acl/run-ptest b/meta/recipes-support/attr/acl/run-ptest
> new file mode 100644
> index 0000000..a6c6867
> --- /dev/null
> +++ b/meta/recipes-support/attr/acl/run-ptest
> @@ -0,0 +1,5 @@
> +#!/bin/sh
> +
> +make -C test -k tests root-tests |sed \
> + -e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \
> + -e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|'
>
Chong.Lu@windriver.com - Jan. 13, 2014, 2:28 a.m.
On 01/11/2014 01:21 AM, Saul Wold wrote:
> On 01/10/2014 01:13 AM, Chong Lu wrote:
>> Install acl test suite and run it as ptest.
>> nfs test cases need depend on nfs service. So exclude them order to
>> make ptest all pass.
>>
>> Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
>> ---
>>   meta/recipes-support/attr/acl.inc                  |  15 +-
>>   .../attr/acl/acl-make-ptest-pass.patch             | 457 
>> +++++++++++++++++++++
>>   meta/recipes-support/attr/acl/run-ptest            |   5 +
>>   3 files changed, 476 insertions(+), 1 deletion(-)
>>   create mode 100644 
>> meta/recipes-support/attr/acl/acl-make-ptest-pass.patch
>>   create mode 100644 meta/recipes-support/attr/acl/run-ptest
>>
>> diff --git a/meta/recipes-support/attr/acl.inc 
>> b/meta/recipes-support/attr/acl.inc
>> index a461232..4bacf80 100644
>> --- a/meta/recipes-support/attr/acl.inc
>> +++ b/meta/recipes-support/attr/acl.inc
>> @@ -9,7 +9,10 @@ LIC_FILES_CHKSUM = 
>> "file://doc/COPYING;md5=c781d70ed2b4d48995b790403217a249 \
>> file://doc/COPYING.LGPL;md5=9e9a206917f8af112da634ce3ab41764"
>>
>>   DEPENDS = "attr"
>> -SRC_URI = 
>> "http://download.savannah.gnu.org/releases/acl/${BP}.src.tar.gz"
>> +SRC_URI = 
>> "http://download.savannah.gnu.org/releases/acl/${BP}.src.tar.gz \
>> +           file://acl-make-ptest-pass.patch \
>> +           file://run-ptest \
>> +"
>>
>>   require ea-acl.inc
>>
>> @@ -24,3 +27,13 @@ do_install_append() {
>>       sed -i ${D}${libdir}/libacl.la -e \
>>           s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
>>   }
>> +
>> +inherit ptest
>> +
>> +do_install_ptest() {
>> +    tar -cf - test/ --exclude nfs | ( cd ${D}${PTEST_PATH} && tar 
>> -xf - )
>> +    mkdir ${D}${PTEST_PATH}/include
>> +    cp ${S}/include/builddefs ${S}/include/buildmacros 
>> ${S}/include/buildrules ${D}${PTEST_PATH}/include/
>> +}
>> +
>> +RDEPENDS_${PN}-ptest = "coreutils perl-module-filehandle 
>> perl-module-getopt-std perl-module-posix"
>> diff --git a/meta/recipes-support/attr/acl/acl-make-ptest-pass.patch 
>> b/meta/recipes-support/attr/acl/acl-make-ptest-pass.patch
>> new file mode 100644
>> index 0000000..89c03c2
>> --- /dev/null
>> +++ b/meta/recipes-support/attr/acl/acl-make-ptest-pass.patch
>> @@ -0,0 +1,457 @@
>> +acl: make ptest pass
>> +
>> +Upstream-Status: Inappropriate [embedded specific]
>> +
>> +The daemon user must be a member in the bin group, else 
>> permissions.test
>> +will fail. So add daemon user to bin group.
>> +Many results of `ls' are incorrect in some test cases, modify them 
>> to make
>> +ptest pass.
>> +
> This does not seem quite right, you don't just change the tests to 
> "make ptest pass" What's wrong with the output of ls?  Is this because 
> it's using busybox's ls instead of coreutils version of ls?
>
> If that's the case then we should really have the acl-ptest package 
> have an RDEPENDS on coreutils.
>
> Sau!
>
Saul,

I have already added coreutils in RDEPENDS. But it still failed.
Many failures have the same reason.
In target, the result of `ls -l' command likes:
     -rw-rw-r--
But test cases need result:
     -rw-rw-r--+

In fact, after set acl, the correct result of `ls -l' should have "+" 
character.
But it doesn't have "+" in target.

     root@qemuarm:~# which ls
     /bin/ls
     root@qemuarm:~# ls -l /bin/ls
     lrwxrwxrwx 1 root root 17 Jan 10 08:20 /bin/ls -> /bin/ls.coreutils
     root@qemuarm:~# rpm -qa |grep coreutils
     coreutils-8.22-r0.armv5te
     root@qemuarm:~# touch f
     root@qemuarm:~# setfacl -m u:bin:rw f
     root@qemuarm:~# getfacl f
     # file: f
     # owner: root
     # group: root
     user::rw-
     user:bin:rw-
     group::r--
     mask::rw-
     other::---

     root@qemuarm:~# ls -l
     total 0
     -rw-rw---- 1 root root 0 Jan 13 02:22 f

So, in order to ignore failure, I modify the result of `ls -l'.

Best Regards
Chong

>> +Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
>> +---
>> + test/Makefile              |    2 +-
>> + test/cp.test               |    8 ++---
>> + test/misc.test             |   86 
>> ++++++++++++++++++++++----------------------
>> + test/root/permissions.test |    2 +-
>> + test/root/setfacl.test     |    2 +-
>> + test/sbits-restore.test    |    6 ++--
>> + 6 files changed, 53 insertions(+), 53 deletions(-)
>> +
>> +diff --git a/test/Makefile b/test/Makefile
>> +index d2baac8..6063a56 100644
>> +--- a/test/Makefile
>> ++++ b/test/Makefile
>> +@@ -42,7 +42,7 @@ $(NFS):
>> +     @echo "NFS specific tests"; echo "*** $@ ***"; perl run $@
>> +
>> + $(ROOT):
>> +-    @echo "Note: Tests must run as root"; echo "*** $@ ***"; perl 
>> run $@
>> ++    @echo "Note: Tests must run as root"; echo "*** $@ ***"; 
>> usermod -G bin daemon; perl run $@
>> +
>> + .PHONY: $(TESTS) $(NFS) $(ROOT)
>> + .NOTPARALLEL:
>> +diff --git a/test/cp.test b/test/cp.test
>> +index 0867f63..54bee3b 100644
>> +--- a/test/cp.test
>> ++++ b/test/cp.test
>> +@@ -6,16 +6,16 @@ The cp utility should only copy ACLs if `-p' is 
>> given.
>> +     $ touch f
>> +     $ setfacl -m u:bin:rw f
>> +     $ ls -l f | awk -- '{ print $1 }'
>> +-    > -rw-rw-r--+
>> ++    > -rw-rw-r--
>> +
>> +     $ cp f g
>> +-    $ ls -l g | awk -- '{ print $1 }' | sed 's/\.$//g'
>> ++    $ ls -l g | awk -- '{ print $1 }'
>> +     > -rw-r--r--
>> +
>> +     $ rm g
>> +     $ cp -p f g
>> +     $ ls -l f | awk -- '{ print $1 }'
>> +-    > -rw-rw-r--+
>> ++    > -rw-rw-r--
>> +
>> +     $ mkdir h
>> +     $ echo blubb > h/x
>> +@@ -33,7 +33,7 @@ The cp utility should only copy ACLs if `-p' is 
>> given.
>> +     > other::r--
>> +     >
>> +
>> +-    $ cp -rp h i
>> ++    $ cp -a h i
>> +     $ getfacl --omit-header i/x
>> +     > user::rw-
>> +     > user:bin:rwx
>> +diff --git a/test/misc.test b/test/misc.test
>> +index 6e98053..83080e2 100644
>> +--- a/test/misc.test
>> ++++ b/test/misc.test
>> +@@ -11,7 +11,7 @@ Only change a base ACL:
>> +     $ setfacl -m u::r f
>> +     $ setfacl -m u::rw,u:bin:rw f
>> +     $ ls -dl f | awk '{print $1}'
>> +-    > -rw-rw----+
>> ++    > -rw-rw----
>> +
>> +     $ getfacl --omit-header f
>> +     > user::rw-
>> +@@ -26,7 +26,7 @@ Only change a base ACL:
>> +     $ touch f
>> +     $ setfacl -m u:bin:rw f
>> +     $ ls -dl f | awk '{print $1}'
>> +-    > -rw-rw-r--+
>> ++    > -rw-rw-r--
>> +
>> +     $ getfacl --omit-header f
>> +     > user::rw-
>> +@@ -41,7 +41,7 @@ Only change a base ACL:
>> +     $ mkdir d
>> +     $ setfacl -m u:bin:rwx d
>> +     $ ls -dl d | awk '{print $1}'
>> +-    > drwxrwx---+
>> ++    > drwxrwx---
>> +
>> +     $ getfacl --omit-header d
>> +     > user::rwx
>> +@@ -56,7 +56,7 @@ Only change a base ACL:
>> +     $ mkdir d
>> +     $ setfacl -m u:bin:rwx d
>> +     $ ls -dl d | awk '{print $1}'
>> +-    > drwxrwxr-x+
>> ++    > drwxrwxr-x
>> +
>> +     $ getfacl --omit-header d
>> +     > user::rwx
>> +@@ -75,12 +75,12 @@ Multiple users
>> +     $ touch f
>> +     $ setfacl -m u:bin:rw,u:daemon:r f
>> +     $ ls -dl f | awk '{print $1}'
>> +-    > -rw-rw-r--+
>> ++    > -rw-rw-r--
>> +
>> +     $ getfacl --omit-header f
>> +     > user::rw-
>> +-    > user:bin:rw-
>> +     > user:daemon:r--
>> ++    > user:bin:rw-
>> +     > group::r--
>> +     > mask::rw-
>> +     > other::r--
>> +@@ -90,12 +90,12 @@ Multiple groups
>> +
>> +     $ setfacl -m g:users:rw,g:daemon:r f
>> +     $ ls -dl f | awk '{print $1}'
>> +-    > -rw-rw-r--+
>> ++    > -rw-rw-r--
>> +
>> +     $ getfacl --omit-header f
>> +     > user::rw-
>> +-    > user:bin:rw-
>> +     > user:daemon:r--
>> ++    > user:bin:rw-
>> +     > group::r--
>> +     > group:daemon:r--
>> +     > group:users:rw-
>> +@@ -107,12 +107,12 @@ Remove one group
>> +
>> +     $ setfacl -x g:users f
>> +     $ ls -dl f | awk '{print $1}'
>> +-    > -rw-rw-r--+
>> ++    > -rw-rw-r--
>> +
>> +     $ getfacl --omit-header f
>> +     > user::rw-
>> +-    > user:bin:rw-
>> +     > user:daemon:r--
>> ++    > user:bin:rw-
>> +     > group::r--
>> +     > group:daemon:r--
>> +     > mask::rw-
>> +@@ -123,7 +123,7 @@ Remove one user
>> +
>> +     $ setfacl -x u:daemon f
>> +     $ ls -dl f | awk '{print $1}'
>> +-    > -rw-rw-r--+
>> ++    > -rw-rw-r--
>> +
>> +     $ getfacl --omit-header f
>> +     > user::rw-
>> +@@ -142,12 +142,12 @@ Default ACL
>> +     $ mkdir d
>> +     $ setfacl -m u:bin:rwx,u:daemon:rw,d:u:bin:rwx,d:m:rx d
>> +     $ ls -dl d | awk '{print $1}'
>> +-    > drwxrwx---+
>> ++    > drwxrwx---
>> +
>> +     $ getfacl --omit-header d
>> +     > user::rwx
>> +-    > user:bin:rwx
>> +     > user:daemon:rw-
>> ++    > user:bin:rwx
>> +     > group::r-x
>> +     > mask::rwx
>> +     > other::---
>> +@@ -163,7 +163,7 @@ Umask now ignored?
>> +     $ umask 027
>> +     $ touch d/f
>> +     $ ls -dl d/f | awk '{print $1}'
>> +-    > -rw-r-----+
>> ++    > -rw-r-----
>> +
>> +     $ getfacl --omit-header d/f
>> +     > user::rw-
>> +@@ -177,7 +177,7 @@ Umask now ignored?
>> +     $ umask 022
>> +     $ touch d/f
>> +     $ ls -dl d/f | awk '{print $1}'
>> +-    > -rw-r-----+
>> ++    > -rw-r-----
>> +
>> +     $ getfacl --omit-header d/f
>> +     > user::rw-
>> +@@ -194,7 +194,7 @@ Default ACL copying
>> +     $ umask 000
>> +     $ mkdir d/d
>> +     $ ls -dl d/d | awk '{print $1}'
>> +-    > drwxr-x---+
>> ++    > drwxr-x---
>> +
>> +     $ getfacl --omit-header d/d
>> +     > user::rwx
>> +@@ -213,7 +213,7 @@ Default ACL copying
>> +     $ umask 022
>> +     $ mkdir d/d
>> +     $ ls -dl d/d | awk '{print $1}'
>> +-    > drwxr-x---+
>> ++    > drwxr-x---
>> +
>> +     $ getfacl --omit-header d/d
>> +     > user::rwx
>> +@@ -232,20 +232,20 @@ Add some users and groups
>> +
>> +     $ setfacl -nm u:daemon:rx,d:u:daemon:rx,g:users:rx,g:daemon:rwx 
>> d/d
>> +     $ ls -dl d/d | awk '{print $1}'
>> +-    > drwxr-x---+
>> ++    > drwxr-x---
>> +
>> +     $ getfacl --omit-header d/d
>> +     > user::rwx
>> +-    > user:bin:rwx    #effective:r-x
>> +     > user:daemon:r-x
>> ++    > user:bin:rwx    #effective:r-x
>> +     > group::r-x
>> +     > group:daemon:rwx    #effective:r-x
>> +     > group:users:r-x
>> +     > mask::r-x
>> +     > other::---
>> +     > default:user::rwx
>> +-    > default:user:bin:rwx    #effective:r-x
>> +     > default:user:daemon:r-x
>> ++    > default:user:bin:rwx    #effective:r-x
>> +     > default:group::r-x
>> +     > default:mask::r-x
>> +     > default:other::---
>> +@@ -254,24 +254,24 @@ Add some users and groups
>> + Symlink in directory with default ACL?
>> +
>> +     $ ln -s d d/l
>> +-    $ ls -dl d/l | awk '{print $1}' | sed 's/\.$//g'
>> ++    $ ls -dl d/l | awk '{print $1}'
>> +     > lrwxrwxrwx
>> +
>> +     $ ls -dl -L d/l | awk '{print $1}'
>> +-    > drwxr-x---+
>> ++    > drwxr-x---
>> +
>> +     $ getfacl --omit-header d/l
>> +     > user::rwx
>> +-    > user:bin:rwx    #effective:r-x
>> +     > user:daemon:r-x
>> ++    > user:bin:rwx    #effective:r-x
>> +     > group::r-x
>> +     > group:daemon:rwx    #effective:r-x
>> +     > group:users:r-x
>> +     > mask::r-x
>> +     > other::---
>> +     > default:user::rwx
>> +-    > default:user:bin:rwx    #effective:r-x
>> +     > default:user:daemon:r-x
>> ++    > default:user:bin:rwx    #effective:r-x
>> +     > default:group::r-x
>> +     > default:mask::r-x
>> +     > default:other::---
>> +@@ -283,20 +283,20 @@ Does mask manipulation work?
>> +
>> +     $ setfacl -m g:daemon:rx,u:bin:rx d/d
>> +     $ ls -dl d/d | awk '{print $1}'
>> +-    > drwxr-x---+
>> ++    > drwxr-x---
>> +
>> +     $ getfacl --omit-header d/d
>> +     > user::rwx
>> +-    > user:bin:r-x
>> +     > user:daemon:r-x
>> ++    > user:bin:r-x
>> +     > group::r-x
>> +     > group:daemon:r-x
>> +     > group:users:r-x
>> +     > mask::r-x
>> +     > other::---
>> +     > default:user::rwx
>> +-    > default:user:bin:rwx    #effective:r-x
>> +     > default:user:daemon:r-x
>> ++    > default:user:bin:rwx    #effective:r-x
>> +     > default:group::r-x
>> +     > default:mask::r-x
>> +     > default:other::---
>> +@@ -304,20 +304,20 @@ Does mask manipulation work?
>> +
>> +     $ setfacl -m d:u:bin:rwx d/d
>> +     $ ls -dl d/d | awk '{print $1}'
>> +-    > drwxr-x---+
>> ++    > drwxr-x---
>> +
>> +     $ getfacl --omit-header d/d
>> +     > user::rwx
>> +-    > user:bin:r-x
>> +     > user:daemon:r-x
>> ++    > user:bin:r-x
>> +     > group::r-x
>> +     > group:daemon:r-x
>> +     > group:users:r-x
>> +     > mask::r-x
>> +     > other::---
>> +     > default:user::rwx
>> +-    > default:user:bin:rwx
>> +     > default:user:daemon:r-x
>> ++    > default:user:bin:rwx
>> +     > default:group::r-x
>> +     > default:mask::rwx
>> +     > default:other::---
>> +@@ -329,12 +329,12 @@ Remove the default ACL
>> +
>> +     $ setfacl -k d
>> +     $ ls -dl d | awk '{print $1}'
>> +-    > drwxrwx---+
>> ++    > drwxrwx---
>> +
>> +     $ getfacl --omit-header d
>> +     > user::rwx
>> +-    > user:bin:rwx
>> +     > user:daemon:rw-
>> ++    > user:bin:rwx
>> +     > group::r-x
>> +     > mask::rwx
>> +     > other::---
>> +@@ -343,7 +343,7 @@ Remove the default ACL
>> + Reset to base entries
>> +
>> +     $ setfacl -b d
>> +-    $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
>> ++    $ ls -dl d | awk '{print $1}'
>> +     > drwxr-x---
>> +
>> +     $ getfacl --omit-header d
>> +@@ -355,7 +355,7 @@ Reset to base entries
>> + Now, chmod should change the group_obj entry
>> +
>> +     $ chmod 775 d
>> +-    $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
>> ++    $ ls -dl d | awk '{print $1}'
>> +     > drwxrwxr-x
>> +
>> +     $ getfacl --omit-header d
>> +@@ -369,18 +369,18 @@ Now, chmod should change the group_obj entry
>> +     $ mkdir d
>> +     $ setfacl -m u:daemon:rwx,u:bin:rx,d:u:daemon:rwx,d:u:bin:rx d
>> +     $ ls -dl d | awk '{print $1}'
>> +-    > drwxrwxr-x+
>> ++    > drwxrwxr-x
>> +
>> +     $ getfacl --omit-header d
>> +     > user::rwx
>> +-    > user:bin:r-x
>> +     > user:daemon:rwx
>> ++    > user:bin:r-x
>> +     > group::rwx
>> +     > mask::rwx
>> +     > other::r-x
>> +     > default:user::rwx
>> +-    > default:user:bin:r-x
>> +     > default:user:daemon:rwx
>> ++    > default:user:bin:r-x
>> +     > default:group::rwx
>> +     > default:mask::rwx
>> +     > default:other::r-x
>> +@@ -388,18 +388,18 @@ Now, chmod should change the group_obj entry
>> +
>> +     $ chmod 750 d
>> +     $ ls -dl d | awk '{print $1}'
>> +-    > drwxr-x---+
>> ++    > drwxr-x---
>> +
>> +     $ getfacl --omit-header d
>> +     > user::rwx
>> +-    > user:bin:r-x
>> +     > user:daemon:rwx    #effective:r-x
>> ++    > user:bin:r-x
>> +     > group::rwx    #effective:r-x
>> +     > mask::r-x
>> +     > other::---
>> +     > default:user::rwx
>> +-    > default:user:bin:r-x
>> +     > default:user:daemon:rwx
>> ++    > default:user:bin:r-x
>> +     > default:group::rwx
>> +     > default:mask::rwx
>> +     > default:other::r-x
>> +@@ -407,18 +407,18 @@ Now, chmod should change the group_obj entry
>> +
>> +     $ chmod 750 d
>> +     $ ls -dl d | awk '{print $1}'
>> +-    > drwxr-x---+
>> ++    > drwxr-x---
>> +
>> +     $ getfacl --omit-header d
>> +     > user::rwx
>> +-    > user:bin:r-x
>> +     > user:daemon:rwx    #effective:r-x
>> ++    > user:bin:r-x
>> +     > group::rwx    #effective:r-x
>> +     > mask::r-x
>> +     > other::---
>> +     > default:user::rwx
>> +-    > default:user:bin:r-x
>> +     > default:user:daemon:rwx
>> ++    > default:user:bin:r-x
>> +     > default:group::rwx
>> +     > default:mask::rwx
>> +     > default:other::r-x
>> +diff --git a/test/root/permissions.test b/test/root/permissions.test
>> +index afaf5f0..042005a 100644
>> +--- a/test/root/permissions.test
>> ++++ b/test/root/permissions.test
>> +@@ -217,7 +217,7 @@ Test if symlinks are properly followed.
>> +     $ ln -s g l
>> +     $ setfacl -m u:bin:rw l
>> +     $ ls -l g | awk -- '{ print $1, $3, $4 }'
>> +-    > -rw-rw----+ root root
>> ++    > -rw-rw---- root root
>> +
>> +
>> + Test if ACLs are effective for block and character special files, 
>> fifos,
>> +diff --git a/test/root/setfacl.test b/test/root/setfacl.test
>> +index 630e9fb..6726e63 100644
>> +--- a/test/root/setfacl.test
>> ++++ b/test/root/setfacl.test
>> +@@ -13,7 +13,7 @@ Setfacl utility tests. Run these tests on a 
>> filesystem with ACL support.
>> +
>> +     $ setfacl -m m:- g
>> +     $ ls -dl g | awk '{print $1}'
>> +-    > -rw-------+
>> ++    > -rw-------
>> +
>> +     $ getfacl g
>> +     > # file: g
>> +diff --git a/test/sbits-restore.test b/test/sbits-restore.test
>> +index de21340..e5e4fb2 100644
>> +--- a/test/sbits-restore.test
>> ++++ b/test/sbits-restore.test
>> +@@ -13,10 +13,10 @@ Ensure setting of SUID/SGID/sticky via --restore 
>> works
>> +     $ touch d/g
>> +     $ touch d/u
>> +     $ setfacl --restore d.acl
>> +-    $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
>> ++    $ ls -dl d | awk '{print $1}'
>> +     > drwxr-xr-t
>> +-    $ ls -dl d/u | awk '{print $1}' | sed 's/\.$//g'
>> ++    $ ls -dl d/u | awk '{print $1}'
>> +     > -rwSr--r--
>> +-    $ ls -dl d/g | awk '{print $1}' | sed 's/\.$//g'
>> ++    $ ls -dl d/g | awk '{print $1}'
>> +     > -rw-r-Sr--
>> +     $ rm -Rf d
>> +--
>> +1.7.9.5
>> +
>> diff --git a/meta/recipes-support/attr/acl/run-ptest 
>> b/meta/recipes-support/attr/acl/run-ptest
>> new file mode 100644
>> index 0000000..a6c6867
>> --- /dev/null
>> +++ b/meta/recipes-support/attr/acl/run-ptest
>> @@ -0,0 +1,5 @@
>> +#!/bin/sh
>> +
>> +make -C test -k tests root-tests |sed \
>> + -e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \
>> + -e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|'
>>
>
>
Qi.Chen@windriver.com - Jan. 13, 2014, 2:35 a.m.
You need to add 'acl' to DISTRO_FEATURES to enable acl support for 
coreutils.

Best Regards,
Chen Qi

On 01/13/2014 10:28 AM, Lu Chong wrote:
>
> On 01/11/2014 01:21 AM, Saul Wold wrote:
>> On 01/10/2014 01:13 AM, Chong Lu wrote:
>>> Install acl test suite and run it as ptest.
>>> nfs test cases need depend on nfs service. So exclude them order to
>>> make ptest all pass.
>>>
>>> Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
>>> ---
>>>   meta/recipes-support/attr/acl.inc                  |  15 +-
>>>   .../attr/acl/acl-make-ptest-pass.patch             | 457 
>>> +++++++++++++++++++++
>>>   meta/recipes-support/attr/acl/run-ptest            |   5 +
>>>   3 files changed, 476 insertions(+), 1 deletion(-)
>>>   create mode 100644 
>>> meta/recipes-support/attr/acl/acl-make-ptest-pass.patch
>>>   create mode 100644 meta/recipes-support/attr/acl/run-ptest
>>>
>>> diff --git a/meta/recipes-support/attr/acl.inc 
>>> b/meta/recipes-support/attr/acl.inc
>>> index a461232..4bacf80 100644
>>> --- a/meta/recipes-support/attr/acl.inc
>>> +++ b/meta/recipes-support/attr/acl.inc
>>> @@ -9,7 +9,10 @@ LIC_FILES_CHKSUM = 
>>> "file://doc/COPYING;md5=c781d70ed2b4d48995b790403217a249 \
>>> file://doc/COPYING.LGPL;md5=9e9a206917f8af112da634ce3ab41764"
>>>
>>>   DEPENDS = "attr"
>>> -SRC_URI = 
>>> "http://download.savannah.gnu.org/releases/acl/${BP}.src.tar.gz"
>>> +SRC_URI = 
>>> "http://download.savannah.gnu.org/releases/acl/${BP}.src.tar.gz \
>>> +           file://acl-make-ptest-pass.patch \
>>> +           file://run-ptest \
>>> +"
>>>
>>>   require ea-acl.inc
>>>
>>> @@ -24,3 +27,13 @@ do_install_append() {
>>>       sed -i ${D}${libdir}/libacl.la -e \
>>>           s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
>>>   }
>>> +
>>> +inherit ptest
>>> +
>>> +do_install_ptest() {
>>> +    tar -cf - test/ --exclude nfs | ( cd ${D}${PTEST_PATH} && tar 
>>> -xf - )
>>> +    mkdir ${D}${PTEST_PATH}/include
>>> +    cp ${S}/include/builddefs ${S}/include/buildmacros 
>>> ${S}/include/buildrules ${D}${PTEST_PATH}/include/
>>> +}
>>> +
>>> +RDEPENDS_${PN}-ptest = "coreutils perl-module-filehandle 
>>> perl-module-getopt-std perl-module-posix"
>>> diff --git a/meta/recipes-support/attr/acl/acl-make-ptest-pass.patch 
>>> b/meta/recipes-support/attr/acl/acl-make-ptest-pass.patch
>>> new file mode 100644
>>> index 0000000..89c03c2
>>> --- /dev/null
>>> +++ b/meta/recipes-support/attr/acl/acl-make-ptest-pass.patch
>>> @@ -0,0 +1,457 @@
>>> +acl: make ptest pass
>>> +
>>> +Upstream-Status: Inappropriate [embedded specific]
>>> +
>>> +The daemon user must be a member in the bin group, else 
>>> permissions.test
>>> +will fail. So add daemon user to bin group.
>>> +Many results of `ls' are incorrect in some test cases, modify them 
>>> to make
>>> +ptest pass.
>>> +
>> This does not seem quite right, you don't just change the tests to 
>> "make ptest pass" What's wrong with the output of ls?  Is this 
>> because it's using busybox's ls instead of coreutils version of ls?
>>
>> If that's the case then we should really have the acl-ptest package 
>> have an RDEPENDS on coreutils.
>>
>> Sau!
>>
> Saul,
>
> I have already added coreutils in RDEPENDS. But it still failed.
> Many failures have the same reason.
> In target, the result of `ls -l' command likes:
>     -rw-rw-r--
> But test cases need result:
>     -rw-rw-r--+
>
> In fact, after set acl, the correct result of `ls -l' should have "+" 
> character.
> But it doesn't have "+" in target.
>
>     root@qemuarm:~# which ls
>     /bin/ls
>     root@qemuarm:~# ls -l /bin/ls
>     lrwxrwxrwx 1 root root 17 Jan 10 08:20 /bin/ls -> /bin/ls.coreutils
>     root@qemuarm:~# rpm -qa |grep coreutils
>     coreutils-8.22-r0.armv5te
>     root@qemuarm:~# touch f
>     root@qemuarm:~# setfacl -m u:bin:rw f
>     root@qemuarm:~# getfacl f
>     # file: f
>     # owner: root
>     # group: root
>     user::rw-
>     user:bin:rw-
>     group::r--
>     mask::rw-
>     other::---
>
>     root@qemuarm:~# ls -l
>     total 0
>     -rw-rw---- 1 root root 0 Jan 13 02:22 f
>
> So, in order to ignore failure, I modify the result of `ls -l'.
>
> Best Regards
> Chong
>
>>> +Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
>>> +---
>>> + test/Makefile              |    2 +-
>>> + test/cp.test               |    8 ++---
>>> + test/misc.test             |   86 
>>> ++++++++++++++++++++++----------------------
>>> + test/root/permissions.test |    2 +-
>>> + test/root/setfacl.test     |    2 +-
>>> + test/sbits-restore.test    |    6 ++--
>>> + 6 files changed, 53 insertions(+), 53 deletions(-)
>>> +
>>> +diff --git a/test/Makefile b/test/Makefile
>>> +index d2baac8..6063a56 100644
>>> +--- a/test/Makefile
>>> ++++ b/test/Makefile
>>> +@@ -42,7 +42,7 @@ $(NFS):
>>> +     @echo "NFS specific tests"; echo "*** $@ ***"; perl run $@
>>> +
>>> + $(ROOT):
>>> +-    @echo "Note: Tests must run as root"; echo "*** $@ ***"; perl 
>>> run $@
>>> ++    @echo "Note: Tests must run as root"; echo "*** $@ ***"; 
>>> usermod -G bin daemon; perl run $@
>>> +
>>> + .PHONY: $(TESTS) $(NFS) $(ROOT)
>>> + .NOTPARALLEL:
>>> +diff --git a/test/cp.test b/test/cp.test
>>> +index 0867f63..54bee3b 100644
>>> +--- a/test/cp.test
>>> ++++ b/test/cp.test
>>> +@@ -6,16 +6,16 @@ The cp utility should only copy ACLs if `-p' is 
>>> given.
>>> +     $ touch f
>>> +     $ setfacl -m u:bin:rw f
>>> +     $ ls -l f | awk -- '{ print $1 }'
>>> +-    > -rw-rw-r--+
>>> ++    > -rw-rw-r--
>>> +
>>> +     $ cp f g
>>> +-    $ ls -l g | awk -- '{ print $1 }' | sed 's/\.$//g'
>>> ++    $ ls -l g | awk -- '{ print $1 }'
>>> +     > -rw-r--r--
>>> +
>>> +     $ rm g
>>> +     $ cp -p f g
>>> +     $ ls -l f | awk -- '{ print $1 }'
>>> +-    > -rw-rw-r--+
>>> ++    > -rw-rw-r--
>>> +
>>> +     $ mkdir h
>>> +     $ echo blubb > h/x
>>> +@@ -33,7 +33,7 @@ The cp utility should only copy ACLs if `-p' is 
>>> given.
>>> +     > other::r--
>>> +     >
>>> +
>>> +-    $ cp -rp h i
>>> ++    $ cp -a h i
>>> +     $ getfacl --omit-header i/x
>>> +     > user::rw-
>>> +     > user:bin:rwx
>>> +diff --git a/test/misc.test b/test/misc.test
>>> +index 6e98053..83080e2 100644
>>> +--- a/test/misc.test
>>> ++++ b/test/misc.test
>>> +@@ -11,7 +11,7 @@ Only change a base ACL:
>>> +     $ setfacl -m u::r f
>>> +     $ setfacl -m u::rw,u:bin:rw f
>>> +     $ ls -dl f | awk '{print $1}'
>>> +-    > -rw-rw----+
>>> ++    > -rw-rw----
>>> +
>>> +     $ getfacl --omit-header f
>>> +     > user::rw-
>>> +@@ -26,7 +26,7 @@ Only change a base ACL:
>>> +     $ touch f
>>> +     $ setfacl -m u:bin:rw f
>>> +     $ ls -dl f | awk '{print $1}'
>>> +-    > -rw-rw-r--+
>>> ++    > -rw-rw-r--
>>> +
>>> +     $ getfacl --omit-header f
>>> +     > user::rw-
>>> +@@ -41,7 +41,7 @@ Only change a base ACL:
>>> +     $ mkdir d
>>> +     $ setfacl -m u:bin:rwx d
>>> +     $ ls -dl d | awk '{print $1}'
>>> +-    > drwxrwx---+
>>> ++    > drwxrwx---
>>> +
>>> +     $ getfacl --omit-header d
>>> +     > user::rwx
>>> +@@ -56,7 +56,7 @@ Only change a base ACL:
>>> +     $ mkdir d
>>> +     $ setfacl -m u:bin:rwx d
>>> +     $ ls -dl d | awk '{print $1}'
>>> +-    > drwxrwxr-x+
>>> ++    > drwxrwxr-x
>>> +
>>> +     $ getfacl --omit-header d
>>> +     > user::rwx
>>> +@@ -75,12 +75,12 @@ Multiple users
>>> +     $ touch f
>>> +     $ setfacl -m u:bin:rw,u:daemon:r f
>>> +     $ ls -dl f | awk '{print $1}'
>>> +-    > -rw-rw-r--+
>>> ++    > -rw-rw-r--
>>> +
>>> +     $ getfacl --omit-header f
>>> +     > user::rw-
>>> +-    > user:bin:rw-
>>> +     > user:daemon:r--
>>> ++    > user:bin:rw-
>>> +     > group::r--
>>> +     > mask::rw-
>>> +     > other::r--
>>> +@@ -90,12 +90,12 @@ Multiple groups
>>> +
>>> +     $ setfacl -m g:users:rw,g:daemon:r f
>>> +     $ ls -dl f | awk '{print $1}'
>>> +-    > -rw-rw-r--+
>>> ++    > -rw-rw-r--
>>> +
>>> +     $ getfacl --omit-header f
>>> +     > user::rw-
>>> +-    > user:bin:rw-
>>> +     > user:daemon:r--
>>> ++    > user:bin:rw-
>>> +     > group::r--
>>> +     > group:daemon:r--
>>> +     > group:users:rw-
>>> +@@ -107,12 +107,12 @@ Remove one group
>>> +
>>> +     $ setfacl -x g:users f
>>> +     $ ls -dl f | awk '{print $1}'
>>> +-    > -rw-rw-r--+
>>> ++    > -rw-rw-r--
>>> +
>>> +     $ getfacl --omit-header f
>>> +     > user::rw-
>>> +-    > user:bin:rw-
>>> +     > user:daemon:r--
>>> ++    > user:bin:rw-
>>> +     > group::r--
>>> +     > group:daemon:r--
>>> +     > mask::rw-
>>> +@@ -123,7 +123,7 @@ Remove one user
>>> +
>>> +     $ setfacl -x u:daemon f
>>> +     $ ls -dl f | awk '{print $1}'
>>> +-    > -rw-rw-r--+
>>> ++    > -rw-rw-r--
>>> +
>>> +     $ getfacl --omit-header f
>>> +     > user::rw-
>>> +@@ -142,12 +142,12 @@ Default ACL
>>> +     $ mkdir d
>>> +     $ setfacl -m u:bin:rwx,u:daemon:rw,d:u:bin:rwx,d:m:rx d
>>> +     $ ls -dl d | awk '{print $1}'
>>> +-    > drwxrwx---+
>>> ++    > drwxrwx---
>>> +
>>> +     $ getfacl --omit-header d
>>> +     > user::rwx
>>> +-    > user:bin:rwx
>>> +     > user:daemon:rw-
>>> ++    > user:bin:rwx
>>> +     > group::r-x
>>> +     > mask::rwx
>>> +     > other::---
>>> +@@ -163,7 +163,7 @@ Umask now ignored?
>>> +     $ umask 027
>>> +     $ touch d/f
>>> +     $ ls -dl d/f | awk '{print $1}'
>>> +-    > -rw-r-----+
>>> ++    > -rw-r-----
>>> +
>>> +     $ getfacl --omit-header d/f
>>> +     > user::rw-
>>> +@@ -177,7 +177,7 @@ Umask now ignored?
>>> +     $ umask 022
>>> +     $ touch d/f
>>> +     $ ls -dl d/f | awk '{print $1}'
>>> +-    > -rw-r-----+
>>> ++    > -rw-r-----
>>> +
>>> +     $ getfacl --omit-header d/f
>>> +     > user::rw-
>>> +@@ -194,7 +194,7 @@ Default ACL copying
>>> +     $ umask 000
>>> +     $ mkdir d/d
>>> +     $ ls -dl d/d | awk '{print $1}'
>>> +-    > drwxr-x---+
>>> ++    > drwxr-x---
>>> +
>>> +     $ getfacl --omit-header d/d
>>> +     > user::rwx
>>> +@@ -213,7 +213,7 @@ Default ACL copying
>>> +     $ umask 022
>>> +     $ mkdir d/d
>>> +     $ ls -dl d/d | awk '{print $1}'
>>> +-    > drwxr-x---+
>>> ++    > drwxr-x---
>>> +
>>> +     $ getfacl --omit-header d/d
>>> +     > user::rwx
>>> +@@ -232,20 +232,20 @@ Add some users and groups
>>> +
>>> +     $ setfacl -nm 
>>> u:daemon:rx,d:u:daemon:rx,g:users:rx,g:daemon:rwx d/d
>>> +     $ ls -dl d/d | awk '{print $1}'
>>> +-    > drwxr-x---+
>>> ++    > drwxr-x---
>>> +
>>> +     $ getfacl --omit-header d/d
>>> +     > user::rwx
>>> +-    > user:bin:rwx    #effective:r-x
>>> +     > user:daemon:r-x
>>> ++    > user:bin:rwx    #effective:r-x
>>> +     > group::r-x
>>> +     > group:daemon:rwx    #effective:r-x
>>> +     > group:users:r-x
>>> +     > mask::r-x
>>> +     > other::---
>>> +     > default:user::rwx
>>> +-    > default:user:bin:rwx    #effective:r-x
>>> +     > default:user:daemon:r-x
>>> ++    > default:user:bin:rwx    #effective:r-x
>>> +     > default:group::r-x
>>> +     > default:mask::r-x
>>> +     > default:other::---
>>> +@@ -254,24 +254,24 @@ Add some users and groups
>>> + Symlink in directory with default ACL?
>>> +
>>> +     $ ln -s d d/l
>>> +-    $ ls -dl d/l | awk '{print $1}' | sed 's/\.$//g'
>>> ++    $ ls -dl d/l | awk '{print $1}'
>>> +     > lrwxrwxrwx
>>> +
>>> +     $ ls -dl -L d/l | awk '{print $1}'
>>> +-    > drwxr-x---+
>>> ++    > drwxr-x---
>>> +
>>> +     $ getfacl --omit-header d/l
>>> +     > user::rwx
>>> +-    > user:bin:rwx    #effective:r-x
>>> +     > user:daemon:r-x
>>> ++    > user:bin:rwx    #effective:r-x
>>> +     > group::r-x
>>> +     > group:daemon:rwx    #effective:r-x
>>> +     > group:users:r-x
>>> +     > mask::r-x
>>> +     > other::---
>>> +     > default:user::rwx
>>> +-    > default:user:bin:rwx    #effective:r-x
>>> +     > default:user:daemon:r-x
>>> ++    > default:user:bin:rwx    #effective:r-x
>>> +     > default:group::r-x
>>> +     > default:mask::r-x
>>> +     > default:other::---
>>> +@@ -283,20 +283,20 @@ Does mask manipulation work?
>>> +
>>> +     $ setfacl -m g:daemon:rx,u:bin:rx d/d
>>> +     $ ls -dl d/d | awk '{print $1}'
>>> +-    > drwxr-x---+
>>> ++    > drwxr-x---
>>> +
>>> +     $ getfacl --omit-header d/d
>>> +     > user::rwx
>>> +-    > user:bin:r-x
>>> +     > user:daemon:r-x
>>> ++    > user:bin:r-x
>>> +     > group::r-x
>>> +     > group:daemon:r-x
>>> +     > group:users:r-x
>>> +     > mask::r-x
>>> +     > other::---
>>> +     > default:user::rwx
>>> +-    > default:user:bin:rwx    #effective:r-x
>>> +     > default:user:daemon:r-x
>>> ++    > default:user:bin:rwx    #effective:r-x
>>> +     > default:group::r-x
>>> +     > default:mask::r-x
>>> +     > default:other::---
>>> +@@ -304,20 +304,20 @@ Does mask manipulation work?
>>> +
>>> +     $ setfacl -m d:u:bin:rwx d/d
>>> +     $ ls -dl d/d | awk '{print $1}'
>>> +-    > drwxr-x---+
>>> ++    > drwxr-x---
>>> +
>>> +     $ getfacl --omit-header d/d
>>> +     > user::rwx
>>> +-    > user:bin:r-x
>>> +     > user:daemon:r-x
>>> ++    > user:bin:r-x
>>> +     > group::r-x
>>> +     > group:daemon:r-x
>>> +     > group:users:r-x
>>> +     > mask::r-x
>>> +     > other::---
>>> +     > default:user::rwx
>>> +-    > default:user:bin:rwx
>>> +     > default:user:daemon:r-x
>>> ++    > default:user:bin:rwx
>>> +     > default:group::r-x
>>> +     > default:mask::rwx
>>> +     > default:other::---
>>> +@@ -329,12 +329,12 @@ Remove the default ACL
>>> +
>>> +     $ setfacl -k d
>>> +     $ ls -dl d | awk '{print $1}'
>>> +-    > drwxrwx---+
>>> ++    > drwxrwx---
>>> +
>>> +     $ getfacl --omit-header d
>>> +     > user::rwx
>>> +-    > user:bin:rwx
>>> +     > user:daemon:rw-
>>> ++    > user:bin:rwx
>>> +     > group::r-x
>>> +     > mask::rwx
>>> +     > other::---
>>> +@@ -343,7 +343,7 @@ Remove the default ACL
>>> + Reset to base entries
>>> +
>>> +     $ setfacl -b d
>>> +-    $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
>>> ++    $ ls -dl d | awk '{print $1}'
>>> +     > drwxr-x---
>>> +
>>> +     $ getfacl --omit-header d
>>> +@@ -355,7 +355,7 @@ Reset to base entries
>>> + Now, chmod should change the group_obj entry
>>> +
>>> +     $ chmod 775 d
>>> +-    $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
>>> ++    $ ls -dl d | awk '{print $1}'
>>> +     > drwxrwxr-x
>>> +
>>> +     $ getfacl --omit-header d
>>> +@@ -369,18 +369,18 @@ Now, chmod should change the group_obj entry
>>> +     $ mkdir d
>>> +     $ setfacl -m u:daemon:rwx,u:bin:rx,d:u:daemon:rwx,d:u:bin:rx d
>>> +     $ ls -dl d | awk '{print $1}'
>>> +-    > drwxrwxr-x+
>>> ++    > drwxrwxr-x
>>> +
>>> +     $ getfacl --omit-header d
>>> +     > user::rwx
>>> +-    > user:bin:r-x
>>> +     > user:daemon:rwx
>>> ++    > user:bin:r-x
>>> +     > group::rwx
>>> +     > mask::rwx
>>> +     > other::r-x
>>> +     > default:user::rwx
>>> +-    > default:user:bin:r-x
>>> +     > default:user:daemon:rwx
>>> ++    > default:user:bin:r-x
>>> +     > default:group::rwx
>>> +     > default:mask::rwx
>>> +     > default:other::r-x
>>> +@@ -388,18 +388,18 @@ Now, chmod should change the group_obj entry
>>> +
>>> +     $ chmod 750 d
>>> +     $ ls -dl d | awk '{print $1}'
>>> +-    > drwxr-x---+
>>> ++    > drwxr-x---
>>> +
>>> +     $ getfacl --omit-header d
>>> +     > user::rwx
>>> +-    > user:bin:r-x
>>> +     > user:daemon:rwx    #effective:r-x
>>> ++    > user:bin:r-x
>>> +     > group::rwx    #effective:r-x
>>> +     > mask::r-x
>>> +     > other::---
>>> +     > default:user::rwx
>>> +-    > default:user:bin:r-x
>>> +     > default:user:daemon:rwx
>>> ++    > default:user:bin:r-x
>>> +     > default:group::rwx
>>> +     > default:mask::rwx
>>> +     > default:other::r-x
>>> +@@ -407,18 +407,18 @@ Now, chmod should change the group_obj entry
>>> +
>>> +     $ chmod 750 d
>>> +     $ ls -dl d | awk '{print $1}'
>>> +-    > drwxr-x---+
>>> ++    > drwxr-x---
>>> +
>>> +     $ getfacl --omit-header d
>>> +     > user::rwx
>>> +-    > user:bin:r-x
>>> +     > user:daemon:rwx    #effective:r-x
>>> ++    > user:bin:r-x
>>> +     > group::rwx    #effective:r-x
>>> +     > mask::r-x
>>> +     > other::---
>>> +     > default:user::rwx
>>> +-    > default:user:bin:r-x
>>> +     > default:user:daemon:rwx
>>> ++    > default:user:bin:r-x
>>> +     > default:group::rwx
>>> +     > default:mask::rwx
>>> +     > default:other::r-x
>>> +diff --git a/test/root/permissions.test b/test/root/permissions.test
>>> +index afaf5f0..042005a 100644
>>> +--- a/test/root/permissions.test
>>> ++++ b/test/root/permissions.test
>>> +@@ -217,7 +217,7 @@ Test if symlinks are properly followed.
>>> +     $ ln -s g l
>>> +     $ setfacl -m u:bin:rw l
>>> +     $ ls -l g | awk -- '{ print $1, $3, $4 }'
>>> +-    > -rw-rw----+ root root
>>> ++    > -rw-rw---- root root
>>> +
>>> +
>>> + Test if ACLs are effective for block and character special files, 
>>> fifos,
>>> +diff --git a/test/root/setfacl.test b/test/root/setfacl.test
>>> +index 630e9fb..6726e63 100644
>>> +--- a/test/root/setfacl.test
>>> ++++ b/test/root/setfacl.test
>>> +@@ -13,7 +13,7 @@ Setfacl utility tests. Run these tests on a 
>>> filesystem with ACL support.
>>> +
>>> +     $ setfacl -m m:- g
>>> +     $ ls -dl g | awk '{print $1}'
>>> +-    > -rw-------+
>>> ++    > -rw-------
>>> +
>>> +     $ getfacl g
>>> +     > # file: g
>>> +diff --git a/test/sbits-restore.test b/test/sbits-restore.test
>>> +index de21340..e5e4fb2 100644
>>> +--- a/test/sbits-restore.test
>>> ++++ b/test/sbits-restore.test
>>> +@@ -13,10 +13,10 @@ Ensure setting of SUID/SGID/sticky via 
>>> --restore works
>>> +     $ touch d/g
>>> +     $ touch d/u
>>> +     $ setfacl --restore d.acl
>>> +-    $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
>>> ++    $ ls -dl d | awk '{print $1}'
>>> +     > drwxr-xr-t
>>> +-    $ ls -dl d/u | awk '{print $1}' | sed 's/\.$//g'
>>> ++    $ ls -dl d/u | awk '{print $1}'
>>> +     > -rwSr--r--
>>> +-    $ ls -dl d/g | awk '{print $1}' | sed 's/\.$//g'
>>> ++    $ ls -dl d/g | awk '{print $1}'
>>> +     > -rw-r-Sr--
>>> +     $ rm -Rf d
>>> +--
>>> +1.7.9.5
>>> +
>>> diff --git a/meta/recipes-support/attr/acl/run-ptest 
>>> b/meta/recipes-support/attr/acl/run-ptest
>>> new file mode 100644
>>> index 0000000..a6c6867
>>> --- /dev/null
>>> +++ b/meta/recipes-support/attr/acl/run-ptest
>>> @@ -0,0 +1,5 @@
>>> +#!/bin/sh
>>> +
>>> +make -C test -k tests root-tests |sed \
>>> + -e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \
>>> + -e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|'
>>>
>>
>>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>

Patch

diff --git a/meta/recipes-support/attr/acl.inc b/meta/recipes-support/attr/acl.inc
index a461232..4bacf80 100644
--- a/meta/recipes-support/attr/acl.inc
+++ b/meta/recipes-support/attr/acl.inc
@@ -9,7 +9,10 @@  LIC_FILES_CHKSUM = "file://doc/COPYING;md5=c781d70ed2b4d48995b790403217a249 \
                     file://doc/COPYING.LGPL;md5=9e9a206917f8af112da634ce3ab41764"
 
 DEPENDS = "attr"
-SRC_URI = "http://download.savannah.gnu.org/releases/acl/${BP}.src.tar.gz"
+SRC_URI = "http://download.savannah.gnu.org/releases/acl/${BP}.src.tar.gz \
+           file://acl-make-ptest-pass.patch \
+           file://run-ptest \
+"
 
 require ea-acl.inc
 
@@ -24,3 +27,13 @@  do_install_append() {
 	sed -i ${D}${libdir}/libacl.la -e \
 	    s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
 }
+
+inherit ptest
+
+do_install_ptest() {
+	tar -cf - test/ --exclude nfs | ( cd ${D}${PTEST_PATH} && tar -xf - )
+	mkdir ${D}${PTEST_PATH}/include
+	cp ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
+}
+
+RDEPENDS_${PN}-ptest = "coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix"
diff --git a/meta/recipes-support/attr/acl/acl-make-ptest-pass.patch b/meta/recipes-support/attr/acl/acl-make-ptest-pass.patch
new file mode 100644
index 0000000..89c03c2
--- /dev/null
+++ b/meta/recipes-support/attr/acl/acl-make-ptest-pass.patch
@@ -0,0 +1,457 @@ 
+acl: make ptest pass
+
+Upstream-Status: Inappropriate [embedded specific]
+
+The daemon user must be a member in the bin group, else permissions.test
+will fail. So add daemon user to bin group.
+Many results of `ls' are incorrect in some test cases, modify them to make
+ptest pass.
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ test/Makefile              |    2 +-
+ test/cp.test               |    8 ++---
+ test/misc.test             |   86 ++++++++++++++++++++++----------------------
+ test/root/permissions.test |    2 +-
+ test/root/setfacl.test     |    2 +-
+ test/sbits-restore.test    |    6 ++--
+ 6 files changed, 53 insertions(+), 53 deletions(-)
+
+diff --git a/test/Makefile b/test/Makefile
+index d2baac8..6063a56 100644
+--- a/test/Makefile
++++ b/test/Makefile
+@@ -42,7 +42,7 @@ $(NFS):
+ 	@echo "NFS specific tests"; echo "*** $@ ***"; perl run $@
+ 
+ $(ROOT):
+-	@echo "Note: Tests must run as root"; echo "*** $@ ***"; perl run $@
++	@echo "Note: Tests must run as root"; echo "*** $@ ***"; usermod -G bin daemon; perl run $@
+ 
+ .PHONY: $(TESTS) $(NFS) $(ROOT)
+ .NOTPARALLEL:
+diff --git a/test/cp.test b/test/cp.test
+index 0867f63..54bee3b 100644
+--- a/test/cp.test
++++ b/test/cp.test
+@@ -6,16 +6,16 @@ The cp utility should only copy ACLs if `-p' is given.
+ 	$ touch f
+ 	$ setfacl -m u:bin:rw f
+ 	$ ls -l f | awk -- '{ print $1 }'
+-	> -rw-rw-r--+
++	> -rw-rw-r--
+ 	
+ 	$ cp f g
+-	$ ls -l g | awk -- '{ print $1 }' | sed 's/\.$//g'
++	$ ls -l g | awk -- '{ print $1 }'
+ 	> -rw-r--r--
+ 	
+ 	$ rm g
+ 	$ cp -p f g
+ 	$ ls -l f | awk -- '{ print $1 }'
+-	> -rw-rw-r--+
++	> -rw-rw-r--
+ 	
+ 	$ mkdir h
+ 	$ echo blubb > h/x
+@@ -33,7 +33,7 @@ The cp utility should only copy ACLs if `-p' is given.
+ 	> other::r--
+ 	>
+ 
+-	$ cp -rp h i
++	$ cp -a h i
+ 	$ getfacl --omit-header i/x
+ 	> user::rw-
+ 	> user:bin:rwx
+diff --git a/test/misc.test b/test/misc.test
+index 6e98053..83080e2 100644
+--- a/test/misc.test
++++ b/test/misc.test
+@@ -11,7 +11,7 @@ Only change a base ACL:
+ 	$ setfacl -m u::r f
+ 	$ setfacl -m u::rw,u:bin:rw f
+ 	$ ls -dl f | awk '{print $1}'
+-	> -rw-rw----+
++	> -rw-rw----
+ 	
+ 	$ getfacl --omit-header f
+ 	> user::rw-
+@@ -26,7 +26,7 @@ Only change a base ACL:
+ 	$ touch f
+ 	$ setfacl -m u:bin:rw f
+ 	$ ls -dl f | awk '{print $1}'
+-	> -rw-rw-r--+
++	> -rw-rw-r--
+ 
+ 	$ getfacl --omit-header f
+ 	> user::rw-
+@@ -41,7 +41,7 @@ Only change a base ACL:
+ 	$ mkdir d
+ 	$ setfacl -m u:bin:rwx d
+ 	$ ls -dl d | awk '{print $1}'
+-	> drwxrwx---+
++	> drwxrwx---
+ 
+ 	$ getfacl --omit-header d
+ 	> user::rwx
+@@ -56,7 +56,7 @@ Only change a base ACL:
+ 	$ mkdir d
+ 	$ setfacl -m u:bin:rwx d
+ 	$ ls -dl d | awk '{print $1}'
+-	> drwxrwxr-x+
++	> drwxrwxr-x
+ 
+ 	$ getfacl --omit-header d
+ 	> user::rwx
+@@ -75,12 +75,12 @@ Multiple users
+ 	$ touch f
+ 	$ setfacl -m u:bin:rw,u:daemon:r f
+ 	$ ls -dl f | awk '{print $1}'
+-	> -rw-rw-r--+
++	> -rw-rw-r--
+ 
+ 	$ getfacl --omit-header f
+ 	> user::rw-
+-	> user:bin:rw-
+ 	> user:daemon:r--
++	> user:bin:rw-
+ 	> group::r--
+ 	> mask::rw-
+ 	> other::r--
+@@ -90,12 +90,12 @@ Multiple groups
+ 	 
+ 	$ setfacl -m g:users:rw,g:daemon:r f
+ 	$ ls -dl f | awk '{print $1}'
+-	> -rw-rw-r--+
++	> -rw-rw-r--
+ 
+ 	$ getfacl --omit-header f
+ 	> user::rw-
+-	> user:bin:rw-
+ 	> user:daemon:r--
++	> user:bin:rw-
+ 	> group::r--
+ 	> group:daemon:r--
+ 	> group:users:rw-
+@@ -107,12 +107,12 @@ Remove one group
+ 	 
+ 	$ setfacl -x g:users f
+ 	$ ls -dl f | awk '{print $1}'
+-	> -rw-rw-r--+
++	> -rw-rw-r--
+ 
+ 	$ getfacl --omit-header f
+ 	> user::rw-
+-	> user:bin:rw-
+ 	> user:daemon:r--
++	> user:bin:rw-
+ 	> group::r--
+ 	> group:daemon:r--
+ 	> mask::rw-
+@@ -123,7 +123,7 @@ Remove one user
+ 	 
+ 	$ setfacl -x u:daemon f
+ 	$ ls -dl f | awk '{print $1}'
+-	> -rw-rw-r--+
++	> -rw-rw-r--
+ 
+ 	$ getfacl --omit-header f
+ 	> user::rw-
+@@ -142,12 +142,12 @@ Default ACL
+ 	$ mkdir d
+ 	$ setfacl -m u:bin:rwx,u:daemon:rw,d:u:bin:rwx,d:m:rx d
+ 	$ ls -dl d | awk '{print $1}'
+-	> drwxrwx---+
++	> drwxrwx---
+ 
+ 	$ getfacl --omit-header d
+ 	> user::rwx
+-	> user:bin:rwx
+ 	> user:daemon:rw-
++	> user:bin:rwx
+ 	> group::r-x
+ 	> mask::rwx
+ 	> other::---
+@@ -163,7 +163,7 @@ Umask now ignored?
+ 	$ umask 027
+ 	$ touch d/f
+ 	$ ls -dl d/f | awk '{print $1}'
+-	> -rw-r-----+
++	> -rw-r-----
+ 
+ 	$ getfacl --omit-header d/f
+ 	> user::rw-
+@@ -177,7 +177,7 @@ Umask now ignored?
+ 	$ umask 022
+ 	$ touch d/f
+ 	$ ls -dl d/f | awk '{print $1}'
+-	> -rw-r-----+
++	> -rw-r-----
+ 
+ 	$ getfacl --omit-header d/f
+ 	> user::rw-
+@@ -194,7 +194,7 @@ Default ACL copying
+ 	$ umask 000
+ 	$ mkdir d/d
+ 	$ ls -dl d/d | awk '{print $1}'
+-	> drwxr-x---+
++	> drwxr-x---
+ 
+ 	$ getfacl --omit-header d/d
+ 	> user::rwx
+@@ -213,7 +213,7 @@ Default ACL copying
+ 	$ umask 022
+ 	$ mkdir d/d
+ 	$ ls -dl d/d | awk '{print $1}'
+-	> drwxr-x---+
++	> drwxr-x---
+ 
+ 	$ getfacl --omit-header d/d
+ 	> user::rwx
+@@ -232,20 +232,20 @@ Add some users and groups
+  
+ 	$ setfacl -nm u:daemon:rx,d:u:daemon:rx,g:users:rx,g:daemon:rwx d/d
+ 	$ ls -dl d/d | awk '{print $1}'
+-	> drwxr-x---+
++	> drwxr-x---
+ 
+ 	$ getfacl --omit-header d/d
+ 	> user::rwx
+-	> user:bin:rwx	#effective:r-x
+ 	> user:daemon:r-x
++	> user:bin:rwx	#effective:r-x
+ 	> group::r-x
+ 	> group:daemon:rwx	#effective:r-x
+ 	> group:users:r-x
+ 	> mask::r-x
+ 	> other::---
+ 	> default:user::rwx
+-	> default:user:bin:rwx	#effective:r-x
+ 	> default:user:daemon:r-x
++	> default:user:bin:rwx	#effective:r-x
+ 	> default:group::r-x
+ 	> default:mask::r-x
+ 	> default:other::---
+@@ -254,24 +254,24 @@ Add some users and groups
+ Symlink in directory with default ACL?
+ 	 
+ 	$ ln -s d d/l
+-	$ ls -dl d/l | awk '{print $1}' | sed 's/\.$//g'
++	$ ls -dl d/l | awk '{print $1}'
+ 	> lrwxrwxrwx
+ 
+ 	$ ls -dl -L d/l | awk '{print $1}'
+-	> drwxr-x---+
++	> drwxr-x---
+ 
+ 	$ getfacl --omit-header d/l
+ 	> user::rwx
+-	> user:bin:rwx	#effective:r-x
+ 	> user:daemon:r-x
++	> user:bin:rwx	#effective:r-x
+ 	> group::r-x
+ 	> group:daemon:rwx	#effective:r-x
+ 	> group:users:r-x
+ 	> mask::r-x
+ 	> other::---
+ 	> default:user::rwx
+-	> default:user:bin:rwx	#effective:r-x
+ 	> default:user:daemon:r-x
++	> default:user:bin:rwx	#effective:r-x
+ 	> default:group::r-x
+ 	> default:mask::r-x
+ 	> default:other::---
+@@ -283,20 +283,20 @@ Does mask manipulation work?
+ 	 
+ 	$ setfacl -m g:daemon:rx,u:bin:rx d/d
+ 	$ ls -dl d/d | awk '{print $1}'
+-	> drwxr-x---+
++	> drwxr-x---
+ 
+ 	$ getfacl --omit-header d/d
+ 	> user::rwx
+-	> user:bin:r-x
+ 	> user:daemon:r-x
++	> user:bin:r-x
+ 	> group::r-x
+ 	> group:daemon:r-x
+ 	> group:users:r-x
+ 	> mask::r-x
+ 	> other::---
+ 	> default:user::rwx
+-	> default:user:bin:rwx	#effective:r-x
+ 	> default:user:daemon:r-x
++	> default:user:bin:rwx	#effective:r-x
+ 	> default:group::r-x
+ 	> default:mask::r-x
+ 	> default:other::---
+@@ -304,20 +304,20 @@ Does mask manipulation work?
+ 
+ 	$ setfacl -m d:u:bin:rwx d/d
+ 	$ ls -dl d/d | awk '{print $1}'
+-	> drwxr-x---+
++	> drwxr-x---
+ 
+ 	$ getfacl --omit-header d/d
+ 	> user::rwx
+-	> user:bin:r-x
+ 	> user:daemon:r-x
++	> user:bin:r-x
+ 	> group::r-x
+ 	> group:daemon:r-x
+ 	> group:users:r-x
+ 	> mask::r-x
+ 	> other::---
+ 	> default:user::rwx
+-	> default:user:bin:rwx
+ 	> default:user:daemon:r-x
++	> default:user:bin:rwx
+ 	> default:group::r-x
+ 	> default:mask::rwx
+ 	> default:other::---
+@@ -329,12 +329,12 @@ Remove the default ACL
+ 	 
+ 	$ setfacl -k d
+ 	$ ls -dl d | awk '{print $1}'
+-	> drwxrwx---+
++	> drwxrwx---
+ 
+ 	$ getfacl --omit-header d
+ 	> user::rwx
+-	> user:bin:rwx
+ 	> user:daemon:rw-
++	> user:bin:rwx
+ 	> group::r-x
+ 	> mask::rwx
+ 	> other::---
+@@ -343,7 +343,7 @@ Remove the default ACL
+ Reset to base entries
+ 	 
+ 	$ setfacl -b d
+-	$ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
++	$ ls -dl d | awk '{print $1}'
+ 	> drwxr-x---
+ 
+ 	$ getfacl --omit-header d
+@@ -355,7 +355,7 @@ Reset to base entries
+ Now, chmod should change the group_obj entry
+ 	 
+ 	$ chmod 775 d
+-	$ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
++	$ ls -dl d | awk '{print $1}'
+ 	> drwxrwxr-x
+ 	
+ 	$ getfacl --omit-header d
+@@ -369,18 +369,18 @@ Now, chmod should change the group_obj entry
+ 	$ mkdir d
+ 	$ setfacl -m u:daemon:rwx,u:bin:rx,d:u:daemon:rwx,d:u:bin:rx d
+ 	$ ls -dl d | awk '{print $1}'
+-	> drwxrwxr-x+
++	> drwxrwxr-x
+ 
+ 	$ getfacl --omit-header d
+ 	> user::rwx
+-	> user:bin:r-x
+ 	> user:daemon:rwx
++	> user:bin:r-x
+ 	> group::rwx
+ 	> mask::rwx
+ 	> other::r-x
+ 	> default:user::rwx
+-	> default:user:bin:r-x
+ 	> default:user:daemon:rwx
++	> default:user:bin:r-x
+ 	> default:group::rwx
+ 	> default:mask::rwx
+ 	> default:other::r-x
+@@ -388,18 +388,18 @@ Now, chmod should change the group_obj entry
+ 
+ 	$ chmod 750 d
+ 	$ ls -dl d | awk '{print $1}'
+-	> drwxr-x---+
++	> drwxr-x---
+ 
+ 	$ getfacl --omit-header d
+ 	> user::rwx
+-	> user:bin:r-x
+ 	> user:daemon:rwx	#effective:r-x
++	> user:bin:r-x
+ 	> group::rwx	#effective:r-x
+ 	> mask::r-x
+ 	> other::---
+ 	> default:user::rwx
+-	> default:user:bin:r-x
+ 	> default:user:daemon:rwx
++	> default:user:bin:r-x
+ 	> default:group::rwx
+ 	> default:mask::rwx
+ 	> default:other::r-x
+@@ -407,18 +407,18 @@ Now, chmod should change the group_obj entry
+ 
+ 	$ chmod 750 d
+ 	$ ls -dl d | awk '{print $1}'
+-	> drwxr-x---+
++	> drwxr-x---
+ 
+ 	$ getfacl --omit-header d
+ 	> user::rwx
+-	> user:bin:r-x
+ 	> user:daemon:rwx	#effective:r-x
++	> user:bin:r-x
+ 	> group::rwx	#effective:r-x
+ 	> mask::r-x
+ 	> other::---
+ 	> default:user::rwx
+-	> default:user:bin:r-x
+ 	> default:user:daemon:rwx
++	> default:user:bin:r-x
+ 	> default:group::rwx
+ 	> default:mask::rwx
+ 	> default:other::r-x
+diff --git a/test/root/permissions.test b/test/root/permissions.test
+index afaf5f0..042005a 100644
+--- a/test/root/permissions.test
++++ b/test/root/permissions.test
+@@ -217,7 +217,7 @@ Test if symlinks are properly followed.
+ 	$ ln -s g l
+ 	$ setfacl -m u:bin:rw l
+ 	$ ls -l g | awk -- '{ print $1, $3, $4 }'
+-	> -rw-rw----+ root root
++	> -rw-rw---- root root
+ 
+ 
+ Test if ACLs are effective for block and character special files, fifos,
+diff --git a/test/root/setfacl.test b/test/root/setfacl.test
+index 630e9fb..6726e63 100644
+--- a/test/root/setfacl.test
++++ b/test/root/setfacl.test
+@@ -13,7 +13,7 @@ Setfacl utility tests. Run these tests on a filesystem with ACL support.
+ 
+ 	$ setfacl -m m:- g
+ 	$ ls -dl g | awk '{print $1}'
+-	> -rw-------+
++	> -rw-------
+ 
+ 	$ getfacl g
+ 	> # file: g
+diff --git a/test/sbits-restore.test b/test/sbits-restore.test
+index de21340..e5e4fb2 100644
+--- a/test/sbits-restore.test
++++ b/test/sbits-restore.test
+@@ -13,10 +13,10 @@ Ensure setting of SUID/SGID/sticky via --restore works
+ 	$ touch d/g
+ 	$ touch d/u
+ 	$ setfacl --restore d.acl
+-	$ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
++	$ ls -dl d | awk '{print $1}'
+ 	> drwxr-xr-t
+-	$ ls -dl d/u | awk '{print $1}' | sed 's/\.$//g'
++	$ ls -dl d/u | awk '{print $1}'
+ 	> -rwSr--r--
+-	$ ls -dl d/g | awk '{print $1}' | sed 's/\.$//g'
++	$ ls -dl d/g | awk '{print $1}'
+ 	> -rw-r-Sr--
+ 	$ rm -Rf d
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-support/attr/acl/run-ptest b/meta/recipes-support/attr/acl/run-ptest
new file mode 100644
index 0000000..a6c6867
--- /dev/null
+++ b/meta/recipes-support/attr/acl/run-ptest
@@ -0,0 +1,5 @@ 
+#!/bin/sh
+
+make -C test -k tests root-tests |sed \
+ -e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \
+ -e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|'