1*eb8dc403SDave Cobbley# This test should cover https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=287 testcase 2*eb8dc403SDave Cobbley# Note that the image under test must have "pam" in DISTRO_FEATURES 3*eb8dc403SDave Cobbley 4*eb8dc403SDave Cobbleyfrom oeqa.runtime.case import OERuntimeTestCase 5*eb8dc403SDave Cobbleyfrom oeqa.core.decorator.depends import OETestDepends 6*eb8dc403SDave Cobbleyfrom oeqa.core.decorator.oeid import OETestID 7*eb8dc403SDave Cobbleyfrom oeqa.core.decorator.data import skipIfNotFeature 8*eb8dc403SDave Cobbley 9*eb8dc403SDave Cobbleyclass PamBasicTest(OERuntimeTestCase): 10*eb8dc403SDave Cobbley 11*eb8dc403SDave Cobbley @OETestID(1543) 12*eb8dc403SDave Cobbley @skipIfNotFeature('pam', 'Test requires pam to be in DISTRO_FEATURES') 13*eb8dc403SDave Cobbley @OETestDepends(['ssh.SSHTest.test_ssh']) 14*eb8dc403SDave Cobbley def test_pam(self): 15*eb8dc403SDave Cobbley status, output = self.target.run('login --help') 16*eb8dc403SDave Cobbley msg = ('login command does not work as expected. ' 17*eb8dc403SDave Cobbley 'Status and output:%s and %s' % (status, output)) 18*eb8dc403SDave Cobbley self.assertEqual(status, 1, msg = msg) 19*eb8dc403SDave Cobbley 20*eb8dc403SDave Cobbley status, output = self.target.run('passwd --help') 21*eb8dc403SDave Cobbley msg = ('passwd command does not work as expected. ' 22*eb8dc403SDave Cobbley 'Status and output:%s and %s' % (status, output)) 23*eb8dc403SDave Cobbley self.assertEqual(status, 0, msg = msg) 24*eb8dc403SDave Cobbley 25*eb8dc403SDave Cobbley status, output = self.target.run('su --help') 26*eb8dc403SDave Cobbley msg = ('su command does not work as expected. ' 27*eb8dc403SDave Cobbley 'Status and output:%s and %s' % (status, output)) 28*eb8dc403SDave Cobbley self.assertEqual(status, 0, msg = msg) 29*eb8dc403SDave Cobbley 30*eb8dc403SDave Cobbley status, output = self.target.run('useradd --help') 31*eb8dc403SDave Cobbley msg = ('useradd command does not work as expected. ' 32*eb8dc403SDave Cobbley 'Status and output:%s and %s' % (status, output)) 33*eb8dc403SDave Cobbley self.assertEqual(status, 0, msg = msg) 34