summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2017-12-14 14:45:04 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-02 17:24:38 +0000
commitf9145caae9515e563cfcaa7b82a0c77a03128c6a (patch)
treee31198fbbe1fa0ec06f4ab9aff14de8bb3c846a7 /meta/recipes-extended
parent39663df1ee65fd081de38d0ee3b43d2404843e49 (diff)
downloadpoky-f9145caae9515e563cfcaa7b82a0c77a03128c6a.tar.gz
ltp: fix ar01 case failure
Our binutils is configured with --enable-deterministic-archives, so ar runs in deterministic mode by default. The ar01 case would fail because it doesn't consider this mode. Backport a patch from upstream to fix this issue. (From OE-Core rev: 094e98172e1bbc64f8e6d2a97208a58189674773) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch252
-rw-r--r--meta/recipes-extended/ltp/ltp_20170929.bb1
2 files changed, 253 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch b/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch
new file mode 100644
index 0000000000..e7c927e116
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch
@@ -0,0 +1,252 @@
1From 04da9478887e705ea38e4f097492da20e651686c Mon Sep 17 00:00:00 2001
2From: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
3Date: Wed, 13 Sep 2017 15:48:42 +0800
4Subject: [PATCH] commands/ar01: Fix for test in deterministic mode
5
6If binutils was configured with --enable-deterministic-archives,
7ar will run in deterministic mode by default, and use zero for
8timestamps and uids/gids, which makes the test case abnormal.
9
10Fix this by add the "U" modifier when deterministic mode is default.
11
12Signed-off-by: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
13Signed-off-by: Fei Jie <feij.fnst@cn.fujitsu.com>
14
15Upstream-Status: Backport
16[http://lists.linux.it/pipermail/ltp/2017-September/005668.html]
17
18Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
19---
20 testcases/commands/ar/ar01 | 92 ++++++++++++++++++++++++++--------------------
21 1 file changed, 52 insertions(+), 40 deletions(-)
22
23diff --git a/testcases/commands/ar/ar01 b/testcases/commands/ar/ar01
24index ddab2e0..d688f76 100644
25--- a/testcases/commands/ar/ar01
26+++ b/testcases/commands/ar/ar01
27@@ -23,14 +23,26 @@
28 # This is a basic ar command test.
29 #
30 TST_CNT=17
31+TST_SETUP=setup
32 TST_TESTFUNC=test
33 TST_NEEDS_TMPDIR=1
34 . tst_test.sh
35
36+setup()
37+{
38+ ar --help | grep "use zero for timestamps and uids/gids (default)" \
39+ >/dev/null
40+ if [ $? -eq 0 ]; then
41+ MOD="U"
42+ else
43+ MOD=""
44+ fi
45+}
46+
47 test1()
48 {
49- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
50- ROD ar -ra file1.in lib.a $TST_DATAROOT/file2.in
51+ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
52+ ROD ar -ra"$MOD" file1.in lib.a $TST_DATAROOT/file2.in
53 ROD ar -t lib.a \> ar.out
54
55 printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
56@@ -47,9 +59,9 @@ test1()
57
58 test2()
59 {
60- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
61- $TST_DATAROOT/file3.in $TST_DATAROOT/file4.in
62- ROD ar -ma file1.in lib.a file4.in
63+ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
64+ $TST_DATAROOT/file3.in $TST_DATAROOT/file4.in
65+ ROD ar -ma"$MOD" file1.in lib.a file4.in
66 ROD ar -t lib.a \> ar.out
67
68 printf "file1.in\nfile4.in\nfile2.in\nfile3.in\n" > ar.exp
69@@ -66,8 +78,8 @@ test2()
70
71 test3()
72 {
73- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
74- ROD ar -rb file3.in lib.a $TST_DATAROOT/file2.in
75+ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
76+ ROD ar -rb"$MOD" file3.in lib.a $TST_DATAROOT/file2.in
77 ROD ar -t lib.a \> ar.out
78
79 printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
80@@ -84,9 +96,9 @@ test3()
81
82 test4()
83 {
84- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
85- $TST_DATAROOT/file2.in
86- ROD ar -mb file3.in lib.a file2.in
87+ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
88+ $TST_DATAROOT/file2.in
89+ ROD ar -mb"$MOD" file3.in lib.a file2.in
90 ROD ar -t lib.a \> ar.out
91
92 printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
93@@ -103,7 +115,7 @@ test4()
94
95 test5()
96 {
97- ROD ar -cr lib.a $TST_DATAROOT/file1.in \> ar.out
98+ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in \> ar.out
99
100 if [ -s ar.out ]; then
101 tst_res TFAIL "ar produced output unexpectedly (-c)"
102@@ -117,7 +129,7 @@ test5()
103
104 test6()
105 {
106- ROD ar -qc lib.a $TST_DATAROOT/file1.in \> ar.out
107+ ROD ar -qc"$MOD" lib.a $TST_DATAROOT/file1.in \> ar.out
108
109 if [ -s ar.out ]; then
110 tst_res TFAIL "ar produced output unexpectedly (-qc)"
111@@ -131,9 +143,9 @@ test6()
112
113 test7()
114 {
115- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
116- $TST_DATAROOT/file3.in
117- ROD ar -d lib.a file1.in file2.in
118+ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
119+ $TST_DATAROOT/file3.in
120+ ROD ar -d"$MOD" lib.a file1.in file2.in
121 ROD ar -t lib.a \> ar.out
122
123 printf "file3.in\n" > ar.exp
124@@ -150,9 +162,9 @@ test7()
125
126 test8()
127 {
128- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
129- $TST_DATAROOT/file3.in
130- ROD ar -d lib.a
131+ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
132+ $TST_DATAROOT/file3.in
133+ ROD ar -d"$MOD" lib.a
134 ROD ar -t lib.a \> ar.out
135
136 printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
137@@ -169,8 +181,8 @@ test8()
138
139 test9()
140 {
141- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
142- ROD ar -ri file3.in lib.a $TST_DATAROOT/file2.in
143+ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
144+ ROD ar -ri"$MOD" file3.in lib.a $TST_DATAROOT/file2.in
145 ROD ar -t lib.a \> ar.out
146
147 printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
148@@ -187,9 +199,9 @@ test9()
149
150 test10()
151 {
152- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
153- $TST_DATAROOT/file2.in
154- ROD ar -mi file3.in lib.a file2.in
155+ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
156+ $TST_DATAROOT/file2.in
157+ ROD ar -mi"$MOD" file3.in lib.a file2.in
158 ROD ar -t lib.a \> ar.out
159
160 printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
161@@ -206,9 +218,9 @@ test10()
162
163 test11()
164 {
165- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
166- $TST_DATAROOT/file2.in
167- ROD ar -m lib.a file3.in
168+ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
169+ $TST_DATAROOT/file2.in
170+ ROD ar -m"$MOD" lib.a file3.in
171 ROD ar -t lib.a \> ar.out
172
173 printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
174@@ -225,9 +237,9 @@ test11()
175
176 test12()
177 {
178- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
179- $TST_DATAROOT/file3.in
180- ROD ar -p lib.a \> ar.out
181+ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
182+ $TST_DATAROOT/file3.in
183+ ROD ar -p"$MOD" lib.a \> ar.out
184
185 printf "This is file one\nThis is file two\nThis is file three\n" > ar.exp
186
187@@ -244,9 +256,9 @@ test12()
188 test13()
189 {
190
191- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
192- $TST_DATAROOT/file3.in
193- ROD ar -q lib.a $TST_DATAROOT/file4.in
194+ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
195+ $TST_DATAROOT/file3.in
196+ ROD ar -q"$MOD" lib.a $TST_DATAROOT/file4.in
197 ROD ar -t lib.a \> ar.out
198
199 printf "file1.in\nfile2.in\nfile3.in\nfile4.in\n" > ar.exp
200@@ -264,14 +276,14 @@ test13()
201 test14()
202 {
203 ROD touch file0.in
204- ROD ar -cr lib.a file0.in $TST_DATAROOT/file1.in
205+ ROD ar -cr"$MOD" lib.a file0.in $TST_DATAROOT/file1.in
206
207 file0_mtime1=$(ar -tv lib.a | grep file0.in)
208 file1_mtime1=$(ar -tv lib.a | grep file1.in)
209
210 touch -c -t $(date --date='next day' +"%Y%m%d%H%M") file0.in
211
212- ROD ar -ru lib.a file0.in $TST_DATAROOT/file1.in
213+ ROD ar -ru"$MOD" lib.a file0.in $TST_DATAROOT/file1.in
214
215 file0_mtime2=$(ar -tv lib.a | grep file0.in)
216 file1_mtime2=$(ar -tv lib.a | grep file1.in)
217@@ -293,7 +305,7 @@ test14()
218
219 test15()
220 {
221- ROD ar -cr lib.a $TST_DATAROOT/file1.in
222+ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in
223 ROD ar -tv lib.a \> ar.out
224
225 if grep -q '[rwx-]\{9\} [0-9].*/[0-9].*\s*[0-9].*.*file1.in' ar.out; then
226@@ -308,9 +320,9 @@ test15()
227
228 test16()
229 {
230- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
231- $TST_DATAROOT/file3.in
232- ROD ar -xv lib.a \> ar.out
233+ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
234+ $TST_DATAROOT/file3.in
235+ ROD ar -xv"$MOD" lib.a \> ar.out
236
237 printf "x - file1.in\nx - file2.in\nx - file3.in\n" > ar.exp
238
239@@ -332,8 +344,8 @@ test16()
240
241 test17()
242 {
243- ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in
244- ROD ar -xv lib.a file2.in \> ar.out
245+ ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in
246+ ROD ar -xv"$MOD" lib.a file2.in \> ar.out
247
248 printf "x - file2.in\n" > ar.exp
249
250--
2512.7.4
252
diff --git a/meta/recipes-extended/ltp/ltp_20170929.bb b/meta/recipes-extended/ltp/ltp_20170929.bb
index 1a7e869fd0..bc0ecdfa26 100644
--- a/meta/recipes-extended/ltp/ltp_20170929.bb
+++ b/meta/recipes-extended/ltp/ltp_20170929.bb
@@ -50,6 +50,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
50 file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \ 50 file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
51 file://0037-ltp-fix-format-security-error.patch \ 51 file://0037-ltp-fix-format-security-error.patch \
52 file://0038-generate-reproducible-gzip.patch \ 52 file://0038-generate-reproducible-gzip.patch \
53 file://0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch \
53 " 54 "
54 55
55S = "${WORKDIR}/git" 56S = "${WORKDIR}/git"