summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2018-10-05 19:24:01 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-09 19:04:02 +0100
commit9b48842834d6ab3939237affe5b19facc72031be (patch)
tree302bd021663da2f752f8197dd4eb8e823b74a0c3
parent194ce1539ee89b4e8ddce927623079dbe0b7c56b (diff)
downloadpoky-9b48842834d6ab3939237affe5b19facc72031be.tar.gz
strace: fix ptests
* Let automake use parallel test harness which ensures that appropriate environment variables are actually used. * Copy generated config.h as part of ptest package and define a variable in tests Makefile to control the name of target that we'd like to invoke for tests instead of relying on default value. * configure relies on tools that are not available in release tarballs resulting in warnings and failed tests. Get the required information from available files instead. * Reduces the count of failing tests to 18 from 35. The rest of tests fail or get skipped mostly because of missing syscalls. Number of tests getting skipped can probably be reduced further. Fixes [YOCTO #12948] (From OE-Core rev: dcd674181f31a12c100f91cf6a1c3f3d52b775a2) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/strace/strace/Makefile-ptest.patch35
-rw-r--r--meta/recipes-devtools/strace/strace/disable-git-version-gen.patch31
-rwxr-xr-xmeta/recipes-devtools/strace/strace/run-ptest2
-rw-r--r--meta/recipes-devtools/strace/strace_4.24.bb2
4 files changed, 42 insertions, 28 deletions
diff --git a/meta/recipes-devtools/strace/strace/Makefile-ptest.patch b/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
index a12f4c3e45..460b6e26ee 100644
--- a/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
+++ b/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
@@ -1,36 +1,31 @@
1From 0574ae9926308dcbca78bd8cd0f0f143f19cbcb5 Mon Sep 17 00:00:00 2001 1From 207fc7814bbeb0241382329215d21fd3b57066f9 Mon Sep 17 00:00:00 2001
2From: Gabriel Barbu <gabriel.barbu@enea.com> 2From: Gabriel Barbu <gabriel.barbu@enea.com>
3Date: Thu, 25 Jul 2013 15:28:33 +0200 3Date: Thu, 25 Jul 2013 15:28:33 +0200
4Subject: [PATCH 4/8] strace: Add ptest 4Subject: [PATCH] strace: Add ptest
5 5
6Upstream-Status: Inappropriate 6Upstream-Status: Inappropriate
7 7
8Signed-off-by: Gabriel Barbu <gabriel.barbu@enea.com> 8Signed-off-by: Gabriel Barbu <gabriel.barbu@enea.com>
9Signed-off-by: Chong Lu <Chong.Lu@windriver.com> 9Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
10Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
10 11
11--- 12---
12 configure.ac | 2 +- 13 tests/Makefile.am | 19 +++++++++++++++++++
13 tests/Makefile.am | 18 ++++++++++++++++++ 14 1 file changed, 19 insertions(+)
14 2 files changed, 19 insertions(+), 1 deletion(-)
15 15
16diff --git a/configure.ac b/configure.ac
17index 5f0aec4..8eaacc6 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -42,7 +42,7 @@ AC_COPYRIGHT([Copyright (c) 1999-]copyright_year[ The strace developers.])
21 AC_CONFIG_SRCDIR([strace.c])
22 AC_CONFIG_AUX_DIR([.])
23 AC_CONFIG_HEADERS([config.h])
24-AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules parallel-tests 1.13])
25+AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules serial-tests 1.13])
26 AM_MAINTAINER_MODE
27 AC_CANONICAL_HOST
28
29diff --git a/tests/Makefile.am b/tests/Makefile.am 16diff --git a/tests/Makefile.am b/tests/Makefile.am
30index b4ba22a..5836438 100644 17index a2f3950..4fa97e2 100644
31--- a/tests/Makefile.am 18--- a/tests/Makefile.am
32+++ b/tests/Makefile.am 19+++ b/tests/Makefile.am
33@@ -408,3 +408,21 @@ BUILT_SOURCES = ksysent.h 20@@ -34,6 +34,7 @@ SIZEOF_LONG = @SIZEOF_LONG@
21 MPERS_NAME =
22 MPERS_CC_FLAGS =
23 ARCH_MFLAGS =
24+TEST_SUITE_LOG = test-suite.log
25 AM_CFLAGS = $(WARN_CFLAGS)
26 AM_CPPFLAGS = $(ARCH_MFLAGS) \
27 -I$(builddir) \
28@@ -490,3 +491,21 @@ BUILT_SOURCES = ksysent.h
34 CLEANFILES = ksysent.h 29 CLEANFILES = ksysent.h
35 30
36 include ../scno.am 31 include ../scno.am
diff --git a/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch b/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch
index 47b1139c53..9e5ec11097 100644
--- a/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch
+++ b/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch
@@ -1,15 +1,25 @@
1The git-version-gen script is not included in tarball releases, 1From bee0680754730498485e24dd037303318c68916c Mon Sep 17 00:00:00 2001
2so we need to avoid attempts to call it when running autoreconf. 2From: Andre McCurdy <armccurdy@gmail.com>
3Date: Mon, 18 Jan 2016 13:33:50 -0800
4Subject: [PATCH] strace: remove need for scripts
5
6git-version-gen copyright-year-gen file-date-gen are not included in
7tarball releases, so we need to avoid attempts to call them.
3 8
4Upstream-Status: Inappropriate [configuration] 9Upstream-Status: Inappropriate [configuration]
5 10
6Signed-off-by: Andre McCurdy <armccurdy@gmail.com> 11Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
12Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
13
14---
15 configure.ac | 6 +++---
16 1 file changed, 3 insertions(+), 3 deletions(-)
7 17
8Index: strace-4.22/configure.ac 18diff --git a/configure.ac b/configure.ac
9=================================================================== 19index ad1d00f..96fa205 100644
10--- strace-4.22.orig/configure.ac 20--- a/configure.ac
11+++ strace-4.22/configure.ac 21+++ b/configure.ac
12@@ -32,7 +32,7 @@ 22@@ -32,12 +32,12 @@
13 23
14 AC_PREREQ(2.57) 24 AC_PREREQ(2.57)
15 AC_INIT([strace], 25 AC_INIT([strace],
@@ -18,3 +28,10 @@ Index: strace-4.22/configure.ac
18 [strace-devel@lists.strace.io], 28 [strace-devel@lists.strace.io],
19 [strace], 29 [strace],
20 [https://strace.io]) 30 [https://strace.io])
31-m4_define([copyright_year], m4_esyscmd([./copyright-year-gen .year]))
32-m4_define([manpage_date], m4_esyscmd([./file-date-gen strace.1.in]))
33+m4_define([copyright_year], m4_esyscmd_s([cat .year]))
34+m4_define([manpage_date], m4_esyscmd_s([cat .strace.1.in.date]))
35 AC_COPYRIGHT([Copyright (c) 1999-]copyright_year[ The strace developers.])
36 AC_CONFIG_SRCDIR([strace.c])
37 AC_CONFIG_AUX_DIR([.])
diff --git a/meta/recipes-devtools/strace/strace/run-ptest b/meta/recipes-devtools/strace/strace/run-ptest
index 133cf92d02..8070d83179 100755
--- a/meta/recipes-devtools/strace/strace/run-ptest
+++ b/meta/recipes-devtools/strace/strace/run-ptest
@@ -1,2 +1,2 @@
1#!/bin/sh 1#!/bin/sh
2make -C tests -k runtest-TESTS 2make -B -C tests -k test-suite.log
diff --git a/meta/recipes-devtools/strace/strace_4.24.bb b/meta/recipes-devtools/strace/strace_4.24.bb
index e6f7e9cba7..9e40a064f8 100644
--- a/meta/recipes-devtools/strace/strace_4.24.bb
+++ b/meta/recipes-devtools/strace/strace_4.24.bb
@@ -44,6 +44,8 @@ do_compile_ptest() {
44 44
45do_install_ptest() { 45do_install_ptest() {
46 oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR} 46 oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
47 install -m 755 ${S}/test-driver ${D}${PTEST_PATH}
48 install -m 644 ${B}/config.h ${D}${PTEST_PATH}
47 sed -i -e '/^src/s/strace.*[1-9]/ptest/' \ 49 sed -i -e '/^src/s/strace.*[1-9]/ptest/' \
48 -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ 50 -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
49 -e 's|${DEBUG_PREFIX_MAP}||g' \ 51 -e 's|${DEBUG_PREFIX_MAP}||g' \