Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCHv2 0/1] bash: fixed ptest run-builtins failed
@ 2016-04-19  8:55 Dengke Du
  2016-04-19  8:55 ` [PATCHv2 1/1] " Dengke Du
  0 siblings, 1 reply; 2+ messages in thread
From: Dengke Du @ 2016-04-19  8:55 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit ee25d0e3987d7732a2e46e1640693b4cf419a9fc:

  toasterconf.json: Update for krogoth release (2016-04-18 16:49:28 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib dengke/fixed-bash-ptest-run-builtins-failed
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=dengke/fixed-bash-ptest-run-builtins-failed

Dengke Du (1):
  bash: fixed ptest run-builtins failed

 .../bash/bash/fix-run-builtins.patch               | 33 ++++++++++++++++++++++
 meta/recipes-extended/bash/bash_4.3.30.bb          |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta/recipes-extended/bash/bash/fix-run-builtins.patch

-- 
2.8.1



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

* [PATCHv2 1/1] bash: fixed ptest run-builtins failed
  2016-04-19  8:55 [PATCHv2 0/1] bash: fixed ptest run-builtins failed Dengke Du
@ 2016-04-19  8:55 ` Dengke Du
  0 siblings, 0 replies; 2+ messages in thread
From: Dengke Du @ 2016-04-19  8:55 UTC (permalink / raw)
  To: openembedded-core

1. redirect the stderr output of the command exec with -l option to
   /dev/null.
   Because when we run command exec with -l option in builtins.tests,
   it is a login shell, so it would read the file /etc/profile, that
   file executes the /usr/bin/resize which added by commit:
	 cc6360f4c4d97e0000f9d3545f381224ee99ce7d
   The /usr/bin/resize is produced by busybox that source code resize.c
   contains:
	fprintf(stderr, ESC"7" ESC"[r" ESC"[999;999H" ESC"[6n");
   In the end, it outputs an escape sequence to the stderr, so when we
   compare the test output file /tmp/xx with builtins.right, it failed.
   we need to redirect the stderr output to the /dev/null to solve the
   problem.

2. ensure the target system contains the locales "en_US.UTF-8".
   Because when run the run-builtins, it executes the source5.sub file
   that contain:
	LC_ALL=en_US.UTF-8
   such as add the following to the local.conf:
	IMAGE_LINGUAS_append = " en-us"

Signed-off-by: Dengke Du <dengke.du@windriver.com>
---
 .../bash/bash/fix-run-builtins.patch               | 33 ++++++++++++++++++++++
 meta/recipes-extended/bash/bash_4.3.30.bb          |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta/recipes-extended/bash/bash/fix-run-builtins.patch

diff --git a/meta/recipes-extended/bash/bash/fix-run-builtins.patch b/meta/recipes-extended/bash/bash/fix-run-builtins.patch
new file mode 100644
index 0000000..2fa3883
--- /dev/null
+++ b/meta/recipes-extended/bash/bash/fix-run-builtins.patch
@@ -0,0 +1,33 @@
+From 0c4cab9594c96c2dc435a8d9724605824bcbf917 Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke.du@windriver.com>
+Date: Tue, 19 Apr 2016 02:57:45 -0400
+Subject: [PATCH] fix run-builtins failed
+
+FAIL: run-builtins
+1. redirect the stderr output of command exec with -l option in
+   builtins.tests to /dev/null
+2. ensure the system contain the locales "en_US.UTF-8"
+
+Upstream-Status: Pending
+
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ tests/builtins.tests | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/builtins.tests b/tests/builtins.tests
+index 9d77520..63f3af8 100644
+--- a/tests/builtins.tests
++++ b/tests/builtins.tests
+@@ -109,7 +109,7 @@ esac
+ 
+ # test options to exec
+ (exec -a specialname ${THIS_SH} -c 'echo $0' )
+-(exec -l -a specialname ${THIS_SH} -c 'echo $0' )
++(exec -l -a specialname ${THIS_SH} -c 'echo $0' ) 2> /dev/null
+ # test `clean' environment.  if /bin/sh is bash, and the script version of
+ # printenv is run, there will be variables in the environment that bash
+ # sets on startup.  Also test code that prefixes argv[0] with a dash.
+-- 
+2.8.1
+
diff --git a/meta/recipes-extended/bash/bash_4.3.30.bb b/meta/recipes-extended/bash/bash_4.3.30.bb
index 4426cf0..95ed392 100644
--- a/meta/recipes-extended/bash/bash_4.3.30.bb
+++ b/meta/recipes-extended/bash/bash_4.3.30.bb
@@ -20,6 +20,7 @@ SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \
            file://test-output.patch \
            file://fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch \
            file://run-ptest \
+	   file://fix-run-builtins.patch \
            "
 
 SRC_URI[tarball.md5sum] = "a27b3ee9be83bd3ba448c0ff52b28447"
-- 
2.8.1



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

end of thread, other threads:[~2016-04-19  8:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-19  8:55 [PATCHv2 0/1] bash: fixed ptest run-builtins failed Dengke Du
2016-04-19  8:55 ` [PATCHv2 1/1] " Dengke Du

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