Bug 1134851

Summary: vdsm tests do not check for sudo availability
Product: [Retired] oVirt Reporter: Michal Skrivanek <michal.skrivanek>
Component: vdsmAssignee: Dan Kenigsberg <danken>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Belka <jbelka>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.4CC: asegurap, bazulay, danken, ecohen, gklein, iheim, mgoldboi, michal.skrivanek, rbalakri, ybronhei, yeylon
Target Milestone: ---   
Target Release: 3.4.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: ovirt-3.4.4_rc Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1135117 (view as bug list) Environment:
Last Closed: 2014-09-24 08:08:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1122979, 1135117, 1154665    

Description Michal Skrivanek 2014-08-28 10:58:17 UTC
When building in mock environment vdsm.spec does't have a BuildRequires: sudo and some of the tests then do not check for sudo availability correctly

Let's make sure we can build a proper rpm even without sudo...

Comment 1 Petr Beňas 2014-09-16 13:18:58 UTC
What are the steps to reproduce? Would be building from SRPM sufficient?

Comment 2 Dan Kenigsberg 2014-09-16 15:12:40 UTC
build vdsm with "sudo" missing. see that the checks either succeed or are skipped.

Comment 3 Petr Beňas 2014-09-17 12:23:43 UTC
Sorry, but you haven't answered my question. Is building form SRPM enough or do I have to build from git?

Comment 4 Dan Kenigsberg 2014-09-17 15:13:48 UTC
Well, it depends if your srpm has the %check section commented out (for a proper verification, it should be enabled).

./autogen --system && ./configure && make check

As a normal user, with sudo missing, would be best.

Comment 5 Jiri Belka 2014-09-19 08:23:46 UTC
something is broken in pyflakes target

...snip...
config.status: creating tests/run_tests.sh
config.status: creating tests/run_tests_local.sh
config.status: executing depfiles commands
config.status: executing default commands
Checking that .in files are ignored...
python -c 'import pyflakes; print("pyflakes-%s" % pyflakes.__version__)'
pyflakes-0.4.0
find . -path './.git' -prune -type f -o \
                -name '*.py' -o -name '*.py.in'  | xargs /usr/bin/pyflakes | \
                grep -w -v "\./vdsm/storage/lvm\.py.*: list comprehension redefines 'lv' from line .*" | \
                while read LINE; do echo "$LINE"; false; done
./lib/vdsm/ipwrapper.py:253: redefinition of function 'promisc' from line 249
make: *** [pyflakes] Error 1

Comment 6 Dan Kenigsberg 2014-09-19 09:45:30 UTC
Toni, could you fix pyflakes on el6?

Jiri, the glitch that you report exists only on the master branch. This is a 3.4.4 bug, which should be verified against 3.4.z code.

Comment 7 Antoni Segura Puimedon 2014-09-19 09:54:07 UTC
This is a bug in the old pyflakes. I'll be able to bypass it by uglying a bit the code.

Comment 8 Jiri Belka 2014-09-19 10:16:24 UTC
    ok, i got these... latest commit into testValidation.py - ec6c309683c5c6addf1df5ad6d53f67ebdcfc4c9

        test_mkIsoFs(label='fslabel')                               SKIP: Test requires SUDO executable ([Errno 2] No such file or directory)
        test_mkIsoFs(label=None)                                    SKIP: Test requires SUDO executable ([Errno 2] No such file or directory)
        test_removeFs                                               SKIP: Test requires SUDO executable ([Errno 2] No such file or directory)
        testLoopMount                                               SKIP: Test requires SUDO executable ([Errno 2] No such file or directory)

Comment 9 Sandro Bonazzola 2014-09-24 08:08:53 UTC
oVirt 3.4.4 has been released.