Patchwork [V5,2/2] oeqa: fix return status in pam.py to match shadow-4.2.1

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date July 17, 2014, 7:53 a.m.
Message ID <e1f5ab264579c935e5f33072fda1092c90f7c6ce.1405583236.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/75889/
State Accepted
Commit 14a7cde49fa01de8f25f77f365ed7dea71c7c216
Headers show

Comments

Qi.Chen@windriver.com - July 17, 2014, 7:53 a.m.
The return statuses of commands like `su --help' or `passwd --help'
in shadow 4.2.1 version are different from those in shadow 4.1.4.3
version.

Now that we've upgraded shadow to 4.2.1, we need to fix these statuses
in the pam.py to make things work as expected.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/lib/oeqa/runtime/pam.py |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/meta/lib/oeqa/runtime/pam.py b/meta/lib/oeqa/runtime/pam.py
index 52e1eb8..cc5c1bd 100644
--- a/meta/lib/oeqa/runtime/pam.py
+++ b/meta/lib/oeqa/runtime/pam.py
@@ -17,8 +17,8 @@  class PamBasicTest(oeRuntimeTest):
         (status, output) = self.target.run('login --help')
         self.assertEqual(status, 1, msg = "login command does not work as expected. Status and output:%s and %s" %(status, output))
         (status, output) = self.target.run('passwd --help')
-        self.assertEqual(status, 6, msg = "passwd command does not work as expected. Status and output:%s and %s" %(status, output))
+        self.assertEqual(status, 0, msg = "passwd command does not work as expected. Status and output:%s and %s" %(status, output))
         (status, output) = self.target.run('su --help')
-        self.assertEqual(status, 2, msg = "su command does not work as expected. Status and output:%s and %s" %(status, output))
+        self.assertEqual(status, 0, msg = "su command does not work as expected. Status and output:%s and %s" %(status, output))
         (status, output) = self.target.run('useradd --help')
-        self.assertEqual(status, 2, msg = "useradd command does not work as expected. Status and output:%s and %s" %(status, output))
+        self.assertEqual(status, 0, msg = "useradd command does not work as expected. Status and output:%s and %s" %(status, output))