summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/bash
diff options
context:
space:
mode:
authorDengke Du <dengke.du@windriver.com>2016-08-17 23:10:57 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-23 17:44:38 +0100
commitddaf84ce8640034e028d794131d88a2453ab0bc9 (patch)
tree4ab7937e0a9fd08cce5d73fce7f9b197aca874ef /meta/recipes-extended/bash
parent0db6b0f363c9bf6fc36ceb933f10196b131d3b18 (diff)
downloadpoky-ddaf84ce8640034e028d794131d88a2453ab0bc9.tar.gz
bash: fix run-intl ptest failed
1. Filter the extra white space in intl.right When the sub-test unicode2.sub of intl.tests executed, it produced compact results without extra white space, compared to intl.right, it failed. So we need to filter the extra white space in intl.right. Import this patch for intl.right from bash devel branch: http://git.savannah.gnu.org/cgit/bash.git/log/?h=devel Commit is: 85ec0778f9d778e1820fb8c0e3e996f2d1103b45 2. Change intl.right correspond to the unicode3.sub's output In sub-test unicode3.sub of intl.tests have this: printf %q "$payload" The payload variable was assigned by ASCII characters, when using '%q' format strings, it means print the associated argument shell-quoted. When the strings contain the non-alpha && non-digit && non-punctuation && non-ISO 646 character(7-bit), it would output like this: " $'...', ANSI-C style quoted string. We can check the bash source code at: http://git.savannah.gnu.org/cgit/bash.git/tree/builtins/printf.def#n557 http://git.savannah.gnu.org/cgit/bash.git/tree/lib/sh/strtrans.c#n331 So we need to change the intl.right contain the correct output of unicode3.sub. Import parts of this patch for intl.right from bash devel branch: http://git.savannah.gnu.org/cgit/bash.git/log/?h=devel Commit is: 74b8cbb41398b4453d8ba04d0cdd1b25f9dcb9e3 3. Add the sanity check for locales When run the intl.tests, we need the following locales: en_US & fr_FR & de_DE So add the locales check for the intl.tests in run-ptest. (From OE-Core rev: 640676226bb351420a0a8b2d2a3c120ae42da11e) Signed-off-by: Dengke Du <dengke.du@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/bash')
-rw-r--r--meta/recipes-extended/bash/bash/fix-run-intl.patch110
-rw-r--r--meta/recipes-extended/bash/bash/run-ptest20
-rw-r--r--meta/recipes-extended/bash/bash_4.3.30.bb3
3 files changed, 132 insertions, 1 deletions
diff --git a/meta/recipes-extended/bash/bash/fix-run-intl.patch b/meta/recipes-extended/bash/bash/fix-run-intl.patch
new file mode 100644
index 0000000000..d4a3409ec6
--- /dev/null
+++ b/meta/recipes-extended/bash/bash/fix-run-intl.patch
@@ -0,0 +1,110 @@
1From a00d3161fd7b6a698bdd2ed5f0ac5faac580ee2a Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Wed, 3 Aug 2016 23:13:00 -0400
4Subject: [PATCH] fix run-intl failed
5
61. Filter extra white space of intl.right
7
8 Due to the extra white space of intl.right, when the result of
9 sub-test unicode2.sub of intl.tests compared to it, the test
10 failed.
11
12 So we need to filter the extra white space of intl.right.
13
14 Import this patch for intl.right from bash devel branch:
15
16 http://git.savannah.gnu.org/cgit/bash.git/log/?h=devel
17
18 commit is:
19
20 85ec0778f9d778e1820fb8c0e3e996f2d1103b45
21
222. Change intl.right correspond to the unicode3.sub's output
23
24 In sub-test unicode3.sub of intl.tests, the payload value is:
25
26 payload=$'\065\247\100\063\231\053\306\123\070\237\242\352\263'
27
28 It used quoted string expansion(escaped octal) to assign ASCII
29 characters to variables. So when the test run the following:
30
31 printf %q "$payload"
32
33 It produced:
34
35 $'5\247@3\231+\306S8\237\242\352\263'
36
37 When compared to the intl.right(contain the converted character), it failed.
38
39 Import parts of patch for intl.right from bash devel branch:
40
41 http://git.savannah.gnu.org/cgit/bash.git/log/?h=devel
42
43 commit is:
44
45 74b8cbb41398b4453d8ba04d0cdd1b25f9dcb9e3
46
47Upstream-Status: Backport
48
49Signed-off-by: Dengke Du <dengke.du@windriver.com>
50---
51 tests/intl.right | 30 +++++++++++++++---------------
52 1 file changed, 15 insertions(+), 15 deletions(-)
53
54diff --git a/tests/intl.right b/tests/intl.right
55index acf108a..1efdfbe 100644
56--- a/tests/intl.right
57+++ b/tests/intl.right
58@@ -18,34 +18,34 @@ aéb
59 1.0000
60 1,0000
61 Passed all 1378 Unicode tests
62-0000000 303 277 012
63+0000000 303 277 012
64 0000003
65-0000000 303 277 012
66+0000000 303 277 012
67 0000003
68-0000000 303 277 012
69+0000000 303 277 012
70 0000003
71-0000000 303 277 012
72+0000000 303 277 012
73 0000003
74-0000000 357 277 277 012
75+0000000 357 277 277 012
76 0000004
77-0000000 357 277 277 012
78+0000000 357 277 277 012
79 0000004
80-0000000 012
81+0000000 012
82 0000001
83-0000000 012
84+0000000 012
85 0000001
86-0000000 012
87+0000000 012
88 0000001
89-0000000 012
90+0000000 012
91 0000001
92-0000000 303 277 012
93+0000000 303 277 012
94 0000003
95-0000000 303 277 012
96+0000000 303 277 012
97 0000003
98-0000000 303 277 012
99+0000000 303 277 012
100 0000003
101-0000000 101 040 302 243 040 305 222 012
102+0000000 101 040 302 243 040 305 222 012
103 0000010
104 ./unicode3.sub: line 2: 5§@3™+ÆS8Ÿ¢ê³: command not found
105-5§@3™+ÆS8Ÿ¢ê³
106+$'5\247@3\231+\306S8\237\242\352\263'
107 + : $'5\247@3\231+\306S8\237\242\352\263'
108--
1092.8.1
110
diff --git a/meta/recipes-extended/bash/bash/run-ptest b/meta/recipes-extended/bash/bash/run-ptest
index 2098fa46ba..c61fabd020 100644
--- a/meta/recipes-extended/bash/bash/run-ptest
+++ b/meta/recipes-extended/bash/bash/run-ptest
@@ -1,2 +1,22 @@
1#!/bin/sh 1#!/bin/sh
2
3en_US=`locale -a | grep en_US*`
4fr_FR=`locale -a | grep fr_FR*`
5de_DE=`locale -a | grep de_DE*`
6
7if [ -z "$en_US" ]
8then
9 echo "Warning: The en_US* locales is needed to run the intl.tests, please add it."
10fi
11
12if [ -z "$fr_FR" ]
13then
14 echo "Warning: The fr_FR* locales is needed to run the intl.tests, please add it."
15fi
16
17if [ -z "$de_DE" ]
18then
19 echo "Warning: The de_DE* locales is needed to run the intl.tests, please add it."
20fi
21
2make -k THIS_SH=/bin/bash BUILD_DIR=`pwd` srcdir=`pwd` runtest 22make -k THIS_SH=/bin/bash BUILD_DIR=`pwd` srcdir=`pwd` runtest
diff --git a/meta/recipes-extended/bash/bash_4.3.30.bb b/meta/recipes-extended/bash/bash_4.3.30.bb
index 79efaed3d1..765562fbdd 100644
--- a/meta/recipes-extended/bash/bash_4.3.30.bb
+++ b/meta/recipes-extended/bash/bash_4.3.30.bb
@@ -27,8 +27,9 @@ SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \
27 file://test-output.patch \ 27 file://test-output.patch \
28 file://fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch \ 28 file://fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch \
29 file://run-ptest \ 29 file://run-ptest \
30 file://fix-run-builtins.patch \ 30 file://fix-run-builtins.patch \
31 file://0001-help-fix-printf-format-security-warning.patch \ 31 file://0001-help-fix-printf-format-security-warning.patch \
32 file://fix-run-intl.patch \
32 " 33 "
33 34
34SRC_URI[tarball.md5sum] = "a27b3ee9be83bd3ba448c0ff52b28447" 35SRC_URI[tarball.md5sum] = "a27b3ee9be83bd3ba448c0ff52b28447"