Correct xtquota value checking mechanism of binder test
xtquota value might be decreased while matching packets
use EXPECT_GE instead of EXPECT_EQ
Test: built, flashed, booted
system/netd/tests/runtests.sh passes
Change-Id: Iaf3fad99924df3fa0941b5a387c4283eb420025c
diff --git a/tests/binder_test.cpp b/tests/binder_test.cpp
index 5784d8e..a8e74d4 100644
--- a/tests/binder_test.cpp
+++ b/tests/binder_test.cpp
@@ -1371,7 +1371,8 @@
std::string result = "";
EXPECT_TRUE(ReadFileToString(path, &result));
- EXPECT_EQ(std::to_string(quotaBytes), Trim(result));
+ // Quota value might be decreased while matching packets
+ EXPECT_GE(quotaBytes, std::stol(Trim(result)));
}
void expectBandwidthInterfaceQuotaRuleExists(const char* ifname, long quotaBytes) {