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

Bug 531658

Summary: >=app-admin/salt-2014.7.0 - test_user test fails when running as non root
Product: Gentoo Linux Reporter: Thomas Deutschmann (RETIRED) <whissi>
Component: Current packagesAssignee: Patrick McLean <chutzpah>
Status: UNCONFIRMED ---    
Severity: normal CC: jstein
Priority: Normal Keywords: TESTFAILURE
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: app-admin_salt-2014.7.0-r1_20141204-120507.log
salt-runtests.log
another salt-runtest.log

Description Thomas Deutschmann (RETIRED) gentoo-dev 2014-12-04 12:17:13 UTC
Created attachment 390914 [details]
app-admin_salt-2014.7.0-r1_20141204-120507.log

Hi,

app-admin/salt-2014.7.0 and app-admin/salt-2014.7.0-r1 don't pass the test suite:

[...]
======================================================================
FAIL: test_user (unit.utils.verify_test.TestVerify)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/app-admin/salt-2014.7.0-r1/work/salt-2014.7.0-python2_7/tests/unit/utils/verify_test.py", line 60, in test_user
    self.assertTrue(check_user(getpass.getuser()))
AssertionError: False is not true

----------------------------------------------------------------------
Ran 776 tests in 138.704s

FAILED (failures=1, skipped=78, expected failures=1)
Exception TypeError: "'NoneType' object is not callable" in <bound method MasterEvent.__del__ of <salt.utils.event.MasterEvent object at 0x7fd06e22afd0>> ignored
 * ERROR: app-admin/salt-2014.7.0-r1::gentoo failed (test phase):
 *   testing failed
[...]


In the previous salt version, the ebuild applied salt-2014.1.2-tests-nonroot.patch to skip the failing test:


@@ -75,7 +75,6 @@
 REQUIRED_USE="|| ( raet zeromq )"

 PATCHES=(
+       "${FILESDIR}/${PN}-2014.1.2-tests-nonroot.patch"
        "${FILESDIR}/${P}-remove-pydsl-includes-test.patch"
 )
Comment 1 Patrick McLean gentoo-dev 2014-12-05 19:04:02 UTC
Could you try installing sys-apps/fakeroot and see if the tests work, it may be that it needs fakeroot installed for the nonroot tests.
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2014-12-05 19:19:01 UTC
I installed sys-apps/fakeroot-1.20.2 on my system and re-run

> emerge app-admin/salt::gentoo

It failed with the same error. So if you thought salt would pick up fakeroot, it doesn't.
Comment 3 Patrick McLean gentoo-dev 2014-12-05 19:28:11 UTC
I am trying to track down why it works fine for me, but not you.

Could you attach /tmp/salt-runtests.log
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2014-12-05 19:33:05 UTC
Created attachment 391032 [details]
salt-runtests.log
Comment 5 Thomas Deutschmann (RETIRED) gentoo-dev 2014-12-05 19:45:37 UTC
(In reply to Patrick McLean from comment #3)
> I am trying to track down why it works fine for me, but not you.

Are you running with FEATURES=-userpriv?

Like you can see from my build log, I am using

  > FEATURES: preserve-libs sandbox test userpriv usersandbox

When I run with FEATURES=-userpriv I'll pass the test_user test, but then it will fail in

======================================================================
ERROR: test_sock_path_len (unit.minion_test.MinionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/app-admin/salt-2014.7.0-r1/work/salt-2014.7.0-python2_7/tests/unit/minion_test.py", line 47, in test_sock_path_len
    testminion._prepare_minion_event_system()
  File "/var/tmp/portage/app-admin/salt-2014.7.0-r1/work/salt-2014.7.0-python2_7/build/lib/salt/minion.py", line 355, in _prepare_minion_event_system
    os.makedirs(minion_sock_dir, 0755)
  File "/usr/lib64/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib64/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/run/salt'
Comment 6 Patrick McLean gentoo-dev 2014-12-05 21:39:28 UTC
(In reply to Thomas D. from comment #4)
> Created attachment 391032 [details]
> salt-runtests.log
Why did you double-gzip it?

20:15:38,781 [salt.loader                                         :1133][DEBUG   ] KeyError when loading groupadd
Traceback (most recent call last):
  File "/var/tmp/portage/app-admin/salt-2014.7.0-r1/work/salt-2014.7.0-python2_7/build/lib/salt/loader.py", line 1043, in process_virtual
    virtual = mod.__virtual__()
  File "/var/tmp/portage/app-admin/salt-2014.7.0-r1/work/salt-2014.7.0-python2_7/build/lib/salt/modules/groupadd.py", line 20, in __virtual__
    if __grains__['kernel'] in ('Linux', 'OpenBSD', 'NetBSD'):
KeyError: 'kernel'

It appears you have lots of errors like that in the log, I would expect that there is some other issue on your machine, perhaps an upstream bug.
Comment 7 Tetja Rediske 2014-12-09 11:40:54 UTC
Created attachment 391280 [details]
another salt-runtest.log

I was asked to let it tun too and report here.
Comment 8 Jonas Stein gentoo-dev 2024-01-24 01:09:26 UTC
the ebuild disables tests, which require root now. Can we close this?