Dan Kenigsberg has uploaded a new change for review.

Change subject: fuser.fuser() requires `sudo fuser`
......................................................................

fuser.fuser() requires `sudo fuser`

Fail politely if the testing user does not have it.

Change-Id: I8a58344cc679ffe30ad0fd345340c212f20fd9e6
Signed-off-by: Dan Kenigsberg <[email protected]>
---
M tests/fuserTests.py
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/78/13778/1

diff --git a/tests/fuserTests.py b/tests/fuserTests.py
index 7473dde..c5c34a4 100644
--- a/tests/fuserTests.py
+++ b/tests/fuserTests.py
@@ -22,10 +22,13 @@
 from storage import fuser
 
 from testrunner import VdsmTestCase
+from testValidation import checkSudo
 
 
 class TestFuser(VdsmTestCase):
 
     def testSelfExe(self):
         pid = os.getpid()
-        self.assertTrue(pid in fuser.fuser('/proc/%s/exe' % pid))
+        exeFile = '/proc/%s/exe' % pid
+        checkSudo(['fuser', exeFile])
+        self.assertTrue(pid in fuser.fuser(exeFile))


--
To view, visit http://gerrit.ovirt.org/13778
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a58344cc679ffe30ad0fd345340c212f20fd9e6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to