From 994bba6ae7156a565bd160fc8f0f8e8578c28d1b Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Tue, 1 May 2012 18:29:04 -0400 Subject: [PATCH] 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 --- nova/tests/test_nova_rootwrap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nova/tests/test_nova_rootwrap.py b/nova/tests/test_nova_rootwrap.py index ca2626b24da..4cd68184bbc 100644 --- a/nova/tests/test_nova_rootwrap.py +++ b/nova/tests/test_nova_rootwrap.py @@ -69,7 +69,7 @@ def test_KillFilter(self): p = subprocess.Popen(["/bin/sleep", "5"]) f = filters.KillFilter("/bin/kill", "root", ["-ALRM"], - ["/bin/sleep"]) + ["/bin/sleep", "/usr/bin/sleep"]) usercmd = ['kill', '-9', p.pid] # Incorrect signal should fail self.assertFalse(f.match(usercmd)) @@ -79,7 +79,7 @@ def test_KillFilter(self): f = filters.KillFilter("/bin/kill", "root", ["-9", ""], - ["/bin/sleep"]) + ["/bin/sleep", "/usr/bin/sleep"]) usercmd = ['kill', '-9', os.getpid()] # Our own PID does not match /bin/sleep, so it should fail self.assertFalse(f.match(usercmd))