mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-08 00:20:38 -09:00
support/testing: test_audit.py: use assertRunNotOk()
Use the helper to simplify the test.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit eb0ef1fd98)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
committed by
Thomas Perale
parent
8efc2ef588
commit
0a891269b9
@@ -80,8 +80,7 @@ class TestAudit(infra.basetest.BRTest):
|
||||
# normal user. This command is expected to fail (as only root
|
||||
# can root is supposed to read this file).
|
||||
cmd = f"su - {user} -c 'cat /etc/shadow'"
|
||||
_, ret = self.emulator.run(cmd)
|
||||
self.assertNotEqual(ret, 0)
|
||||
self.assertRunNotOk(cmd)
|
||||
|
||||
# Our last failed read attempt is supposed to have generated
|
||||
# an event. We check we can see it in the log.
|
||||
|
||||
Reference in New Issue
Block a user