Bug 12604 - Default ptest-runner invocation on multilib may not execute any test suites
Summary: Default ptest-runner invocation on multilib may not execute any test suites
Status: RESOLVED FIXED
Alias: None
Product: Runtime Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 3.2 M1
Assignee: Aníbal Limón
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2018-03-14 11:16 UTC by Kyle Russell
Modified: 2020-05-04 12:07 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

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Russell 2018-03-14 11:16:01 UTC
ptest.bbclass will package ptest scripts in ${libdir}, which may include /usr/lib64 in some multilib configurations.  However, ptest-runner is hard-coded to look at /usr/lib by default, requiring an extra -d /usr/lib64 to execute the default ptest-packaged test suites in these multilib configurations.  This means any automated infrastructure that wants to invoke ptest-runner must be aware of the target architecture to instruct ptest-runner where to find test cases installed by the default arch-dependent ptest packages.  Instead, it would be preferable for ptest-runner to find the default ptest-packaged test suites independent of the arch.

I posted a naive fix to the mailing list to handle the default /usr/lib64 case, though I realize it doesn't allow support for actual multilib test suites (e.g. lib32-libfoo-ptest).

https://lists.yoctoproject.org/pipermail/yocto/2018-February/039997.html

Ross proposed fixing this in ptest-runner instead, but making ptest-runner's DEFAULT_DIRECTORY defined by ${libdir} still doesn't allow ptest-runner to automatically find multilib suites (e.g. lib32-libfoo-ptest) in a /usr/lib64 configuration.

It seemed to me that there were more comprehensive approaches that could be taken to handle multilib setups (https://lists.yoctoproject.org/pipermail/yocto/2018-February/040011.html), so if we can converge on a solution here I'll be glad to workup and test out some new patches.  (Or I can just move the naive approach to ptest-runner.)
Comment 1 Aníbal Limón 2020-03-12 16:55:33 UTC
(In reply to comment #0)
> ptest.bbclass will package ptest scripts in ${libdir}, which may include
> /usr/lib64 in some multilib configurations.  However, ptest-runner is
> hard-coded to look at /usr/lib by default, requiring an extra -d /usr/lib64
> to execute the default ptest-packaged test suites in these multilib
> configurations.  This means any automated infrastructure that wants to
> invoke ptest-runner must be aware of the target architecture to instruct
> ptest-runner where to find test cases installed by the default
> arch-dependent ptest packages.  Instead, it would be preferable for
> ptest-runner to find the default ptest-packaged test suites independent of
> the arch.
> 
> I posted a naive fix to the mailing list to handle the default /usr/lib64
> case, though I realize it doesn't allow support for actual multilib test
> suites (e.g. lib32-libfoo-ptest).
> 
> https://lists.yoctoproject.org/pipermail/yocto/2018-February/039997.html
> 
> Ross proposed fixing this in ptest-runner instead, but making ptest-runner's
> DEFAULT_DIRECTORY defined by ${libdir} still doesn't allow ptest-runner to
> automatically find multilib suites (e.g. lib32-libfoo-ptest) in a /usr/lib64
> configuration.
> 
> It seemed to me that there were more comprehensive approaches that could be
> taken to handle multilib setups
> (https://lists.yoctoproject.org/pipermail/yocto/2018-February/040011.html),
> so if we can converge on a solution here I'll be glad to workup and test out
> some new patches.  (Or I can just move the naive approach to ptest-runner.)

My proposal is to add ptest-runner the ability to specify more than one directory in this case ptest.bbclass can setup multilib libdirs + default libdir.
Comment 2 Aníbal Limón 2020-04-10 15:15:04 UTC
Review at,

https://lists.yoctoproject.org/g/yocto/message/49115
Comment 3 Aníbal Limón 2020-04-28 14:19:14 UTC
OE-Core recipe upgrade and oeqa case at,

https://lists.openembedded.org/g/openembedded-core/topic/patch_1_2_ptest_runner/73336814