Commit graph

65,907 commits

Message SHA1
Use conventional args style for gen_jarjar
gen_jarjar supported multi-valued arguments via space-separated lists,
like "--apistubs foo bar". This is unusual, as "bar" would generally be
interpreted as a positional argument instead.

Change the usage to "--apistubs foo --apistubs bar", which is more
conventional. Also remove the "--jars" switch to have the jars be
positional arguments instead, and change the "--unsupportedapi"
arguments to be a column-separated list (like java classpath), instead
of space-separated. For --unsupportedapi, this allows providing a list
of files via minimal modifications in the genrule usage.

Test: m
Change-Id: Id67ad16de2ea6682fee402540f464ed3b5b0cca9

Remi NGUYEN VAN   commited 2022-08-25 06:42:54 +00:00
0bd90f10b9
Merge "Revert "Test if VPN app can grant ACTIVATE_PLATFORM_VPN with CON...""
Lucas Lin   authored and   Gerrit Code Review   commited 2022-08-25 05:41:01 +00:00
e87c1e0187
Merge "ethernet: skip tests on devices without support"
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-08-24 19:33:17 +00:00
62f8f6d0fb
Merge "ethernet: assert updateConfiguration result"
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-08-24 19:31:57 +00:00
734e357556
Merge changes Id6ae7929,I70474ef5,I4958df65,Ifc0e1ba2
* changes:
  ethernet: remove callback from factory updateInterfaceLinkState
  ethernet: updateConfiguration result should not rely on ip provisioning
  ethernet: remove callback boilerplate from EthernetNetworkFactory
  ethernet: add EthernetCallback class to wrap OutcomeReceiver

Patrick Rohr   authored and   Gerrit Code Review   commited 2022-08-24 17:45:04 +00:00
f37e7c645b
Merge "Add tests for callback visibility"
Jean Chalard   authored and   Gerrit Code Review   commited 2022-08-24 09:51:36 +00:00
38a01e080d
Merge "EthernetTetheringTest: testTetherUdpV4Dns"
Nucca Chen   authored and   Gerrit Code Review   commited 2022-08-24 08:30:56 +00:00
b19c482980
Merge "Add null check for clientInfo"
Paul Hu   authored and   Gerrit Code Review   commited 2022-08-24 03:54:49 +00:00
f37dfa3a11
Merge changes from topic "cookie_tag_map_raw_dump"
* changes:
  Add option to dump cookieTagMap in base64 format
  Use BpfDump#fromBase64EncodedString

Motomu Utsumi   authored and   Gerrit Code Review   commited 2022-08-24 03:16:53 +00:00
9988869442
EthernetTetheringTest: testTetherUdpV4Dns
Add a tethering IPv4 DNS test.

DNS query:
tethered device --> downstream --> dnsmasq forwarding --> upstream --> DNS server

DNS reply:
DNS server --> upstream --> dnsmasq forwarding --> downstream --> tethered device

Bug: 237369591
Test: atest EthernetTetheringTest
Change-Id: I2baa9d7ccf55d117f644c80e867fb8272f7daac5

Hungming Chen   commited 2022-08-24 11:15:36 +08:00
a339588d62
Merge "Decouple VpnManagerService from ConnectivityServiceTest"
Chiachang Wang   authored and   Gerrit Code Review   commited 2022-08-24 03:05:24 +00:00
cbe38b46a2
Merge "Merge android13-tests-dev"
Xin Li   authored and   Gerrit Code Review   commited 2022-08-23 23:07:25 +00:00
fd479a9d45
ethernet: remove callback from factory updateInterfaceLinkState
updateInterfaceLinkState already returns true / false depending on the
success, so the EthernetCallback can be removed and sent from
EthernetTracker instead.

Test: atest EthernetManagerTest
Bug: 225317892
Change-Id: Id6ae7929097840ac5c9a4d244fdf669a06b94ed5

Patrick Rohr   commited 2022-08-23 13:07:57 -07:00
750036b286
Merge "Use PerUidCounter in the connectivity static library"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-08-23 18:25:03 +00:00
6a8166cf5e
ethernet: updateConfiguration result should not rely on ip provisioning
In addition, the result should always be success if the new
configuration is stored. This allows updating interfaces that are not
currently registered with ethernet service.

Bug: 236312641
Test: atest EthernetManagerTest
Change-Id: I70474ef5f046c65a6f74161137e25debd8dfe612

Patrick Rohr   commited 2022-08-23 11:01:47 -07:00
ea5c6dd136
Merge "Fix ConnectivityManagerTest#testFactoryReset flaky"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-08-23 10:34:34 +00:00
9b20b7d82f
Merge "Update nullness suppression bug number"
Paul Hu   authored and   Gerrit Code Review   commited 2022-08-23 09:53:53 +00:00
d71e43f4d8
Update nullness suppression bug number
The internal issue of nullness suppression for mdns files has
been addressed. Update the bug number to track AOSP only work.

Bug: 242631897
Test: m
Change-Id: I41c072a4313a9668fe509f796ba2956d74397e5c

Paul Hu   commited 2022-08-23 09:52:47 +00:00
309d68d997
Merge changes I89d6fe9a,I10b19a01
* changes:
  DscpPolicyTest - add ip version asserts
  dscpPolicy.c - old/new_first_u32 is actually be32

Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-08-23 06:43:05 +00:00
4d0432a400
Merge "Support java BpfMap in BpfNetMaps#swapActiveStatsMap"
Motomu Utsumi   authored and   Gerrit Code Review   commited 2022-08-23 04:01:30 +00:00
405d676a08
Merge "Address comments on aosp/1781202"
Jean Chalard   authored and   Gerrit Code Review   commited 2022-08-23 03:13:12 +00:00
595a98b352
Merge "Fix array-related errorprone warnings"
Cole Faust   authored and   Gerrit Code Review   commited 2022-08-22 22:43:00 +00:00
e8fa68b9a0
ethernet: remove callback boilerplate from EthernetNetworkFactory
Now that everything uses EthernetCallback, there is no need for the
boilerplate code in EthernetNetworkFactory anymore.

The next step will be to pull the callbacks out of
EthernetNetworkFactory entirely.

Bug: 225317892
Test: atest EthernetNetworkFactory
Change-Id: I4958df658f7d5852660a5c03a8c9220532e42d3c

Patrick Rohr   commited 2022-08-22 12:11:04 -07:00
de40e137a1
ethernet: add EthernetCallback class to wrap OutcomeReceiver
The OutcomeReceiver that gets passed into the EthernetServiceImpl is
hard to use (it is nullable and both onError and onResult can throw
RemoteExceptions).

Note: This is an intermediary state.
The next step will be to completely tear EthernetCallback out of
EthernetNetworkFactory, which will remove a lot of boilerplate code.

Bug: 225317892
Test: atest EthernetManagerTest
Change-Id: Ifc0e1ba29ded933c418e4b335cb731c3496d7e44

Patrick Rohr   commited 2022-08-22 12:10:27 -07:00
251f2fcf13
DscpPolicyTest - add ip version asserts
Bug: 243314791
Test: TreeHugger, atest DscpPolicyTest
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I89d6fe9ae54182ddf924178cf8e66d2c3a0529ef

Maciej Żenczykowski   commited 2022-08-22 09:51:02 -07:00
231299065c
Merge "updateSupportedDownstreams when tethering allowed is changed"
Mark Chien   authored and   Gerrit Code Review   commited 2022-08-22 15:15:11 +00:00
0d3c8b692d
Fix ConnectivityManagerTest#testFactoryReset flaky
This change fixed two things:
1. start wifi tethering after airplane mode enabled.
2. run ConnectivityManager#factoryReset with TETHER_PRIVILEGED
   permission, so it can sucessfully stop tethering.

Orignally testFactoryReset don't actually test stop tethering.
Tethering already be stopped while airplane mode enabled, but
enable airplane mode then doing factory reset would have race in
wifi stack which caused airplane mode don't take effect in wifi
side.

Bug: 240677322
Test: atest ConnectivityManagerTest#testFactoryReset --iterations 50

Change-Id: I3185401b10b798af744df5c3c7c21fee3d418939

Mark   authored and   Mark Chien   commited 2022-08-22 15:13:31 +00:00
b7ed4a2784
dscpPolicy.c - old/new_first_u32 is actually be32
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I10b19a010000f1f49c2a48448f413376045bfe1f

Maciej Żenczykowski   commited 2022-08-22 09:12:26 +00:00
242af39425
Merge changes from topic "netstack_jarjar_autogen"
* changes:
  Rename RegularMaintenanceTestService
  Do not jarjar classes in the target package

Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2022-08-22 02:09:26 +00:00
56dca4119a
Fix array-related errorprone warnings
The ArrayEquals, ArrayHashCode, ArrayToString, and
ArraysAsListPrimitiveArray errorprone findings were
demoted from errors to warnings. Fix existing
occurrences of them so they can be made errors again.

Bug: 242630963
Test: RUN_ERROR_PRONE=true m javac-check
Change-Id: I95b4d0f8d3dfa957285ca94e0846fd3da4734e57

Cole Faust   authored and   Lorenzo Colitti   commited 2022-08-22 00:30:47 +00:00
fe60c0fe31
Merge "Support java BpfMap in BpfNetMaps#setNetPermForUids"
Motomu Utsumi   authored and   Gerrit Code Review   commited 2022-08-21 04:01:19 +00:00
618b9b0fa0
Merge changes I33eb4618,Ifbb7139e
* changes:
  use getIfName in more spots to improve logging
  replace U32 ifindex with S32

Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-08-19 21:20:45 +00:00
1e318f5442
Merge "TestNetworkService: do not set IFF_MULTICAST when bringUp is false"
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-08-19 21:12:24 +00:00
d8ade99dd6
Merge changes I8b3eb0e1,I1d2bfd52
* changes:
  DscpPolicy: remove post-T API dependency from test
  DscpPolicy: remove v6 default route as it is added by the RA

Patrick Rohr   authored and   Gerrit Code Review   commited 2022-08-19 16:40:44 +00:00
fd21dcbf6d
Merge "Check if VpnConfig#allowBypass is set or not"
Lucas Lin   authored and   Gerrit Code Review   commited 2022-08-19 09:13:35 +00:00
d17c5ea7f0
DscpPolicy: remove post-T API dependency from test
The DscpPolicyTest needs to be merged into CTS13 R2, so it cannot use
any APIs that were introduced after the T cutoff.
This slows the tests down *slightly*. These test are extremely slow to
begin with (20+ seconds), so the slowdown is negligible.

Test: atest DscpPolicyTest
Change-Id: I8b3eb0e1b72f5e77540adefcf53a6a6885126d4e

Patrick Rohr   commited 2022-08-18 13:33:23 -07:00
88ad68d7e1
DscpPolicy: remove v6 default route as it is added by the RA
Adding this route before receiving the RA causes the kernel to complain
and fail adding the the global v6 address:
"ICMPv6  : RA: ndisc_router_discovery failed to add default route."

Test: atest DscpPolicyTest
Change-Id: I1d2bfd52e05c334f9808e60455c346b4dca18cf7

Patrick Rohr   commited 2022-08-18 13:24:52 -07:00
1bba92f1bc
updateSupportedDownstreams when tethering allowed is changed
There are three configuration could affect tethering allowed:
1. user restriction
2. tether_supported settings
3. ro.tether.denied system properties

When user restricted or tether supported setting change, updating
supported downstreams.
ro.tether.denied is read only properties, so it won't be changed runtime.

Also correct the unit test that there is no TetheringConfiguration change when settings or user restriction change.

Bug: 184996041
Bug: 239500515
Test: atest TetheringTests

Change-Id: I8dfcc42de9787a5e9ba19b69db9444c14ace56f0

Mark   commited 2022-08-18 05:42:05 +00:00
c2cc1b42b8
TestNetworkService: do not set IFF_MULTICAST when bringUp is false
Setting IFF_MULTICAST in TestNetworkService when the interface is being
brought up elsewhere creates a race condition that might clear the
IFF_UP flag (if TestNetworkService loses the race).

Test: atest EthernetManagerTest --iterations 10
Bug: 242343156
Change-Id: I86e1c8afdb82beed5202f027d906bcce8f963c82

Patrick Rohr   commited 2022-08-17 21:22:59 -07:00
6bab212164
Check if VpnConfig#allowBypass is set or not
Bug: 242931436
Test: atest FrameworksNetTests:VpnTest
Change-Id: I00e28717b35ed8b024b1d44e0689392d924c18bf

lucaslin   commited 2022-08-18 12:06:22 +08:00
03dcd7123f
Add option to dump cookieTagMap in base64 format
This is a preparation for testing SkDestroyListener that removes
cookieTagMap entry when socket is destroyed.

Bug: 217624062
Test: atest NetworkStatsServiceTest
Change-Id: Ia1091130101360e37557e6f00efe0f736134de05

Motomu Utsumi   commited 2022-08-18 13:00:33 +09:00
e6120b409f
Use BpfDump#fromBase64EncodedString
aosp/2179274 adds fromBase64EncodedString to BpfDump.
This CL updates EthernetTetheringTest to use this function instead of
parseMapKeyValue in EthernetTetheringTest.

Bug: 217624062
Test: atest EthernetTetheringTest
Change-Id: I56b3cd875e16bee6174f0aacd468562ae482cef9

Motomu Utsumi   commited 2022-08-18 12:46:54 +09:00
e70bdb8f36
use getIfName in more spots to improve logging
Also just use 'int' for ifindex.  The kernel allocates these in order,
if we ever exceed 2 billion, we'll have other problems to worry about.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I33eb46185fde90cd4d158bb74f8f9c17b41434fb

Maciej Żenczykowski   commited 2022-08-18 01:07:20 +00:00
9ab28d0832
replace U32 ifindex with S32
These are allocated in order by the kernel, if we go
over 2 billion, we've got other problems... besides
U32 to S32 conversion will work just fine anyway.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ifbb7139e9118dd2d0c52e83c5874132e03760b30

Maciej Żenczykowski   commited 2022-08-18 01:07:11 +00:00
09813ced3e
Merge changes I95352711,I27bdb5d8,I7e1acc65,I7c95ff19
* changes:
  BpfCoordinator: dump IPv6 BPF downstream rules
  BpfCoordinator: change function name and format for dumping IPv6 rules
  add header on ipv6 forwarding rulesdump
  add header on ipv6 upstream bpf map dump

Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-08-18 00:49:54 +00:00
370f10d117
Merge "fix clat on restricted networks"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-08-18 00:43:06 +00:00
22f0604474
Merge "simplify netd updatable"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-08-18 00:38:47 +00:00
9152b1692b
Merge android13-tests-dev
Change-Id: I6f08451ef55748db00d70f262446d2db2ccbdb3c

Xin Li   commited 2022-08-17 16:31:44 -07:00
0240a64a8b
Merge changes from topic "ethernet-tethering-test-on-cf"
* changes:
  UpstreamNetworkMonitor: add NOTIFY_TEST_NETWORK_AVAILABLE
  EthernetTetheringTest: obtain the required permissions when needed
  Use TetheredInterfaceRequester to check available tethering interface

Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-08-17 17:50:40 +00:00
91f7d6d906
Support java BpfMap in BpfNetMaps#swapActiveStatsMap
Bug: 217624062
Test: atest BpfNetMapsTest
android.net.cts.NetworkStatsManagerTest
android.net.cts.TrafficStatsTest

Change-Id: I9cb673673d2ed1dda8fa14c0877e2fc683267791

Motomu Utsumi   commited 2022-08-17 14:40:53 +00:00
7abeaa499c