Skip to contentSkip to conversation

lttng-tools: use perl-misc, perl-modules in ptest deps

PATCH In review Nathan Lynch 2 participants 5 messages Feb 6, 2015 – Feb 9, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lttng-tools: use perl-misc, perl-modules in ptest deps

The testcases for lttng-tools use the "prove" command from perl-misc, which needs many modules not in the base perl package.

---
 meta/recipes-kernel/lttng/lttng-tools_2.5.3.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/lttng/lttng-tools_2.5.3.bb +1 -1
index 87052ebb8e82..931e278ea583 100644
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \
                     file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca"
 
 DEPENDS = "liburcu popt lttng-ust libxml2"
-RDEPENDS_${PN}-ptest += "make perl bash"
+RDEPENDS_${PN}-ptest += "make bash perl-misc perl-modules"
 
 SRCREV = "75d966798cf8cbe8ca12773c2bf2822983bd78a3"
 
Signature · 1 line
1.9.3
#1 lore raw
Quoted 4 lines · Nathan Lynch

The testcases for lttng-tools use the "prove" command from perl-misc, which needs many modules not in the base perl package.

Wouldn't be better to specify the modules needed for the prove command? This avoids unneeded packages to be installed.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#2 lore raw
Quoted 8 lines · Otavio Salvador
Quoted 4 lines · Nathan Lynch

The testcases for lttng-tools use the "prove" command from perl-misc, which needs many modules not in the base perl package.

Wouldn't be better to specify the modules needed for the prove command? This avoids unneeded packages to be installed.

I had thought so too (sort of -- why doesn't perl-misc depend on the necessary module packages?), but I encountered runtime errors such as this (using perl-module-app-prove instead of perl-modules):

./run.sh unit_tests
Base class package "TAP::Base" is empty.
(Perhaps you need to 'use' the module which defines that package first, or make that module available in @INC (@INC contains: /etc/perl /usr/lib/perl/sit
e_perl/5.20.0/ /usr/lib/perl/site_perl/5.20.0 /usr/lib/perl/vendor_perl/5.20.0/ /usr/ lib/perl/vendor_perl/5.20.0 /usr/lib/perl/5.20.0/ /usr/lib/perl/5.20.0 /usr/local/lib /site_perl /usr/lib/perl/5.20.0 .).
at /usr/lib/perl/5.20.0/TAP/Harness.pm line 11.
BEGIN failed--compilation aborted at /usr/lib/perl/5.20.0/TAP/Harness.pm line 11. Compilation failed in require at /usr/lib/perl/5.20.0/App/Prove.pm line 6. BEGIN failed--compilation aborted at /usr/lib/perl/5.20.0/App/Prove.pm line 6. Compilation failed in require at /usr/bin/prove line 8.
BEGIN failed--compilation aborted at /usr/bin/prove line 8. Makefile:664: recipe for target 'installcheck-am' failed

The patch below is how far I got into manually fixing perl dependencies before settling on the current patch. This allows the lttng-tools tests to run, although I see warnings:

./run.sh unit_tests
Warning: failed to load Config_git.pl, something strange about this perl...

This message is emitted from one of:

/usr/lib/perl/5.20.0/Config_heavy-target.pl
/usr/lib/perl/5.20.0/Config_heavy.pl

These are in perl-lib; Config_git.pl is supplied by perl-module-config-git.

In any case, I think I need to amend this patch since it looks like the testcases expect the sleep command from coreutils as well as babeltrace.

meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc +13 -0
index 041471a046bb..6264f11937f8 100644
@@ -13,6 +13,10 @@
 #| egrep -wv '=>|module-a|module-apache.?|module-apr|module-authen-sasl|module-b-asmdata|module-build-.*|module-convert-ebcdic|module-devel-size|module-digest-perl-md5|module-dumpvalue|module-extutils-constant-aaargh56hash|module-extutils-xssymset|module-file-bsdglob|module-for|module-it|module-io-string|module-ipc-system-simple|module-lexical|module-local-lib|metadata|module-modperl-util|module-pluggable-object|module-test-builder-io-scalar|module-text-unidecode|module-win32|objects\sload|syscall.ph|systeminfo.ph|%s' > /tmp/
 
 RDEPENDS_perl-misc += "perl"
+# rdepends for /usr/bin/prove
+RDEPENDS_perl-misc += "perl-module-app-prove"
+RDEPENDS_perl-misc += "perl-module-tap-formatter-file"
+
 RDEPENDS_${PN}-pod += "perl"
 
 # Some additional dependencies that the above doesn't manage to figure out
@@ -49,6 +53,9 @@ RDEPENDS_${PN}-module-app-prove += "${PN}-module-file-spec"
 RDEPENDS_${PN}-module-app-prove += "${PN}-module-getopt-long"
 RDEPENDS_${PN}-module-app-prove += "${PN}-module-strict"
 RDEPENDS_${PN}-module-app-prove += "${PN}-module-tap-harness"
+RDEPENDS_${PN}-module-app-prove += "${PN}-module-tap-parser"
+RDEPENDS_${PN}-module-app-prove += "${PN}-module-tap-parser-aggregator"
+RDEPENDS_${PN}-module-app-prove += "${PN}-module-tap-parser-scheduler"
 RDEPENDS_${PN}-module-app-prove += "${PN}-module-text-parsewords"
 RDEPENDS_${PN}-module-app-prove += "${PN}-module-warnings"
 RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-app-prove-state-result"
@@ -56,6 +63,7 @@ RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-base"
 RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-carp"
 RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-constant"
 RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-file-find"
+RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-file-glob"
 RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-file-spec"
 RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-strict"
 RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-tap-parser-yamlish-reader"
@@ -1839,6 +1847,7 @@ RDEPENDS_${PN}-module-ops += "${PN}-module-opcode"
 RDEPENDS_${PN}-module-overloading += "${PN}-module-overload-numbers"
 RDEPENDS_${PN}-module-overloading += "${PN}-module-warnings"
 RDEPENDS_${PN}-module-overload += "${PN}-module-mro"
+RDEPENDS_${PN}-module-overload += "${PN}-module-overloading"
 RDEPENDS_${PN}-module-overload += "${PN}-module-scalar-util"
 RDEPENDS_${PN}-module-overload += "${PN}-module-warnings-register"
 RDEPENDS_${PN}-module-package-constants += "${PN}-module-if"
@@ -2177,6 +2186,7 @@ RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-xsloader"
 RDEPENDS_${PN}-module-tap-base += "${PN}-module-base"
 RDEPENDS_${PN}-module-tap-base += "${PN}-module-constant"
 RDEPENDS_${PN}-module-tap-base += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-base += "${PN}-module-tap-object"
 RDEPENDS_${PN}-module-tap-base += "${PN}-module-warnings"
 RDEPENDS_${PN}-module-tap-formatter-base += "${PN}-module-base"
 RDEPENDS_${PN}-module-tap-formatter-base += "${PN}-module-posix"
@@ -2204,10 +2214,12 @@ RDEPENDS_${PN}-module-tap-formatter-console-session += "${PN}-module-warnings"
 RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-base"
 RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-posix"
 RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-tap-formatter-base"
 RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-tap-formatter-file-session"
 RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-warnings"
 RDEPENDS_${PN}-module-tap-formatter-file-session += "${PN}-module-base"
 RDEPENDS_${PN}-module-tap-formatter-file-session += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-formatter-file-session += "${PN}-module-tap-formatter-session"
 RDEPENDS_${PN}-module-tap-formatter-file-session += "${PN}-module-warnings"
 RDEPENDS_${PN}-module-tap-formatter-session += "${PN}-module-base"
 RDEPENDS_${PN}-module-tap-formatter-session += "${PN}-module-strict"
@@ -2223,6 +2235,7 @@ RDEPENDS_${PN}-module-tap-harness += "${PN}-module-file-path"
 RDEPENDS_${PN}-module-tap-harness += "${PN}-module-file-spec"
 RDEPENDS_${PN}-module-tap-harness += "${PN}-module-io-handle"
 RDEPENDS_${PN}-module-tap-harness += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-harness += "${PN}-module-tap-base"
 RDEPENDS_${PN}-module-tap-harness += "${PN}-module-warnings"
 RDEPENDS_${PN}-module-tap-object += "${PN}-module-carp"
 RDEPENDS_${PN}-module-tap-object += "${PN}-module-strict"
#3 lore raw
Quoted 5 lines · Nathan Lynch
Quoted 4 lines · Otavio Salvador
Quoted 3 lines · Nathan Lynch

The testcases for lttng-tools use the "prove" command from perl-misc, which needs many modules not in the base perl package.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Wouldn't be better to specify the modules needed for the prove command? This avoids unneeded packages to be installed.

I had thought so too (sort of -- why doesn't perl-misc depend on the necessary module packages?), but I encountered runtime errors such as this (using perl-module-app-prove instead of perl-modules):

...

Your patch seems very close to what I would expect. I think the granular dependency fix is the way to go otherwise we start to grow the rootfs size and it will be a very difficult thing to fix in long term. We should avoid this at any cost or we end build a bloated system... not what we are looking for.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#4 lore raw
In reply to Nathan Lynch
Quoted 2 lines · Nathan Lynch

The testcases for lttng-tools use the "prove" command from perl-misc, which needs many modules not in the base perl package.

BTW, several of the lttng-tools testcases emit:

libgcc_s.so.1 must be installed for pthread_cancel to work

This is a fatal error from glibc. glibc's README says:

Also note that the shared version of the libgcc_s library must be installed for the pthread library to work correctly.

There is no libgcc_s.so.1 on the target. In glibc.inc I see:

# nptl needs libgcc but dlopens it, so our shlibs code doesn't detect this
#RDEPENDS_${PN} += "${@['','libgcc']['nptl' in '${GLIBC_ADDONS}']}"

but I haven't been able to find out why this code is disabled. Uncommenting it fixes the issue for me. Is that the right fix?