Bug 12277 - dbus-test-ptest is broken
Summary: dbus-test-ptest is broken
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.4.1
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.5 M3
Assignee: Juro Bystricky
QA Contact:
URL:
Whiteboard:
: 10841 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-10-25 22:33 UTC by Juro Bystricky
Modified: 2018-03-20 08:30 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
dbus-test ptest-runner log (with stderr output included) (2.32 KB, text/x-log)
2017-10-25 22:33 UTC, Juro Bystricky
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juro Bystricky 2017-10-25 22:33:32 UTC
Created attachment 4101 [details]
dbus-test ptest-runner log (with stderr output included)

The reason for the failures is that dbus-test-ptest tests against the installed 
libdbus-1.so, which was built and installed by **different** package (I believe it was dbus-dev).

Normally dbus-test would use a local libdbus-1.so and testing using this library would not create problems.  Although both libraries are built from the same sources, they are configured differently. The library (and test apps) in dbus-test are configured with --enable-assert and --enable-verbose. However, the distributed/installed library was configured/built without these.
So when a test app tries to issue an assert or print a (warning) message we get a segmentation fault or some import/export relocation error (see the attachement).

The remedy would be to configure the dbus-test-ptest library same as dbus-dev library, or as much as possible. (For example, libdbus-test-ptest should be configured without --enable-assert and --enable-verbose)

Copying and using the dbus-test-ptest library would alleviate the problems, but the purpose of the testing is to test the **installed** library, not a local copy.
Comment 1 Juro Bystricky 2017-11-08 18:12:14 UTC
*** Bug 10841 has been marked as a duplicate of this bug. ***
Comment 2 Ross Burton 2018-02-22 16:04:18 UTC
We can't consolidate the flags as that's the reason for the split: test flags are not suitable for performance.

Maybe we need to make dbus-test statically link to the libdbus it built?

(or just throw away dbus-test)
Comment 3 Juro Bystricky 2018-02-22 16:07:54 UTC
(In reply to comment #2)
> We can't consolidate the flags as that's the reason for the split: test
> flags are not suitable for performance.
> 
> Maybe we need to make dbus-test statically link to the libdbus it built?
> 
> (or just throw away dbus-test)

yes, dbus-test is not good for anything in this context. There is point in testing a library that is not installed, or is installed in a way that only the test can see it.

We can add some -ptest into dbus package.