OSDN Git Service

Make the VTS tests for the INetd HAL 1.0 more realistic.
authorLorenzo Colitti <lorenzo@google.com>
Wed, 7 Feb 2018 05:49:04 +0000 (14:49 +0900)
committerLorenzo Colitti <lorenzo@google.com>
Mon, 12 Mar 2018 12:53:39 +0000 (21:53 +0900)
commit79f693702c35dca81f7390d1619736a204e61a70
tree7d6c4f7cc17ec2a97dfcd2425261a2c83e673100
parentf5ef707452e0f6106f33df56ec44ff0fbe410791
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
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]