summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy.Li <rongqing.li@windriver.com>2014-09-23 15:57:39 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-23 21:38:33 +0100
commit75d6b2b36824a365d2144b9111d73266adbbb298 (patch)
tree6f82aa8059e57bc07205d28b9dd1cd18a5d6562e
parentc9dbd2680b7db23b496671eee67a5bd8d379264c (diff)
downloadpoky-75d6b2b36824a365d2144b9111d73266adbbb298.tar.gz
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 (From OE-Core rev: 3fc1b5acb50aa864d386f69a1c0d0db0425f970c) Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/ltp/ltp/make-setregid02-work.patch61
-rw-r--r--meta/recipes-extended/ltp/ltp_20140422.bb1
2 files changed, 62 insertions, 0 deletions
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 0000000000..4836010bdf
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch
@@ -0,0 +1,61 @@
1[PATCH] make setregid02 work
2
3Upstream-Status: Inappropriate [configuration]
4
5there is no "nobody" group in oe-core, the user "nobody" belongs to
6"nogroup" group, so replace nobody with nogroup to make the test pass
7
8Signed-off-by: Roy.Li <rongqing.li@windriver.com>
9---
10 testcases/kernel/syscalls/setregid/setregid02.c | 16 ++++++++--------
11 1 file changed, 8 insertions(+), 8 deletions(-)
12
13diff --git a/testcases/kernel/syscalls/setregid/setregid02.c b/testcases/kernel/syscalls/setregid/setregid02.c
14index 8058627..866bee4 100644
15--- a/testcases/kernel/syscalls/setregid/setregid02.c
16+++ b/testcases/kernel/syscalls/setregid/setregid02.c
17@@ -41,7 +41,7 @@ static gid_t neg_one = -1;
18
19 static struct passwd *ltpuser;
20
21-static struct group nobody, root, bin;
22+static struct group nogroup, root, bin;
23
24 /*
25 * The following structure contains all test data. Each structure in the array
26@@ -57,17 +57,17 @@ struct test_data_t {
27 char *test_msg;
28 } test_data[] = {
29 {
30- &neg_one, &root.gr_gid, EPERM, &nobody, &nobody,
31+ &neg_one, &root.gr_gid, EPERM, &nogroup, &nogroup,
32 "After setregid(-1, root),"}, {
33- &neg_one, &bin.gr_gid, EPERM, &nobody, &nobody,
34+ &neg_one, &bin.gr_gid, EPERM, &nogroup, &nogroup,
35 "After setregid(-1, bin)"}, {
36- &root.gr_gid, &neg_one, EPERM, &nobody, &nobody,
37+ &root.gr_gid, &neg_one, EPERM, &nogroup, &nogroup,
38 "After setregid(root,-1),"}, {
39- &bin.gr_gid, &neg_one, EPERM, &nobody, &nobody,
40+ &bin.gr_gid, &neg_one, EPERM, &nogroup, &nogroup,
41 "After setregid(bin, -1),"}, {
42- &root.gr_gid, &bin.gr_gid, EPERM, &nobody, &nobody,
43+ &root.gr_gid, &bin.gr_gid, EPERM, &nogroup, &nogroup,
44 "After setregid(root, bin)"}, {
45- &bin.gr_gid, &root.gr_gid, EPERM, &nobody, &nobody,
46+ &bin.gr_gid, &root.gr_gid, EPERM, &nogroup, &nogroup,
47 "After setregid(bin, root),"}
48 };
49
50@@ -165,7 +165,7 @@ static void setup(void)
51 } while (0)
52
53 GET_GID(root);
54- GET_GID(nobody);
55+ GET_GID(nogroup);
56 GET_GID(bin);
57
58 TEST_PAUSE;
59--
601.9.1
61
diff --git a/meta/recipes-extended/ltp/ltp_20140422.bb b/meta/recipes-extended/ltp/ltp_20140422.bb
index f2c0fd8204..f521d40ecf 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 \
26 file://0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch \ 26 file://0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch \
27 file://ltp-Do-not-link-against-libfl.patch \ 27 file://ltp-Do-not-link-against-libfl.patch \
28 file://automake-foreign.patch \ 28 file://automake-foreign.patch \
29 file://make-setregid02-work.patch \
29" 30"
30 31
31S = "${WORKDIR}/git" 32S = "${WORKDIR}/git"