[oe-commits] Roy.Li : ltp: make setregid02 be able to pass

git at git.openembedded.org git at git.openembedded.org
Tue Sep 23 20:38:55 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: 3fc1b5acb50aa864d386f69a1c0d0db0425f970c
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=3fc1b5acb50aa864d386f69a1c0d0db0425f970c

Author: Roy.Li <rongqing.li at windriver.com>
Date:   Tue Sep 23 15:57:39 2014 +0800

ltp: make setregid02 be able to pass

[YOCTO #6748]

replace "nobody" group with "nogroup", since the user "nobody"
belongs to "nogroup" group and no "nobody" group in oe-core

Signed-off-by: Roy.Li <rongqing.li at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 .../ltp/ltp/make-setregid02-work.patch             | 61 ++++++++++++++++++++++
 meta/recipes-extended/ltp/ltp_20140422.bb          |  1 +
 2 files changed, 62 insertions(+)

diff --git a/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch b/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch
new file mode 100644
index 0000000..4836010
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch
@@ -0,0 +1,61 @@
+[PATCH] make setregid02 work
+
+Upstream-Status: Inappropriate [configuration]
+
+there is no "nobody" group in oe-core, the user "nobody" belongs to
+"nogroup" group, so replace nobody with nogroup to make the test pass
+
+Signed-off-by: Roy.Li <rongqing.li at windriver.com>
+---
+ testcases/kernel/syscalls/setregid/setregid02.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/setregid/setregid02.c b/testcases/kernel/syscalls/setregid/setregid02.c
+index 8058627..866bee4 100644
+--- a/testcases/kernel/syscalls/setregid/setregid02.c
++++ b/testcases/kernel/syscalls/setregid/setregid02.c
+@@ -41,7 +41,7 @@ static gid_t neg_one = -1;
+ 
+ static struct passwd *ltpuser;
+ 
+-static struct group nobody, root, bin;
++static struct group nogroup, root, bin;
+ 
+ /*
+  * The following structure contains all test data.  Each structure in the array
+@@ -57,17 +57,17 @@ struct test_data_t {
+ 	char *test_msg;
+ } test_data[] = {
+ 	{
+-	&neg_one, &root.gr_gid, EPERM, &nobody, &nobody,
++	&neg_one, &root.gr_gid, EPERM, &nogroup, &nogroup,
+ 		    "After setregid(-1, root),"}, {
+-	&neg_one, &bin.gr_gid, EPERM, &nobody, &nobody,
++	&neg_one, &bin.gr_gid, EPERM, &nogroup, &nogroup,
+ 		    "After setregid(-1, bin)"}, {
+-	&root.gr_gid, &neg_one, EPERM, &nobody, &nobody,
++	&root.gr_gid, &neg_one, EPERM, &nogroup, &nogroup,
+ 		    "After setregid(root,-1),"}, {
+-	&bin.gr_gid, &neg_one, EPERM, &nobody, &nobody,
++	&bin.gr_gid, &neg_one, EPERM, &nogroup, &nogroup,
+ 		    "After setregid(bin, -1),"}, {
+-	&root.gr_gid, &bin.gr_gid, EPERM, &nobody, &nobody,
++	&root.gr_gid, &bin.gr_gid, EPERM, &nogroup, &nogroup,
+ 		    "After setregid(root, bin)"}, {
+-	&bin.gr_gid, &root.gr_gid, EPERM, &nobody, &nobody,
++	&bin.gr_gid, &root.gr_gid, EPERM, &nogroup, &nogroup,
+ 		    "After setregid(bin, root),"}
+ };
+ 
+@@ -165,7 +165,7 @@ static void setup(void)
+ } while (0)
+ 
+ 	GET_GID(root);
+-	GET_GID(nobody);
++	GET_GID(nogroup);
+ 	GET_GID(bin);
+ 
+ 	TEST_PAUSE;
+-- 
+1.9.1
+
diff --git a/meta/recipes-extended/ltp/ltp_20140422.bb b/meta/recipes-extended/ltp/ltp_20140422.bb
index f2c0fd8..f521d40 100644
--- a/meta/recipes-extended/ltp/ltp_20140422.bb
+++ b/meta/recipes-extended/ltp/ltp_20140422.bb
@@ -26,6 +26,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
     file://0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch \
     file://ltp-Do-not-link-against-libfl.patch \
     file://automake-foreign.patch \
+    file://make-setregid02-work.patch \
 "
 
 S = "${WORKDIR}/git"



More information about the Openembedded-commits mailing list