test-iptables: Delete all rules in target0
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Thu, 21 Feb 2013 16:42:26 +0000 (17:42 +0100)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 22 Feb 2013 10:42:39 +0000 (12:42 +0200)
unit/test-iptables.c

index 77fa50a..15fef8d 100644 (file)
@@ -205,6 +205,20 @@ static void test_iptables_target0(void)
 
        err = __connman_iptables_commit("filter");
        g_assert(err == 0);
+
+       err = __connman_iptables_delete("filter", "INPUT",
+                                       "-m mark --mark 1");
+       g_assert(err == 0);
+
+       err = __connman_iptables_commit("filter");
+       g_assert(err == 0);
+
+       err = __connman_iptables_delete("filter", "INPUT",
+                                       "-m mark --mark 2");
+       g_assert(err == 0);
+
+       err = __connman_iptables_commit("filter");
+       g_assert(err == 0);
 }
 
 struct connman_notifier *nat_notifier;