[OE-core] [PATCH 1/3] oeqa: make it work for multiple users

richard.purdie at linuxfoundation.org richard.purdie at linuxfoundation.org
Fri Dec 28 23:09:24 UTC 2018


On Fri, 2018-12-28 at 15:57 +0800, Robert Yang wrote:
> 
> On 12/27/18 7:37 PM, Richard Purdie wrote:
> > On Thu, 2018-12-27 at 00:59 -0800, Robert Yang wrote:
> > > There are failures when multiple users run oe-selftest on the
> > > same
> > > host:
> > > 
> > > PermissionError: [Errno 13] Permission denied: '/tmp/oe-saved-
> > > tests/201812250324_qemu'
> > > 
> > > This is because /tmp/oe-saved-tests was created by user A, while
> > > user
> > > B tries
> > > to write data in it, then the error will happen. This patch can
> > > fix
> > > the problem.
> > > 
> > > Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
> > > ---
> > >   meta/classes/testimage.bbclass   | 2 +-
> > >   meta/lib/oeqa/runtime/context.py | 7 +++----
> > >   meta/lib/oeqa/utils/dump.py      | 5 ++++-
> > >   3 files changed, 8 insertions(+), 6 deletions(-)
> > 
> > Putting this into /tmp isn't good. Why don't we move this to
> > LOG_DIR/runtime-hostdump/?
> 
> I'm afraid that we can't do this, the problem is that we need call
> get_bb_vars()
> to get LOG_DIR (d.getVar('LOG_DIR') doesn't work), but get_bb_vars()
> runs
> "bitbake -e" which doesn't work when "bitbake <image> -ctestimage"
> since there
> is a bitbake server running. We can only get BUILDDIR if we don't
> call
> get_bb_vars(), so I think that we have the following 2 solutions:
> 
> 1) Save it to /tmp/runtime-hostdump
> 
> Or:
> 
> 2) Save it to BUILDDIR/runtime-hostdump
> 
> What's your opinion, please ?

I think it should be possible to use LOG_DIR for most of the usecases.
It won't work for the "on target" mode but it should be possible
elsewhere even if we have to tweak the code a bit to ensure the right
variables are passed around?

Cheers,

Richard



More information about the Openembedded-core mailing list