X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftest_ip4.py;h=8c6f8c04c0cbd05ec035e911ddd90d3f3dc07f19;hb=dbd366b239c0506b0d9984e7481967e038f10a23;hp=43804c7c40a8f4191d08ca1f7a2120baca7a257e;hpb=b163bbb7482a0a4b4685016eda4d2b2d3a9fcbb4;p=vpp.git diff --git a/test/test_ip4.py b/test/test_ip4.py index 43804c7c40a..8c6f8c04c0c 100644 --- a/test/test_ip4.py +++ b/test/test_ip4.py @@ -411,6 +411,24 @@ class TestIPv4IfAddrRoute(VppTestCase): fib4_dump = self.vapi.ip_route_dump(0) self.assertTrue(lo_if.is_ip4_entry_in_fib_dump(fib4_dump)) + def test_ipv4_ifaddr_del(self): + """ Delete an interface address that does not exist """ + + loopbacks = self.create_loopback_interfaces(1) + lo = self.lo_interfaces[0] + + lo.config_ip4() + lo.admin_up() + + # + # try and remove pg0's subnet from lo + # + with self.vapi.assert_negative_api_retval(): + self.vapi.sw_interface_add_del_address( + sw_if_index=lo.sw_if_index, + prefix=self.pg0.local_ip4_prefix, + is_add=0) + class TestICMPEcho(VppTestCase): """ ICMP Echo Test Case """