Fix nova.tests.test_nova_rootwrap on Fedora 17.
Fix bug 992916 This patch resolves a unit test failure on Fedora 17. The root cause is that 'sleep' is '/usr/bin/sleep' instead of '/bin/sleep'. Update the test to allow that. Change-Id: I5c8e04baec7159a8c10c9beb96cff58fd383e71c
This commit is contained in:
@@ -69,7 +69,7 @@ class RootwrapTestCase(test.TestCase):
|
|||||||
p = subprocess.Popen(["/bin/sleep", "5"])
|
p = subprocess.Popen(["/bin/sleep", "5"])
|
||||||
f = filters.KillFilter("/bin/kill", "root",
|
f = filters.KillFilter("/bin/kill", "root",
|
||||||
["-ALRM"],
|
["-ALRM"],
|
||||||
["/bin/sleep"])
|
["/bin/sleep", "/usr/bin/sleep"])
|
||||||
usercmd = ['kill', '-9', p.pid]
|
usercmd = ['kill', '-9', p.pid]
|
||||||
# Incorrect signal should fail
|
# Incorrect signal should fail
|
||||||
self.assertFalse(f.match(usercmd))
|
self.assertFalse(f.match(usercmd))
|
||||||
@@ -79,7 +79,7 @@ class RootwrapTestCase(test.TestCase):
|
|||||||
|
|
||||||
f = filters.KillFilter("/bin/kill", "root",
|
f = filters.KillFilter("/bin/kill", "root",
|
||||||
["-9", ""],
|
["-9", ""],
|
||||||
["/bin/sleep"])
|
["/bin/sleep", "/usr/bin/sleep"])
|
||||||
usercmd = ['kill', '-9', os.getpid()]
|
usercmd = ['kill', '-9', os.getpid()]
|
||||||
# Our own PID does not match /bin/sleep, so it should fail
|
# Our own PID does not match /bin/sleep, so it should fail
|
||||||
self.assertFalse(f.match(usercmd))
|
self.assertFalse(f.match(usercmd))
|
||||||
|
Reference in New Issue
Block a user