Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 531658 - >=app-admin/salt-2014.7.0 - test_user test fails when running as non root
Summary: >=app-admin/salt-2014.7.0 - test_user test fails when running as non root
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
Depends on:
Reported: 2014-12-04 12:17 UTC by Thomas Deutschmann (RETIRED)
Modified: 2014-12-09 11:40 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

app-admin_salt-2014.7.0-r1_20141204-120507.log (app-admin_salt-2014.7.0-r1_20141204-120507.log,168.71 KB, text/plain)
2014-12-04 12:17 UTC, Thomas Deutschmann (RETIRED)
salt-runtests.log (salt-runtests.log.gz,52.75 KB, application/gzip)
2014-12-05 19:33 UTC, Thomas Deutschmann (RETIRED)
another salt-runtest.log (salt-runtests.log.gz,67.86 KB, application/gzip)
2014-12-09 11:40 UTC, Tetja Rediske

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2014-12-04 12:17:13 UTC
Created attachment 390914 [details]


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/", line 60, in test_user
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 )"

+       "${FILESDIR}/${PN}-2014.1.2-tests-nonroot.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]
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/", line 47, in test_sock_path_len
  File "/var/tmp/portage/app-admin/salt-2014.7.0-r1/work/salt-2014.7.0-python2_7/build/lib/salt/", line 355, in _prepare_minion_event_system
    os.makedirs(minion_sock_dir, 0755)
  File "/usr/lib64/python2.7/", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib64/python2.7/", 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/", 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/", 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.