public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] oeqa/runtime/rpm: use su instead of sudo
@ 2016-08-23 16:09 Ross Burton
  0 siblings, 0 replies; only message in thread
From: Ross Burton @ 2016-08-23 16:09 UTC (permalink / raw)
  To: openembedded-core

This test works fine with su, which is more likely to be installed in images
than sudo.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/lib/oeqa/runtime/rpm.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/runtime/rpm.py b/meta/lib/oeqa/runtime/rpm.py
index 624c515..4d03ecb 100644
--- a/meta/lib/oeqa/runtime/rpm.py
+++ b/meta/lib/oeqa/runtime/rpm.py
@@ -53,9 +53,9 @@ class RpmInstallRemoveTest(oeRuntimeTest):
     def test_rpm_query_nonroot(self):
         (status, output) = self.target.run('useradd test1')
         self.assertTrue(status == 0, msg="Failed to create new user: " + output)
-        (status, output) = self.target.run('sudo -u test1 id')
+        (status, output) = self.target.run('su -c id test1')
         self.assertTrue('(test1)' in output, msg="Failed to execute as new user")
-        (status, output) = self.target.run('sudo -u test1 rpm -qa')
+        (status, output) = self.target.run('su -c "rpm -qa" test1 ')
         self.assertEqual(status, 0, msg="status: %s. Cannot run rpm -qa: %s" % (status, output))
 
     @testcase(195)
@@ -98,4 +98,3 @@ class RpmInstallRemoveTest(oeRuntimeTest):
     @classmethod
     def tearDownClass(self):
         oeRuntimeTest.tc.target.run('rm -f /tmp/rpm-doc.rpm')
-
-- 
2.8.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-23 16:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-23 16:09 [PATCH] oeqa/runtime/rpm: use su instead of sudo Ross Burton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox