dbus: fix ptest runtime failures
cover dbus: fix ptest runtime failures
From: Kai Kang <[email protected]>
The following changes since commit ee5bce2d11e783c0921df47b629025a6b67c44bf:
kernel-dev: Removed bad reference for creating patches. (2017-09-02 00:52:49 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib kangkai/dbus
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/dbus
Kai Kang (1):
dbus: fix ptest runtime failures
meta/recipes-core/dbus/dbus-test_1.10.20.bb | 3 +++ meta/recipes-core/dbus/dbus_1.10.20.bb | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-)
Signature · 1 line
2.14.1
PATCH 1/1 dbus: fix ptest runtime failures
From: Kai Kang <[email protected]>
When run dbus ptest cases, there are some failures:
| ./test/test-dbus-daemon: relocation error: ./test/test-dbus-daemon: symbol | _dbus_real_assert, version LIBDBUS_PRIVATE_1.10.20 not defined in file | libdbus-1.so.3 with link time reference | FAIL: test/test-dbus-daemon | [ 24.943454] test-dbus-daemo[251]: segfault at 0 ip (null) sp | 00007ffddabe6818 error 14 in test-dbus-daemon-eavesdrop[ 400000+a000]
It disables tests in dbus recipe which cases symbols missing and segment fault. When 'ptest' in DISTRO_FEATURES, it should enable some configure options to make the symbols visible to ptest cases.
It also need to correct paths in ptest configure files.
--- meta/recipes-core/dbus/dbus-test_1.10.20.bb | 3 +++ meta/recipes-core/dbus/dbus_1.10.20.bb | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-)
meta/recipes-core/dbus/dbus-test_1.10.20.bb +3 -0
@@ -54,5 +54,8 @@ do_install_ptest() { for i in $l; do install ${B}/bus/.libs/test-$i ${D}${PTEST_PATH}/test; done install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test cp -r ${B}/test/data ${D}${PTEST_PATH}/test + + # fix host contamination + find ${D} -type f -not -executable -exec sed -i 's:${B}:${PTEST_PATH}:' {} \; } RDEPENDS_${PN}-ptest += "bash"
meta/recipes-core/dbus/dbus_1.10.20.bb +3 -3
@@ -91,8 +91,7 @@ pkg_postinst_dbus() { fi } -EXTRA_OECONF = "--disable-tests \ - --disable-xml-docs \ +EXTRA_OECONF = "--disable-xml-docs \ --disable-doxygen-docs \ --disable-libaudit \ --enable-largefile \
@@ -101,10 +100,11 @@ EXTRA_OECONF = "--disable-tests \ EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl" EXTRA_OECONF_append_class-native = " --disable-selinux" -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)}" +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ptest systemd x11', d)}" PACKAGECONFIG_class-native = "" PACKAGECONFIG_class-nativesdk = "" +PACKAGECONFIG[ptest] = "--enable-embedded-tests --enable-asserts --enable-verbose-mode,--enable-embedded-tests --disable-asserts --enable-verbose-mode" PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd" PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm" PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
Signature · 1 line
2.14.1
Quoted 15 lines · On Mon, 2017-09-04 at 17:39 +0800, [email protected] wrote:
From: Kai Kang <[email protected]>
When run dbus ptest cases, there are some failures:
Quoted 11 lines
./test/test-dbus-daemon: relocation error: ./test/test-dbus-daemon:
symbol_dbus_real_assert, version LIBDBUS_PRIVATE_1.10.20 not defined in file
libdbus-1.so.3 with link time reference
FAIL: test/test-dbus-daemon
[ 24.943454] test-dbus-daemo[251]: segfault at 0
ip (null) sp00007ffddabe6818error 14 in test-dbus-daemon-eavesdrop[ 400000+a000]
Quoted 7 lines
It disables tests in dbus recipe which cases symbols missing and segment
fault. When 'ptest' inDISTRO_FEATURES, it should enable some configure
options to make the symbols visible to ptest cases.It also need to correct paths in ptest configure files.
Does this have a runtime effect on dbus, i.e. are these runtime asserts which we don't want in production code?
Cheers,
Richard
Quoted 21 lines · Richard Purdie
Quoted 20 lines · On Mon, 2017-09-04 at 17:39 +0800, [email protected] wrote:
From: Kai Kang <[email protected]>
When run dbus ptest cases, there are some failures:
Quoted 10 lines
./test/test-dbus-daemon: relocation error: ./test/test-dbus-daemon:
symbol_dbus_real_assert, version LIBDBUS_PRIVATE_1.10.20 not defined in file
libdbus-1.so.3 with link time reference
FAIL: test/test-dbus-daemon[ 24.943454] test-dbus-daemo[251]: segfault at 0ip (null) sp
00007ffddabe6818error 14 in test-dbus-daemon-eavesdrop[ 400000+a000]It disables tests in dbus recipe which cases symbols missing and segment
fault. When 'ptest' inDISTRO_FEATURES, it should enable some configure
options to make the symbols visible to ptest cases.
Quoted 3 lines
Quoted 1 line
It also need to correct paths in ptest configure files.
Does this have a runtime effect on dbus, i.e. are these runtime asserts which we don't want in production code?
HI Richard,
I am sorry that did some copy and paste errors for packageconfig ptest. It should disable them all if 'ptest' is disabled. Did that make myself misunderstood?
If not, please:
It gives warnings in configure.ac for enable embedded_tests and asserts:
if test x$enable_embedded_tests = xyes; then
echo "NOTE: building with unit tests increases the size of the
installed library and renders it insecure."
fi
if test x$enable_asserts = xyes; then
echo "NOTE: building with assertions increases library size and
decreases performance."
fi
It seems true that enable asserts will affect runtime performance. But the configure options are required for ptest cases. Would is it not ok that only enable them when ptest in DISTRO_FEATURES?
I'll send V2 to correct the typos. Sorry for inconvenience.
Regards,
Kai
Quoted 5 lines
Cheers,
Richard
Signature · 2 lines
Regards, Neil | Kai Kang