summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2017-09-21 15:54:58 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-22 17:15:30 +0100
commitf5a260f01ede40e1ddc44aac6fdc5bbe7ec1653a (patch)
tree831e04c1ee8ffc75662eaec5f54e52d58066eb17
parentab93338177af644cbaa5594fd3e0daa67398c729 (diff)
downloadpoky-f5a260f01ede40e1ddc44aac6fdc5bbe7ec1653a.tar.gz
ltp: fix hanging issue for gdb01 case
If gdb01 testcase runs as background process, gdb can receive SIGTTOU and then the case gets stuck. Replace stdin with /dev/null to fix this issue. The patch is backported from upstream. (From OE-Core rev: b38a44e3ca30a8fe83bdccb4ee2b7748b3f7f223) 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>
-rw-r--r--meta/recipes-extended/ltp/ltp/0038-commands-gdb01-replace-stdin-with-dev-null.patch34
-rw-r--r--meta/recipes-extended/ltp/ltp_20170516.bb1
2 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0038-commands-gdb01-replace-stdin-with-dev-null.patch b/meta/recipes-extended/ltp/ltp/0038-commands-gdb01-replace-stdin-with-dev-null.patch
new file mode 100644
index 0000000000..f7c0a4bf17
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0038-commands-gdb01-replace-stdin-with-dev-null.patch
@@ -0,0 +1,34 @@
1From 2f6ab8f694b26b7f2566624f6d1f23788d6ab8a0 Mon Sep 17 00:00:00 2001
2From: Jan Stancek <jstancek@redhat.com>
3Date: Mon, 11 Sep 2017 12:57:58 +0200
4Subject: [PATCH] commands/gdb01: replace stdin with /dev/null
5
6If this testcase runs as background process, gdb can receive
7SIGTTOU and then testcase gets stuck.
8
9Signed-off-by: Jan Stancek <jstancek@redhat.com>
10
11Upstream-Status: Backport
12[https://github.com/linux-test-project/ltp/commit/2f6ab8f694b26b7f2566624f6d1f23788d6ab8a0]
13
14Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
15---
16 testcases/commands/gdb/gdb01.sh | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/testcases/commands/gdb/gdb01.sh b/testcases/commands/gdb/gdb01.sh
20index 07ae36f..e3a5b51 100755
21--- a/testcases/commands/gdb/gdb01.sh
22+++ b/testcases/commands/gdb/gdb01.sh
23@@ -29,7 +29,7 @@ TST_NEEDS_CMDS="gdb /bin/cat"
24
25 simple_test()
26 {
27- gdb /bin/cat -ex "run /etc/passwd" -ex quit
28+ gdb /bin/cat -ex "run /etc/passwd" -ex quit < /dev/null
29 RC=$?
30 if [ $RC -eq 0 ] ; then
31 tst_res TPASS "gdb attached to process and completed run"
32--
332.7.4
34
diff --git a/meta/recipes-extended/ltp/ltp_20170516.bb b/meta/recipes-extended/ltp/ltp_20170516.bb
index 1d0cc1af3a..653cbfd4ed 100644
--- a/meta/recipes-extended/ltp/ltp_20170516.bb
+++ b/meta/recipes-extended/ltp/ltp_20170516.bb
@@ -49,6 +49,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
49 file://0035-fix-test_proc_kill-hang.patch \ 49 file://0035-fix-test_proc_kill-hang.patch \
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-PAGE_SIZE-redefinition-and-O_CREAT-undeclear.patch \ 51 file://0037-ltp-fix-PAGE_SIZE-redefinition-and-O_CREAT-undeclear.patch \
52 file://0038-commands-gdb01-replace-stdin-with-dev-null.patch \
52 " 53 "
53 54
54S = "${WORKDIR}/git" 55S = "${WORKDIR}/git"