summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-03-10 18:14:48 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-03-12 23:39:13 +0000
commit2ea27691aa57951aaba3cc1714a080a112d15408 (patch)
tree4ba41dd527501716a498e454f5513c8b378f7b51 /meta/recipes-kernel
parentd5e34494611f48fbbad47850529f5f732272a909 (diff)
downloadpoky-2ea27691aa57951aaba3cc1714a080a112d15408.tar.gz
lttng-tools: Improve ptest debugging and fix dependencies
Improve the ptest runner script: * log output is available should any test fail to aid debugging * document how to limit the runner to a single test * stop hiding errors to stderr * allow easier single test execution by avoiding path issues with PWD Also depend upon binutils since one of the tests uses addr2line. (From OE-Core rev: 0f111c6eb1673a60663bcdd3d70c0f81bad370c4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-rwxr-xr-xmeta/recipes-kernel/lttng/lttng-tools/run-ptest19
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.13.9.bb4
2 files changed, 18 insertions, 5 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools/run-ptest b/meta/recipes-kernel/lttng/lttng-tools/run-ptest
index c4dbe50f21..bf99322ef2 100755
--- a/meta/recipes-kernel/lttng/lttng-tools/run-ptest
+++ b/meta/recipes-kernel/lttng/lttng-tools/run-ptest
@@ -2,6 +2,19 @@
2# Without --ignore-exit, the tap harness causes any FAILs within a 2# Without --ignore-exit, the tap harness causes any FAILs within a
3# test plan to raise ERRORs; this is just noise. 3# test plan to raise ERRORs; this is just noise.
4export LD_LIBRARY_PATH=FIXMEPTESTPATH/tests/utils/testapp/userspace-probe-elf-binary/.libs 4export LD_LIBRARY_PATH=FIXMEPTESTPATH/tests/utils/testapp/userspace-probe-elf-binary/.libs
5makeargs="LOG_DRIVER_FLAGS=--ignore-exit top_srcdir=$PWD top_builddir=$PWD" 5makeargs="LOG_DRIVER_FLAGS=--ignore-exit top_srcdir=FIXMEPTESTPATH top_builddir=FIXMEPTESTPATH"
6make -k -t all >/dev/null 2>&1 6make -k -t all >error.log 2>&1
7exec make -k -s $makeargs check 2>/dev/null | sed -e 's#/tmp/tmp\...........#/tmp/tmp.XXXXXXXXXX#g' 7# Can specify a test e.g.:
8# -C tests/regression/ check TESTS='kernel/test_callstack'
9make -k -s $makeargs check 2>error.log | sed -e 's#/tmp/tmp\...........#/tmp/tmp.XXXXXXXXXX#g'
10exitcode=$?
11if [ -e error.log ]; then
12 cat error.log
13fi
14if [ -e tests/unit/test-suite.log ]; then
15 cat tests/unit/test-suite.log
16fi
17if [ -e tests/regression/test-suite.log ]; then
18 cat tests/regression/test-suite.log
19fi
20exit $exitcode
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.13.9.bb b/meta/recipes-kernel/lttng/lttng-tools_2.13.9.bb
index 340b254b46..58c0378d66 100644
--- a/meta/recipes-kernel/lttng/lttng-tools_2.13.9.bb
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.13.9.bb
@@ -15,7 +15,7 @@ include lttng-platforms.inc
15DEPENDS = "liburcu popt libxml2 util-linux bison-native" 15DEPENDS = "liburcu popt libxml2 util-linux bison-native"
16RDEPENDS:${PN} = "libgcc" 16RDEPENDS:${PN} = "libgcc"
17RRECOMMENDS:${PN} += "${LTTNGMODULES}" 17RRECOMMENDS:${PN} += "${LTTNGMODULES}"
18RDEPENDS:${PN}-ptest += "make perl bash gawk babeltrace procps perl-module-overloading coreutils util-linux kmod ${LTTNGMODULES} sed python3-core grep" 18RDEPENDS:${PN}-ptest += "make perl bash gawk babeltrace procps perl-module-overloading coreutils util-linux kmod ${LTTNGMODULES} sed python3-core grep binutils"
19RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils" 19RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils"
20RDEPENDS:${PN}-ptest:append:libc-musl = " musl-utils" 20RDEPENDS:${PN}-ptest:append:libc-musl = " musl-utils"
21# babelstats.pl wants getopt-long 21# babelstats.pl wants getopt-long
@@ -84,7 +84,7 @@ do_install_ptest () {
84 done 84 done
85 85
86 # Patch in the correct path for the custom libraries a helper executable needs 86 # Patch in the correct path for the custom libraries a helper executable needs
87 sed -i -e 's!FIXMEPTESTPATH!${PTEST_PATH}!' "${D}${PTEST_PATH}/run-ptest" 87 sed -i -e 's!FIXMEPTESTPATH!${PTEST_PATH}!g' "${D}${PTEST_PATH}/run-ptest"
88 88
89 # Prevent 'make check' from recursing into non-test subdirectories. 89 # Prevent 'make check' from recursing into non-test subdirectories.
90 sed -i -e 's!^SUBDIRS = .*!SUBDIRS = tests!' "${D}${PTEST_PATH}/Makefile" 90 sed -i -e 's!^SUBDIRS = .*!SUBDIRS = tests!' "${D}${PTEST_PATH}/Makefile"