]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
ltp: set PREFERRED_PROVIDER and rename runtests_noltp.sh script
authorMartin Jansa <martin.jansa@gmail.com>
Sat, 7 Dec 2013 17:49:42 +0000 (18:49 +0100)
committerMartin Jansa <Martin.Jansa@gmail.com>
Mon, 20 Apr 2015 14:31:41 +0000 (16:31 +0200)
* 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>
meta/conf/distro/include/default-providers.inc
meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch [new file with mode: 0644]
meta/recipes-extended/ltp/ltp_20120903.bb

index 4b665225ac1a357ff992e08a3ac45e8a419cf30d..3e1d0b939851cbbb454259b14f363b0a12d5c97d 100644 (file)
@@ -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 (file)
index 0000000..1223c61
--- /dev/null
@@ -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
index 522757da00040181ca9a048599f62a77a1bad96c..745f1b5367f7237311b0f256644a5c81c3d5e480 100644 (file)
@@ -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"