summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime
diff options
context:
space:
mode:
authorLucian Musat <george.l.musat@intel.com>2015-03-20 14:39:36 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-22 08:49:57 +0000
commitb0b8f47e993de167ab4c2f433d35bfba96e6477f (patch)
treeb56c2dbe0ea7895fd313880169915d49c1583d18 /meta/lib/oeqa/runtime
parenta8c98c399fbf6d04483488e8ead5062c99342365 (diff)
downloadpoky-b0b8f47e993de167ab4c2f433d35bfba96e6477f.tar.gz
oeqa/runtime: Added a new auto rpm test
The test tries to query the rpm list with a non-root user (From OE-Core rev: 9d5deedfdae28d0257e84e1980c2cb7fd4e38c45) Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime')
-rw-r--r--meta/lib/oeqa/runtime/rpm.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/rpm.py b/meta/lib/oeqa/runtime/rpm.py
index b17e8b46a8..0529992cbe 100644
--- a/meta/lib/oeqa/runtime/rpm.py
+++ b/meta/lib/oeqa/runtime/rpm.py
@@ -47,6 +47,16 @@ class RpmInstallRemoveTest(oeRuntimeTest):
47 (status,output) = self.target.run('rpm -e rpm-doc') 47 (status,output) = self.target.run('rpm -e rpm-doc')
48 self.assertEqual(status, 0, msg="Failed to remove rpm-doc package: %s" % output) 48 self.assertEqual(status, 0, msg="Failed to remove rpm-doc package: %s" % output)
49 49
50 @testcase(1096)
51 @skipUnlessPassed('test_ssh')
52 def test_rpm_query_nonroot(self):
53 (status, output) = self.target.run('useradd test1')
54 self.assertTrue(status == 0, msg="Failed to create new user")
55 (status, output) = self.target.run('sudo -u test1 id')
56 self.assertTrue('(test1)' in output, msg="Failed to execute as new user")
57 (status, output) = self.target.run('sudo -u test1 rpm -qa')
58 self.assertEqual(status, 0, msg="status: %s. Cannot run rpm -qa" % status)
59
50 @classmethod 60 @classmethod
51 def tearDownClass(self): 61 def tearDownClass(self):
52 oeRuntimeTest.tc.target.run('rm -f /tmp/rpm-doc.rpm') 62 oeRuntimeTest.tc.target.run('rm -f /tmp/rpm-doc.rpm')