OSDN Git Service

Make the VTS tests for the INetd HAL 1.0 more realistic.
authorLorenzo Colitti <lorenzo@google.com>
Tue, 13 Mar 2018 04:08:01 +0000 (04:08 +0000)
committerLorenzo Colitti <lorenzo@google.com>
Fri, 30 Mar 2018 14:37:46 +0000 (23:37 +0900)
commit65ae996fcaa61c9d1daabc2a9ee322a931cd709c
tree0f40b1dad48940fba60595477247ea353e1dc29e
parent61323db76114d7115ad44281eba81801a562828c
Make the VTS tests for the INetd HAL 1.0 more realistic.

The VTS test for the netd HAL creates an OEM network, but it
doesn't check whether the network exists. Fix that by using
the native multinetwork API calls to select the network.
Also, check that when an OEM network is created, there are no IP
rules that select for its fwmark. There should be none because
a network that has just been created has no interfaces.

Put utility code into a new VtsHalNetNetdTestUtils static library
to avoid code duplication when we add new tests for future HALversions.

Bug: 73032258
Test: VtsHalNetNetdV1_0TargetTest passes on marlin
Change-Id: I345b9b27d7c2c8bdd6ce6d60430490dac8c3a989
Merged-In: Ie574990f7640fdc7d83ccd58baf6dfe1069a3654
(cherry picked from commit 79f693702c35dca81f7390d1619736a204e61a70)
net/netd/1.0/vts/functional/Android.bp
net/netd/1.0/vts/functional/VtsHalNetNetdV1_0TargetTest.cpp
net/netd/testutils/Android.bp [new file with mode: 0644]
net/netd/testutils/VtsHalNetNetdTestUtils.cpp [new file with mode: 0644]
net/netd/testutils/VtsHalNetNetdTestUtils.h [new file with mode: 0644]