Fix flaky test BinderTest#NetworkRejectNonSecureVpn

Previously, we cache the all ip rule when test start, and compare
cached rules and system rules to ensure that rules is not changed.
However, it is possible that netd is called to modify rules during the test.
(e.g. networkDestroy() as below). Then the test will fail.
Remove the comparison of rules in the test to solve this problem.

Error log:
05-27 20:19:02.470 networkCreatePhysical(100, 0) <0.10ms>
05-27 20:19:02.495 networkAddInterface(100, "rmnet_data2") <1.91ms>
05-27 20:19:11.389 networkRejectNonSecureVpn("true") <0.35ms>
05-27 20:19:11.457 networkDestroy(100) <3.15ms>  <-- change ip rule during this test
05-27 20:19:11.466 networkRejectNonSecureVpn("false") <0.34ms>
05-27 20:19:11.539 networkRejectNonSecureVpn("false") -> ServiceSpecificException(2, "No such file or directory") <0.71ms>

Bug: 133818065
Test: cd system/netd && atest
Change-Id: Ic226f305a30e1cfa3b3b3f07a25987688b869578
diff --git a/tests/binder_test.cpp b/tests/binder_test.cpp
index 1d11885..cb4b8be 100644
--- a/tests/binder_test.cpp
+++ b/tests/binder_test.cpp
@@ -634,22 +634,18 @@
 
     std::vector<UidRangeParcel> uidRanges = {makeUidRangeParcel(BASE_UID + 150, BASE_UID + 224),
                                              makeUidRangeParcel(BASE_UID + 226, BASE_UID + 300)};
-
-    const std::vector<std::string> initialRulesV4 = listIpRules(IP_RULE_V4);
-    const std::vector<std::string> initialRulesV6 = listIpRules(IP_RULE_V6);
-
+    // Make sure no rules existed before calling commands.
+    for (auto const& range : uidRanges) {
+        EXPECT_FALSE(ipRuleExistsForRange(RULE_PRIORITY, range, "prohibit"));
+    }
     // Create two valid rules.
     ASSERT_TRUE(mNetd->networkRejectNonSecureVpn(true, uidRanges).isOk());
-    EXPECT_EQ(initialRulesV4.size() + 2, listIpRules(IP_RULE_V4).size());
-    EXPECT_EQ(initialRulesV6.size() + 2, listIpRules(IP_RULE_V6).size());
     for (auto const& range : uidRanges) {
         EXPECT_TRUE(ipRuleExistsForRange(RULE_PRIORITY, range, "prohibit"));
     }
 
     // Remove the rules.
     ASSERT_TRUE(mNetd->networkRejectNonSecureVpn(false, uidRanges).isOk());
-    EXPECT_EQ(initialRulesV4.size(), listIpRules(IP_RULE_V4).size());
-    EXPECT_EQ(initialRulesV6.size(), listIpRules(IP_RULE_V6).size());
     for (auto const& range : uidRanges) {
         EXPECT_FALSE(ipRuleExistsForRange(RULE_PRIORITY, range, "prohibit"));
     }
@@ -658,10 +654,6 @@
     binder::Status status = mNetd->networkRejectNonSecureVpn(false, uidRanges);
     ASSERT_EQ(binder::Status::EX_SERVICE_SPECIFIC, status.exceptionCode());
     EXPECT_EQ(ENOENT, status.serviceSpecificErrorCode());
-
-    // All rules should be the same as before.
-    EXPECT_EQ(initialRulesV4, listIpRules(IP_RULE_V4));
-    EXPECT_EQ(initialRulesV6, listIpRules(IP_RULE_V6));
 }
 
 // Create a socket pair that isLoopbackSocket won't think is local.