aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2013-12-07 18:49:42 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2015-04-20 16:31:41 +0200
commit00c145dc4b617145fe513997e327fc72fc503d8d (patch)
treecaa231b96c859135b7199bec74d99f094c52a66f
parentb5177eb8dcfb9ee9e1e8de19d7f29517351520fc (diff)
downloadopenembedded-core-contrib-00c145dc4b617145fe513997e327fc72fc503d8d.tar.gz
ltp: set PREFERRED_PROVIDER and rename runtests_noltp.sh script
* ltp installs 2 different runtests_noltp.sh files from different directories into /opt/ltp/testcases/bin/runtests_noltp.sh last one installed wins and causes unexpected changes in buildhistory's files-in-image.txt report, rename them to have unique name as other ltp scripts have. * also define PREFERRED_PROVIDER to resolve note shown when building with meta-oe layer: NOTE: multiple providers are available for ltp (ltp, ltp-ddt) NOTE: consider defining a PREFERRED_PROVIDER entry to match ltp Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/conf/distro/include/default-providers.inc2
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch181
-rw-r--r--meta/recipes-extended/ltp/ltp_20120903.bb5
3 files changed, 186 insertions, 2 deletions
diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc
index 4b665225ac..3e1d0b9398 100644
--- a/meta/conf/distro/include/default-providers.inc
+++ b/meta/conf/distro/include/default-providers.inc
@@ -38,3 +38,5 @@ PREFERRED_PROVIDER_console-tools ?= "kbd"
PREFERRED_PROVIDER_gzip-native ?= "pigz-native"
PREFERRED_PROVIDER_make ?= "make"
PREFERRED_PROVIDER_udev ?= "${@base_contains('DISTRO_FEATURES','systemd','systemd','udev',d)}"
+# Alternative is ltp-ddt in meta-oe: meta-oe/recipes-devtools/ltp-ddt/ltp-ddt_0.0.4.bb
+PREFERRED_PROVIDER_ltp ?= "ltp"
diff --git a/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch b/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch
new file mode 100644
index 0000000000..1223c613c7
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch
@@ -0,0 +1,181 @@
+From 9751a6526cffcdf4e3dc2cb33641259a7be00e19 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Sat, 7 Dec 2013 18:24:32 +0100
+Subject: [PATCH] Rename runtests_noltp.sh script so have unique name
+
+* they are installed in the same target path
+ /opt/ltp/testcases/bin/runtests_noltp.sh
+ and overwrite each other in non-deterministic way
+ when multiple processes are used in "make install"
+
+ ./temp/log.do_install:install -m 00775
+ "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/sysvipc/runtests_noltp.sh"
+ "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh"
+ ./temp/log.do_install:install -m 00775
+ "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/utsname/runtests_noltp.sh"
+ "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh"
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+diff -uNr ltp-20120903.orig/testcases/kernel/containers/sysvipc/runtests_noltp.sh ltp-20120903/testcases/kernel/containers/sysvipc/runtests_noltp.sh
+--- ltp-20120903.orig/testcases/kernel/containers/sysvipc/runtests_noltp.sh 2012-09-02 21:39:27.000000000 -0700
++++ ltp-20120903/testcases/kernel/containers/sysvipc/runtests_noltp.sh 1969-12-31 16:00:00.000000000 -0800
+@@ -1,31 +0,0 @@
+-#!/bin/sh
+-################################################################################
+-## ##
+-## Copyright (c) International Business Machines Corp., 2007 ##
+-## ##
+-## This program is free software; you can redistribute it and#or modify ##
+-## it under the terms of the GNU General Public License as published by ##
+-## the Free Software Foundation; either version 2 of the License, or ##
+-## (at your option) any later version. ##
+-## ##
+-## This program is distributed in the hope that it will be useful, but ##
+-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
+-## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
+-## for more details. ##
+-## ##
+-## You should have received a copy of the GNU General Public License ##
+-## along with this program; if not, write to the Free Software ##
+-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##
+-## ##
+-################################################################################
+-
+-exit_code=0
+-echo "sysvipc tests"
+-for type in none clone unshare; do
+- echo "**sysvipc $type"
+- ./shmnstest_noltp $type
+- if [ $? -ne 0 ]; then
+- exit_code=$?
+- fi
+-done
+-exit $exit_code
+diff -uNr ltp-20120903.orig/testcases/kernel/containers/sysvipc/tunipctests_noltp.sh ltp-20120903/testcases/kernel/containers/sysvipc/tunipctests_noltp.sh
+--- ltp-20120903.orig/testcases/kernel/containers/sysvipc/tunipctests_noltp.sh 1969-12-31 16:00:00.000000000 -0800
++++ ltp-20120903/testcases/kernel/containers/sysvipc/tunipctests_noltp.sh 2012-09-02 21:39:27.000000000 -0700
+@@ -0,0 +1,31 @@
++#!/bin/sh
++################################################################################
++## ##
++## Copyright (c) International Business Machines Corp., 2007 ##
++## ##
++## This program is free software; you can redistribute it and#or modify ##
++## it under the terms of the GNU General Public License as published by ##
++## the Free Software Foundation; either version 2 of the License, or ##
++## (at your option) any later version. ##
++## ##
++## This program is distributed in the hope that it will be useful, but ##
++## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
++## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
++## for more details. ##
++## ##
++## You should have received a copy of the GNU General Public License ##
++## along with this program; if not, write to the Free Software ##
++## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##
++## ##
++################################################################################
++
++exit_code=0
++echo "sysvipc tests"
++for type in none clone unshare; do
++ echo "**sysvipc $type"
++ ./shmnstest_noltp $type
++ if [ $? -ne 0 ]; then
++ exit_code=$?
++ fi
++done
++exit $exit_code
+diff -uNr ltp-20120903.orig/testcases/kernel/containers/utsname/runtests_noltp.sh ltp-20120903/testcases/kernel/containers/utsname/runtests_noltp.sh
+--- ltp-20120903.orig/testcases/kernel/containers/utsname/runtests_noltp.sh 2012-09-02 21:39:27.000000000 -0700
++++ ltp-20120903/testcases/kernel/containers/utsname/runtests_noltp.sh 1969-12-31 16:00:00.000000000 -0800
+@@ -1,41 +0,0 @@
+-#!/bin/sh
+-################################################################################
+-## ##
+-## Copyright (c) International Business Machines Corp., 2007 ##
+-## ##
+-## This program is free software; you can redistribute it and#or modify ##
+-## it under the terms of the GNU General Public License as published by ##
+-## the Free Software Foundation; either version 2 of the License, or ##
+-## (at your option) any later version. ##
+-## ##
+-## This program is distributed in the hope that it will be useful, but ##
+-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
+-## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
+-## for more details. ##
+-## ##
+-## You should have received a copy of the GNU General Public License ##
+-## along with this program; if not, write to the Free Software ##
+-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##
+-## ##
+-################################################################################
+-
+-oldhostname=`hostname`
+-exit_code=0
+-echo "unshare tests"
+-for i in `seq 1 5`; do
+- echo "test $i (unshare)"
+- ./utstest_noltp unshare $i
+- if [ $? -ne 0 ]; then
+- exit_code=$?
+- fi
+-done
+-echo "clone tests"
+-for i in `seq 1 5`; do
+- echo "test $i (clone)"
+- ./utstest_noltp clone $i
+- if [ $? -ne 0 ]; then
+- exit_code=$?
+- fi
+-done
+-hostname "$oldhostname"
+-exit $exit_code
+diff -uNr ltp-20120903.orig/testcases/kernel/containers/utsname/runutstests_noltp.sh ltp-20120903/testcases/kernel/containers/utsname/runutstests_noltp.sh
+--- ltp-20120903.orig/testcases/kernel/containers/utsname/runutstests_noltp.sh 1969-12-31 16:00:00.000000000 -0800
++++ ltp-20120903/testcases/kernel/containers/utsname/runutstests_noltp.sh 2012-09-02 21:39:27.000000000 -0700
+@@ -0,0 +1,41 @@
++#!/bin/sh
++################################################################################
++## ##
++## Copyright (c) International Business Machines Corp., 2007 ##
++## ##
++## This program is free software; you can redistribute it and#or modify ##
++## it under the terms of the GNU General Public License as published by ##
++## the Free Software Foundation; either version 2 of the License, or ##
++## (at your option) any later version. ##
++## ##
++## This program is distributed in the hope that it will be useful, but ##
++## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
++## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
++## for more details. ##
++## ##
++## You should have received a copy of the GNU General Public License ##
++## along with this program; if not, write to the Free Software ##
++## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##
++## ##
++################################################################################
++
++oldhostname=`hostname`
++exit_code=0
++echo "unshare tests"
++for i in `seq 1 5`; do
++ echo "test $i (unshare)"
++ ./utstest_noltp unshare $i
++ if [ $? -ne 0 ]; then
++ exit_code=$?
++ fi
++done
++echo "clone tests"
++for i in `seq 1 5`; do
++ echo "test $i (clone)"
++ ./utstest_noltp clone $i
++ if [ $? -ne 0 ]; then
++ exit_code=$?
++ fi
++done
++hostname "$oldhostname"
++exit $exit_code
diff --git a/meta/recipes-extended/ltp/ltp_20120903.bb b/meta/recipes-extended/ltp/ltp_20120903.bb
index 522757da00..745f1b5367 100644
--- a/meta/recipes-extended/ltp/ltp_20120903.bb
+++ b/meta/recipes-extended/ltp/ltp_20120903.bb
@@ -23,8 +23,9 @@ DEPENDS = "attr libaio libcap acl openssl"
PR = "r2"
-SRC_URI = "${SOURCEFORGE_MIRROR}/ltp/ltp-full-${PV}.bz2"
-
+SRC_URI = "${SOURCEFORGE_MIRROR}/ltp/ltp-full-${PV}.bz2 \
+ file://0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch \
+"
SRC_URI[md5sum] = "3c885047b137a6955e087ad20807a018"
SRC_URI[sha256sum] = "41d2f4cd88619aa7b5cdad93cb7691b69166f7751bc9f2f72558937cbef581c2"