Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 729854

Summary: app-portage/g-cpan-0.17.0 fails tests: # Failed test EROOT
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Robin Johnson <robbat2>
Status: CONFIRMED ---    
Severity: normal CC: halcon, ostroffjh, perl, tanekliang
Priority: Normal Keywords: TESTFAILURE
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
app-portage:g-cpan-0.17.0:20200627-131802.log
emerge-history.txt
environment
etc.portage.tbz2
temp.tbz2
tests.tbz2

Description Toralf Förster gentoo-dev 2020-06-27 13:36:21 UTC
t/01_Gentoo_Portage_Q.t .. 
t/01_Gentoo_Portage_Q.t .. 1/5 
    #   Failed test 'EROOT'
    #   at t/01_Gentoo_Portage_Q.t line 27.
    #          got: ''
    #     expected: '/'

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_systemd-test-20200620-211522

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-8.3.1
 [2] x86_64-pc-linux-gnu-10.1.0 *
clang version 10.0.0 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/10/bin
/usr/lib/llvm/10
10.0.0
Available Python interpreters, in order of preference:
  [1]   python3.7
  [2]   python3.9 (fallback)
  [3]   python3.8 (fallback)
  [4]   python3.6 (fallback)
  [5]   python2.7 (fallback)
Available Rust versions:
  [1]   rust-1.44.1 *
The following VMs are available for generation-2:
The Glorious Glasgow Haskell Compilation System, version 8.0.2

  timestamp(s) of HEAD at this tinderbox image:
/var/db/repos/gentoo	Sat 27 Jun 2020 01:05:19 PM UTC

emerge -qpvO app-portage/g-cpan
[ebuild  N    ] app-portage/g-cpan-0.17.0  USE="test"
Comment 1 Toralf Förster gentoo-dev 2020-06-27 13:36:27 UTC
Created attachment 646706 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-06-27 13:36:30 UTC
Created attachment 646708 [details]
app-portage:g-cpan-0.17.0:20200627-131802.log
Comment 3 Toralf Förster gentoo-dev 2020-06-27 13:36:33 UTC
Created attachment 646710 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2020-06-27 13:36:36 UTC
Created attachment 646712 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2020-06-27 13:36:39 UTC
Created attachment 646714 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-06-27 13:36:41 UTC
Created attachment 646716 [details]
temp.tbz2
Comment 7 Toralf Förster gentoo-dev 2020-06-27 13:36:44 UTC
Created attachment 646718 [details]
tests.tbz2
Comment 8 Alexey Mishustin 2020-09-23 03:22:12 UTC
Hi.

I thought about looking in perl, what is failing, but (as I am not yet familiar with ebuild variables) decided to read about EROOT first. And I've read that ROOT is only allowed in pkg_* phases. Decided to test EROOT in the ebuild. Added 

elog "EROOT=${ROOT}"

in src_test and got

>>> Test phase: app-portage/g-cpan-9999
 * EROOT=

and then

t/01_Gentoo_Portage_Q.t .. 1/5 
    #   Failed test 'EROOT'
    #   at t/01_Gentoo_Portage_Q.t line 27.
    #          got: ''


Does it really mean that the cause of this issue isn't in perl code, but in accessibility of EROOT in the test phase? (ebuild shown '', and test got '')

Or am I missing something?
Comment 9 Alexey Mishustin 2020-09-23 03:30:14 UTC
The same with

elog "EROOT=${EROOT}"
Comment 10 Alexey Mishustin 2020-09-23 03:40:25 UTC
There is

local $ENV{ROOT} = Path::Tiny->cwd;

in the relevant piece of perl code. I'll be able to test what it returns in the test phase later.
Comment 11 Alexey Mishustin 2020-09-23 05:10:48 UTC
Tested, while I had time. Yet not found the solution but narrowed the field significantly:

Path::Tiny->cwd returns '/var/tmp/portage/app-portage/g-cpan-9999/work/g-cpan-9999'

$portageq->envvar('EROOT') returns '' <---- wrong

But $portageq->{_eroot} returns '/'   <---- right
Comment 12 Alexey Mishustin 2020-09-23 12:06:10 UTC
I found a solution and made a pull-request.
Comment 13 Agostino Sarubbo gentoo-dev 2022-02-13 10:00:30 UTC
Update summary. [something] is used when something refers to an overlay