Bug 10953 - util-linux installs libtool wrapper scripts instead of binaries for ptest
Summary: util-linux installs libtool wrapper scripts instead of binaries for ptest
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.5 M1
Assignee: Juro Bystricky
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-01-23 14:07 UTC by Ross Burton
Modified: 2017-11-10 17:06 UTC (History)
4 users (show)

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


Attachments
patch addressing ptest shortcomings. (3.21 KB, patch)
2017-09-29 18:47 UTC, Juro Bystricky
no flags Details | Diff
ptest log file (25.77 KB, text/x-log)
2017-09-29 18:48 UTC, Juro Bystricky
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2017-01-23 14:07:48 UTC
Using my awesome new QA test, util-linux fails dramatically:

WARNING: util-linux-2.29-r0 do_package_qa: QA Issue: util-linux-ptest: /usr/lib/util-linux/ptest/test_uuid_parser looks like a libtool wrapper script [libtool-wrapper]

The install_ptest just copies executables from ${B}, which generally means libtool wrappers and not binaries.

Also it copies *all* executables in ${B} so that means all of the tools are copied, not just the test suite.
Comment 1 Juro Bystricky 2017-09-29 00:07:32 UTC
there is, of course, another problem. The ptests tests the binaries that were copied and not the binaries that are installed ( i.e installed in /usr/bin/, /bin). So the tests are kind of useless.... as the binaries may or may not be the same. So either they are the same and we don't need to copy them, or they are not the same and we test the ones that are actually not going to be used.
Chen Qi: I can take this bug, let me know.
Comment 2 Juro Bystricky 2017-09-29 18:47:13 UTC
Created attachment 4036 [details]
patch addressing ptest shortcomings.
Comment 3 Juro Bystricky 2017-09-29 18:47:33 UTC
So I could not resist and did some poking. It is important to realize a subtle paradigm shift: the original test suite was meant to verify we did not introduce regression errors when building the util-linux programs. It was meant to run on the build system. The ptest implementation of the test suite tests the installed (and obviously already cross-compiled) utilities. So with the patches (see the attachment) I got these results:

PASS: 339
FAIL: 12
SKIP: 59

Note I also set:
update-alternatives --install /bin/kill kill /bin/kill.util 300

otherwise some "kill" tests also fail.

Also note that all tests are enabled, and some tests (mount in particular) are quite disruptive (we run as root!), hence a big warning "Don't run on production system". So they probably should/could be disabled, fairly easy to do.
Comment 4 Juro Bystricky 2017-09-29 18:48:42 UTC
Created attachment 4037 [details]
ptest log file
Comment 5 Juro Bystricky 2017-09-29 18:49:33 UTC
(In reply to comment #3)
> So I could not resist and did some poking. It is important to realize a
> subtle paradigm shift: the original test suite was meant to verify we did
> not introduce regression errors when building the util-linux programs. It
> was meant to run on the build system. The ptest implementation of the test
> suite tests the installed (and obviously already cross-compiled) utilities.
> So with the patches (see the attachment) I got these results:
> 
> PASS: 339
> FAIL: 12
> SKIP: 59
> 
> Note I also set:
> update-alternatives --install /bin/kill kill /bin/kill.util 300
> 
> otherwise some "kill" tests also fail.
> 
> Also note that all tests are enabled, and some tests (mount in particular)
> are quite disruptive (we run as root!), hence a big warning "Don't run on
> production system". So they probably should/could be disabled, fairly easy
> to do.

Correction:
update-alternatives --install /bin/kill kill /bin/kill.util-linux 300
Comment 6 Chen Qi 2017-10-16 01:44:07 UTC
(In reply to comment #1)
> there is, of course, another problem. The ptests tests the binaries that
> were copied and not the binaries that are installed ( i.e installed in
> /usr/bin/, /bin). So the tests are kind of useless.... as the binaries may
> or may not be the same. So either they are the same and we don't need to
> copy them, or they are not the same and we test the ones that are actually
> not going to be used.
> Chen Qi: I can take this bug, let me know.


Just noticed these comments.

I've changed the assignee to you.

Best Regards,
Chen Qi