summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/bash/bash
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/bash/bash')
-rw-r--r--meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch45
-rw-r--r--meta/recipes-extended/bash/bash/run-bash-ptests4
-rw-r--r--meta/recipes-extended/bash/bash/run-ptest10
3 files changed, 9 insertions, 50 deletions
diff --git a/meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch b/meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch
deleted file mode 100644
index 9ac2461ab6..0000000000
--- a/meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1From d1cd4c31ea0ed7406a3ad4bdaa211f581063f655 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Tue, 15 Aug 2017 10:21:21 +0800
4Subject: [PATCH 2/2] fix run-execscript/run-test/ failed
5
6FAIL: run-execscript:
7the test suite should not be run as root
8
9FAIL: run-test
10the test suite should not be run as root
11
12Upstream-Status: Pending
13
14Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
15---
16 tests/run-execscript | 3 ++-
17 tests/run-test | 3 ++-
18 2 files changed, 4 insertions(+), 2 deletions(-)
19
20diff --git a/tests/run-execscript b/tests/run-execscript
21index de78644..38397c1 100644
22--- a/tests/run-execscript
23+++ b/tests/run-execscript
24@@ -5,5 +5,6 @@ echo "warning: \`/tmp/bash-notthere' not being found or \`/' being a directory"
25 echo "warning: produce diff output, please do not consider this a test failure" >&2
26 echo "warning: if diff output differing only in the location of the bash" >&2
27 echo "warning: binary appears, please do not consider this a test failure" >&2
28-${THIS_SH} ./execscript > ${BASH_TSTOUT} 2>&1
29+rm -f ${BASH_TSTOUT}
30+su -c "${THIS_SH} ./execscript > ${BASH_TSTOUT} 2>&1" test
31 diff ${BASH_TSTOUT} exec.right && rm -f ${BASH_TSTOUT}
32diff --git a/tests/run-test b/tests/run-test
33index d68791c..d6317d2 100644
34--- a/tests/run-test
35+++ b/tests/run-test
36@@ -1,4 +1,5 @@
37 unset GROUPS UID 2>/dev/null
38
39-${THIS_SH} ./test.tests >${BASH_TSTOUT} 2>&1
40+rm -f ${BASH_TSTOUT}
41+su -c "${THIS_SH} ./test.tests > ${BASH_TSTOUT} 2>&1" test
42 diff ${BASH_TSTOUT} test.right && rm -f ${BASH_TSTOUT}
43--
441.8.3.1
45
diff --git a/meta/recipes-extended/bash/bash/run-bash-ptests b/meta/recipes-extended/bash/bash/run-bash-ptests
new file mode 100644
index 0000000000..d73a27224d
--- /dev/null
+++ b/meta/recipes-extended/bash/bash/run-bash-ptests
@@ -0,0 +1,4 @@
1#!/bin/sh
2cd "$(dirname "$0")"
3make -k THIS_SH=/bin/bash BUILD_DIR=`pwd` srcdir=`pwd` runtest
4
diff --git a/meta/recipes-extended/bash/bash/run-ptest b/meta/recipes-extended/bash/bash/run-ptest
index c0cf27b6c2..738ad3c42c 100644
--- a/meta/recipes-extended/bash/bash/run-ptest
+++ b/meta/recipes-extended/bash/bash/run-ptest
@@ -19,8 +19,8 @@ then
19 echo "Warning: The de_DE* locales is needed to run the intl.tests, please add it." 19 echo "Warning: The de_DE* locales is needed to run the intl.tests, please add it."
20fi 20fi
21 21
22useradd bash_user 22useradd bashtest
23chown -R bash_user:bash_user ./tests 23chown -R bashtest:bashtest tests
24su bash_user -c "make -k THIS_SH=/bin/bash BUILD_DIR=`pwd` srcdir=`pwd` runtest" 24setpriv --reuid bashtest --rgid bashtest --clear-groups --reset-env $(dirname "$0")/run-bash-ptests
25chown -R root:root ./tests 25chown -R root:root tests
26userdel bash_user 26userdel -r bashtest