]> code.ossystems Code Review - openembedded-core.git/commitdiff
ltp: fix hanging issue for gdb01 case
authorYi Zhao <yi.zhao@windriver.com>
Thu, 21 Sep 2017 07:54:58 +0000 (15:54 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 22 Sep 2017 16:14:43 +0000 (17:14 +0100)
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.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-extended/ltp/ltp/0038-commands-gdb01-replace-stdin-with-dev-null.patch [new file with mode: 0644]
meta/recipes-extended/ltp/ltp_20170516.bb

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 (file)
index 0000000..f7c0a4b
--- /dev/null
@@ -0,0 +1,34 @@
+From 2f6ab8f694b26b7f2566624f6d1f23788d6ab8a0 Mon Sep 17 00:00:00 2001
+From: Jan Stancek <jstancek@redhat.com>
+Date: Mon, 11 Sep 2017 12:57:58 +0200
+Subject: [PATCH] commands/gdb01: replace stdin with /dev/null
+
+If this testcase runs as background process, gdb can receive
+SIGTTOU and then testcase gets stuck.
+
+Signed-off-by: Jan Stancek <jstancek@redhat.com>
+
+Upstream-Status: Backport
+[https://github.com/linux-test-project/ltp/commit/2f6ab8f694b26b7f2566624f6d1f23788d6ab8a0]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ testcases/commands/gdb/gdb01.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/commands/gdb/gdb01.sh b/testcases/commands/gdb/gdb01.sh
+index 07ae36f..e3a5b51 100755
+--- a/testcases/commands/gdb/gdb01.sh
++++ b/testcases/commands/gdb/gdb01.sh
+@@ -29,7 +29,7 @@ TST_NEEDS_CMDS="gdb /bin/cat"
+ simple_test()
+ {
+-      gdb /bin/cat -ex "run /etc/passwd" -ex quit
++      gdb /bin/cat -ex "run /etc/passwd" -ex quit < /dev/null
+       RC=$?
+       if [ $RC -eq 0 ] ; then
+               tst_res TPASS "gdb attached to process and completed run"
+-- 
+2.7.4
+
index 1d0cc1af3a3c02d35eb5d0ce3c3204da5203d259..653cbfd4ed05e4608ea9d096811fcd51596c0cf9 100644 (file)
@@ -49,6 +49,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
            file://0035-fix-test_proc_kill-hang.patch \
            file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
            file://0037-ltp-fix-PAGE_SIZE-redefinition-and-O_CREAT-undeclear.patch \
+           file://0038-commands-gdb01-replace-stdin-with-dev-null.patch \
            "
 
 S = "${WORKDIR}/git"