Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 0f91cdca authored by Luke Huang's avatar Luke Huang
Browse files

Fix flaky test BinderTest.TetherGetStats

It is caused by the same interface name.
We used arc4random_uniform(10000) to generate interface
name before. Change it to make sure we won't use the same name.

Error log:
05-22 10:08:56 V/GTestResultParser: [ RUN      ] BinderTest.TetherGetStats
05-22 10:08:56 V/GTestResultParser: iptables: Chain already exists.
05-22 10:08:56 V/GTestResultParser: ip6tables: Chain already exists.
05-22 10:08:56 V/GTestResultParser: system/netd/tests/binder_test.cpp:1064: Failure
05-22 10:08:56 V/GTestResultParser: Expected equality of these values:
05-22 10:08:56 V/GTestResultParser: expected1
05-22 10:08:56 V/GTestResultParser: Which is: { 975, 242, 579, 121 }
05-22 10:08:56 V/GTestResultParser: getStatsVectorByIf(statsVec, extIface1)
05-22 10:08:56 V/GTestResultParser: Which is: { 8975, 761, 5579, 509 }
05-22 10:08:56 V/GTestResultParser: system/netd/tests/binder_test.cpp:1066: Failure
05-22 10:08:56 V/GTestResultParser: Expected equality of these values:
05-22 10:08:56 V/GTestResultParser: expected2
05-22 10:08:56 V/GTestResultParser: Which is: { 8000, 519, 5000, 388 }
05-22 10:08:56 V/GTestResultParser: getStatsVectorByIf(statsVec, extIface2)
05-22 10:08:56 V/GTestResultParser: Which is: { 8975, 761, 5579, 509 }

Bug: 133818065
Test: cd system/netd && atest
Change-Id: I228f769d070e39eb6bb0b5e46a084b3db29a3b84
parent 8fc39b43
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment