Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] acl: fix the acl self contained test cases issue
@ 2013-07-15 10:01 jackie.huang
  2013-07-15 10:01 ` [PATCH 1/1] " jackie.huang
  0 siblings, 1 reply; 3+ messages in thread
From: jackie.huang @ 2013-07-15 10:01 UTC (permalink / raw)
  To: openembedded-core

From: Jackie Huang <jackie.huang@windriver.com>

We added the acl self contained test cases in our testing layer and found
failures, this patch fixed the test scripts that cause the issues.

--
The following changes since commit 4f5009dcbbeb27bdf5dcaebb3b457fecef410ebe:

  security_flags: Add addition recipes to the non pie list (2013-07-10 09:40:42 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib jhuang0/d_acl_0715_2
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=jhuang0/d_acl_0715_2

Jackie Huang (1):
  acl: fix the acl self contained test cases issue

 meta/recipes-support/attr/acl.inc                  |    4 +-
 .../attr/files/fix-acl-test-cases.patch            |  210 ++++++++++++++++++++
 2 files changed, 213 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-support/attr/files/fix-acl-test-cases.patch

-- 
1.7.4.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] acl: fix the acl self contained test cases issue
  2013-07-15 10:01 [PATCH 0/1] acl: fix the acl self contained test cases issue jackie.huang
@ 2013-07-15 10:01 ` jackie.huang
  2013-07-16 10:25   ` Burton, Ross
  0 siblings, 1 reply; 3+ messages in thread
From: jackie.huang @ 2013-07-15 10:01 UTC (permalink / raw)
  To: openembedded-core

From: Jackie Huang <jackie.huang@windriver.com>

misc.test: fix the order of expected output of getfacl
root/permissions.test: this test requires that the daemon
user is in groups bin and daemon, so add it into bin group
before testing start.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
 meta/recipes-support/attr/acl.inc                  |    4 +-
 .../attr/files/fix-acl-test-cases.patch            |  210 ++++++++++++++++++++
 2 files changed, 213 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-support/attr/files/fix-acl-test-cases.patch

diff --git a/meta/recipes-support/attr/acl.inc b/meta/recipes-support/attr/acl.inc
index b504517..6b6ecbf 100644
--- a/meta/recipes-support/attr/acl.inc
+++ b/meta/recipes-support/attr/acl.inc
@@ -9,7 +9,9 @@ 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://fix-acl-test-cases.patch \
+"
 
 require ea-acl.inc
 
diff --git a/meta/recipes-support/attr/files/fix-acl-test-cases.patch b/meta/recipes-support/attr/files/fix-acl-test-cases.patch
new file mode 100644
index 0000000..0c003b0
--- /dev/null
+++ b/meta/recipes-support/attr/files/fix-acl-test-cases.patch
@@ -0,0 +1,210 @@
+misc.test: fix the order of expected output of getfacl
+
+Upstream-Status: Pending
+
+root/permissions.test: this test requires that the daemon
+user is in groups bin and daemon, so add it into bin group
+before testing start.
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ test/misc.test             |   38 +++++++++++++++++++-------------------
+ test/root/permissions.test |    1 +
+ 2 files changed, 20 insertions(+), 19 deletions(-)
+
+diff --git a/test/misc.test b/test/misc.test
+index eab9d17..6754be3 100644
+--- a/test/misc.test
++++ b/test/misc.test
+@@ -79,8 +79,8 @@ Multiple users
+
+ 	$ getfacl --omit-header f
+ 	> user::rw-
+-	> user:bin:rw-
+ 	> user:daemon:r--
++	> user:bin:rw-
+ 	> group::r--
+ 	> mask::rw-
+ 	> other::r--
+@@ -94,8 +94,8 @@ Multiple groups
+
+ 	$ getfacl --omit-header f
+ 	> user::rw-
+-	> user:bin:rw-
+ 	> user:daemon:r--
++	> user:bin:rw-
+ 	> group::r--
+ 	> group:daemon:r--
+ 	> group:users:rw-
+@@ -111,8 +111,8 @@ Remove one group
+
+ 	$ getfacl --omit-header f
+ 	> user::rw-
+-	> user:bin:rw-
+ 	> user:daemon:r--
++	> user:bin:rw-
+ 	> group::r--
+ 	> group:daemon:r--
+ 	> mask::rw-
+@@ -146,8 +146,8 @@ Default ACL
+
+ 	$ getfacl --omit-header d
+ 	> user::rwx
+-	> user:bin:rwx
+ 	> user:daemon:rw-
++	> user:bin:rwx
+ 	> group::r-x
+ 	> mask::rwx
+ 	> other::---
+@@ -236,16 +236,16 @@ Add some users and groups
+
+ 	$ 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::---
+@@ -262,16 +262,16 @@ Symlink in directory with default ACL?
+
+ 	$ 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::---
+@@ -287,16 +287,16 @@ Does mask manipulation work?
+
+ 	$ 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::---
+@@ -308,16 +308,16 @@ Does mask manipulation work?
+
+ 	$ 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::---
+@@ -333,8 +333,8 @@ Remove the default ACL
+
+ 	$ getfacl --omit-header d
+ 	> user::rwx
+-	> user:bin:rwx
+ 	> user:daemon:rw-
++	> user:bin:rwx
+ 	> group::r-x
+ 	> mask::rwx
+ 	> other::---
+@@ -373,14 +373,14 @@ Now, chmod should change the group_obj entry
+
+ 	$ 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
+@@ -392,14 +392,14 @@ Now, chmod should change the group_obj entry
+
+ 	$ 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
+@@ -411,14 +411,14 @@ Now, chmod should change the group_obj entry
+
+ 	$ 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..5365e2b 100644
+--- a/test/root/permissions.test
++++ b/test/root/permissions.test
+@@ -6,6 +6,7 @@ listed in parentheses.
+ 	bin (bin)
+ 	daemon (bin, daemon)
+
++	$ usermod -a -G bin daemon
+
+ Cry immediately if we are not running as root.
+
+--
+1.7.4
+
-- 
1.7.4.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] acl: fix the acl self contained test cases issue
  2013-07-15 10:01 ` [PATCH 1/1] " jackie.huang
@ 2013-07-16 10:25   ` Burton, Ross
  0 siblings, 0 replies; 3+ messages in thread
From: Burton, Ross @ 2013-07-16 10:25 UTC (permalink / raw)
  To: jackie.huang; +Cc: openembedded-core

On 15 July 2013 11:01,  <jackie.huang@windriver.com> wrote:
> +Upstream-Status: Pending

If we're patching the test case because it's wrong then we need to be
contacting upstream to get this merged or rejected, there's no point
patching the test case to make it work when actually it's a subtle
problem in how we're running it.

Ross


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-16 10:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-15 10:01 [PATCH 0/1] acl: fix the acl self contained test cases issue jackie.huang
2013-07-15 10:01 ` [PATCH 1/1] " jackie.huang
2013-07-16 10:25   ` Burton, Ross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox