diff mbox series

[5/6] tests: proxyarp: skip test if ebtables rule install fails

Message ID 20200501210211.647-6-thomas@adapt-ip.com
State Accepted
Headers show
Series fix varous tests | expand

Commit Message

Thomas Pedersen May 1, 2020, 9:02 p.m. UTC
Otherwise the test will continue on and fail later due to
unexpected foreign ARP request.

Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
---
 tests/hwsim/test_ap_hs20.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Jouni Malinen May 16, 2020, 4:17 p.m. UTC | #1
On Fri, May 01, 2020 at 02:02:10PM -0700, Thomas Pedersen wrote:
> Otherwise the test will continue on and fail later due to
> unexpected foreign ARP request.

Thanks, applied.
diff mbox series

Patch

diff --git a/tests/hwsim/test_ap_hs20.py b/tests/hwsim/test_ap_hs20.py
index c484b500352e..536418946d29 100644
--- a/tests/hwsim/test_ap_hs20.py
+++ b/tests/hwsim/test_ap_hs20.py
@@ -4672,9 +4672,11 @@  def _test_proxyarp_open(dev, apdev, params, ebtables=False):
     if ebtables:
         for chain in ['FORWARD', 'OUTPUT']:
             try:
-                subprocess.call(['ebtables', '-A', chain, '-p', 'ARP',
-                                 '-d', 'Broadcast', '-o', apdev[0]['ifname'],
-                                 '-j', 'DROP'])
+                err = subprocess.call(['ebtables', '-A', chain, '-p', 'ARP',
+                                      '-d', 'Broadcast', '-o', apdev[0]['ifname'],
+                                      '-j', 'DROP'])
+                if err != 0:
+                    raise
             except:
                 raise HwsimSkip("No ebtables available")