mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 14:01:57 -09:00
support/testing: test_kmod.py: use assertRunNotOk()
Use the helper to simplify the test.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit c566e5c645)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
committed by
Thomas Perale
parent
3b795d74b9
commit
35c3d26371
@@ -73,8 +73,7 @@ class TestKmod(infra.basetest.BRTest):
|
|||||||
# With this test configuration, we are not supposed to have an
|
# With this test configuration, we are not supposed to have an
|
||||||
# eth0 Ethernet interface yet. Attempting to show info on this
|
# eth0 Ethernet interface yet. Attempting to show info on this
|
||||||
# interface is expected to fail .
|
# interface is expected to fail .
|
||||||
_, ret = self.emulator.run("ip link show dev eth0")
|
self.assertRunNotOk("ip link show dev eth0")
|
||||||
self.assertNotEqual(ret, 0)
|
|
||||||
|
|
||||||
# We try to load the module.
|
# We try to load the module.
|
||||||
self.assertRunOk("modprobe virtio-net")
|
self.assertRunOk("modprobe virtio-net")
|
||||||
@@ -101,5 +100,4 @@ class TestKmod(infra.basetest.BRTest):
|
|||||||
|
|
||||||
# Now the driver is unloaded, we should no longer be able to
|
# Now the driver is unloaded, we should no longer be able to
|
||||||
# ping the emulator.
|
# ping the emulator.
|
||||||
_, ret = self.emulator.run(ping_cmd)
|
self.assertRunNotOk(ping_cmd)
|
||||||
self.assertNotEqual(ret, 0)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user