Commit Graph

75913 Commits

Author SHA1 Message Date
Abel Lucas
26af1880cd Merge "Tests: update suite_name.py to latest mobly" 2023-03-29 03:18:06 +00:00
Abel Lucas
fdf5adcb8c Merge changes I7ba60db8,Ib0afb414
* changes:
  Remove Python enables identical to global defaults.
  Update config to use self-contained python binaries
2023-03-29 03:17:17 +00:00
Yan Yan
7e24ef11ce Merge "CTS to verify updating addresses of IPsec tunnels" am: 5ff958928e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2258806

Change-Id: I1f0389c3905a226b5650edfd661b5052ca77a78d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-29 00:59:05 +00:00
Yan Yan
5ff958928e Merge "CTS to verify updating addresses of IPsec tunnels" 2023-03-29 00:17:51 +00:00
Paul Hu
ddd0630dab Add CTS test for resolution stop failed
Bug: 266839892
Test: atest CtsNetTestCases:android.net.cts.NsdManagerTest
Change-Id: I1fee5aaaa5f19877d0fccafd6853568d50d4cb7c
2023-03-28 11:52:13 +00:00
Treehugger Robot
79542655b7 Merge "Request cell in #testExplicitlySelected" am: dafaf2a08b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2490883

Change-Id: I0a678b4a095453e9b318f29d45c4130b7ae51d14
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-28 08:20:36 +00:00
Treehugger Robot
dafaf2a08b Merge "Request cell in #testExplicitlySelected" 2023-03-28 07:57:33 +00:00
Junyu Lai
90aa8dd9d9 Merge "[ST05.1] Fill legacy type for test network" am: 853c866d67
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2489216

Change-Id: Ie972420b42f198dfda47c5abfccd56b923a25a4a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-28 02:48:04 +00:00
Junyu Lai
853c866d67 Merge "[ST05.1] Fill legacy type for test network" 2023-03-28 02:25:52 +00:00
Treehugger Robot
a78dbcaa16 Merge "TetheringUtils jni - clazz type is jclass" am: ec93ad26a7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2510235

Change-Id: I56f2481ae5d854a0133657566490fa002258f3a0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-28 01:52:13 +00:00
Maciej Żenczykowski
2b410931ed Merge "ClatCoordinator jni - clazz type is jclass" am: 444dfa0189
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2510176

Change-Id: I49c75b44f6fc53a54e9e3e5dce8481a90f40191f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-28 01:51:58 +00:00
Treehugger Robot
41d8502be9 Merge "Add androidx.annotation_annotation library" am: 9d5066b806
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2501921

Change-Id: I2b46a014c207f3c5d2e7e7bdeda82729b6c93a6a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-28 01:51:42 +00:00
Treehugger Robot
ec93ad26a7 Merge "TetheringUtils jni - clazz type is jclass" 2023-03-28 01:44:00 +00:00
Maciej Żenczykowski
444dfa0189 Merge "ClatCoordinator jni - clazz type is jclass" 2023-03-28 01:40:53 +00:00
Treehugger Robot
9d5066b806 Merge "Add androidx.annotation_annotation library" 2023-03-28 01:14:42 +00:00
Yan Yan
7960b77f46 CTS: Verify rekey-based tunnel migration with encapType change
Adds CTS to verify that the tunnel migration based on replacing
SAs can handle changes of encap type.

Verified on kernel 5.10.149 and 5.10.104

Bug: 266149275
Test: atest IpSecManagerTunnelTest(new tests added)
Change-Id: I33e945f8be2a472603c5f1b64697f62f2d69a186
2023-03-27 18:02:58 -07:00
Yan Yan
f0cc850de8 Verify Kernel MOBIKE with V6 UDP encapsulation
This commit adds tests to verify that SAs with UDP encapsulation
can be updated from current IPv6 addresses to new IPv6 addresses.

This commit also improves CTS to verify that SA update can work
properly when the UDP encapsulation socket is rebinded to a
new network.

Verified on kernel 5.10.149 and 5.10.104

Bug: 266149275
Test: atest IpSecManagerTunnelTest(new tests added)
Change-Id: I9b5c961808c2f368911192003974a95643aa5181
2023-03-27 17:56:05 -07:00
Maciej Żenczykowski
3830ccc53d ClatCoordinator jni - clazz type is jclass
See:
  https://source.corp.google.com/aosp-master/packages/modules/Connectivity/service/src/com/android/server/connectivity/ClatCoordinator.java;l=931

private static native String native_selectIpv4Address(String v4addr, int prefixlen) throws IOException;
private static native String native_generateIpv6Address(String iface, String v4, String prefix64, int mark) throws IOException;
private static native int native_createTunInterface(String tuniface) throws IOException;
private static native int native_detectMtu(String platSubnet, int platSuffix, int mark) throws IOException;
private static native int native_openPacketSocket() throws IOException;
private static native int native_openRawSocket6(int mark) throws IOException;
private static native void native_addAnycastSetsockopt(FileDescriptor sock, String v6, int ifindex) throws IOException;
private static native void native_configurePacketSocket(FileDescriptor sock, String v6, int ifindex) throws IOException;
private static native int native_startClatd(FileDescriptor tunfd, FileDescriptor readsock6, FileDescriptor writesock6, String iface, String pfx96, String v4, String v6) throws IOException;
private static native void native_stopClatd(String iface, String pfx96, String v4, String v6, int pid) throws IOException;
private static native long native_getSocketCookie(FileDescriptor sock) throws IOException;

so all are 'static' (ie. class methods)

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1605912f0216b2c40ab966ddf4df42f960f17d3f
2023-03-27 22:47:39 +00:00
Maciej Żenczykowski
a7e496f067 TetheringUtils jni - clazz type is jclass
See: packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/util/TetheringUtils.java

public static native void setupNaSocket(FileDescriptor fd) throws SocketException;
public static native void setupNsSocket(FileDescriptor fd) throws SocketException;
public static native void setupRaSocket(FileDescriptor fd, int ifIndex) throws SocketException;

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: If406a4e507da916f5691d0ae4bded14dd168bc72
2023-03-27 22:41:09 +00:00
Yan Yan
0c442a6f7a CTS to verify updating addresses of IPsec tunnels
Add CTS tests to verify migrating IPsec tunnels by
updating the existing IpSecTransforms

This commit also updates the input list of
the #getIpSecTunnelTestRunnable and #run method for
supporting the new tests.

Bug: 266149275
Test: atest IpSecManagerTunnelTest(new tests added)
Change-Id: If23c4268f56ab45a4443fa4435507b776bb5fbba
2023-03-27 15:13:04 -07:00
Treehugger Robot
1a14daca57 Merge "Utility improvements for handling V6 encap and XFRM_MIGRATE" am: ab1bf30fb8
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2392965

Change-Id: Ia6c93611187a0a2e9070d43a57242da671efdb7c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-27 20:47:19 +00:00
Xinyi Zhou
55148df8fd Merge "Reset NanoApp filter when the nearby filters are null" into tm-mainline-prod 2023-03-27 20:18:33 +00:00
Treehugger Robot
ab1bf30fb8 Merge "Utility improvements for handling V6 encap and XFRM_MIGRATE" 2023-03-27 20:13:22 +00:00
Yan Yan
245b09badc Utility improvements for handling V6 encap and XFRM_MIGRATE
This commit is a preparation CL for testing the ability to update
IpSecTransform with new addresses. This commit adds three supports
in utility classes:
- Support verifying outbound v6 encap packets
- Allow awaitEspPacketNoPlaintext to wait for a packet with expected
  length until timeout. Previously this method would fail
  immediately when it received an ESP packet with incorrect length.
  This old behavior would make the tests flaky since the test device
  might send ESP containing RA message instead of the test data.
- Support checking the existence of XFRM_MIGRATE feature

Bug: 266149275
Test: atest CtsNetTestCases
Change-Id: Ia50aeda8d134c5edd2d1b86bf43a521084ce9866
2023-03-27 11:04:44 -07:00
Krzysztof Kosiński
fe96b96180 Remove Python enables identical to global defaults.
Bug: 245854393
Ignore-AOSP-First: nearby_not_in_aosp_yet
Test: treehugger
Change-Id: I7ba60db8c9059abad377c2c33dcc927f8786e2c3
(cherry picked from commit 0cba17b4a6)
Merged-In: I7ba60db8c9059abad377c2c33dcc927f8786e2c3
2023-03-27 17:46:09 +00:00
Julien Desprez
87cd1d636e Update config to use self-contained python binaries
Build from source and remove need for virtualenv to
make it self-contained.

Test: presubmit, forrest (https://android-build.googleplex.com/builds/abtd/run/L76600000954930260)
Bug: 234458076
Ignore-AOSP-First: nearby_not_in_aosp_yet
Change-Id: Ib0afb414fdeb510577345afd650fa6f0f5b3c721
(cherry picked from commit 7599806e06)
Merged-In: Ib0afb414fdeb510577345afd650fa6f0f5b3c721
2023-03-27 17:45:33 +00:00
Chidera Olibie
18c011e026 Merge "[Cronet] Move OWNERS file to parent tests directory" am: dd813e185e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2508435

Change-Id: I41767496a29a6728bbe4c9e841c7907d9ec79a98
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-27 17:35:37 +00:00
Chidera Olibie
dd813e185e Merge "[Cronet] Move OWNERS file to parent tests directory" 2023-03-27 17:01:39 +00:00
Treehugger Robot
cfed364831 [automerger skipped] Merge "Use current shims in service-connectivity" am: 83a7b71fef -s ours
am skip reason: Merged-In I88228152834a1c06830fb51e868fb8e3d8c47519 with SHA-1 8ff46fc063 is already in history

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2405719

Change-Id: Iff377dc4a2221aa5b584cbfda590df37ea6e70a2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-27 09:29:52 +00:00
Remi NGUYEN VAN
f1b2899759 [automerger skipped] Use current shims in service-connectivity am: 02eee9aa5a -s ours
am skip reason: Merged-In I88228152834a1c06830fb51e868fb8e3d8c47519 with SHA-1 8ff46fc063 is already in history

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2405719

Change-Id: I788feeb2ac5d16fcd6e5005b80194a3a784e057b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-27 09:29:50 +00:00
Treehugger Robot
83a7b71fef Merge "Use current shims in service-connectivity" 2023-03-27 09:03:39 +00:00
TreeHugger Robot
11bdffa302 Merge "Use stable shims in service-connectivity" into tm-mainline-prod 2023-03-27 08:38:02 +00:00
Remi NGUYEN VAN
02eee9aa5a Use current shims in service-connectivity
Instead of NetworkStackApiStableShims, use NetworkStackApiCurrentShims
as this is a development branch.

Use java_defaults in the "merge conflicts expected" section, so that
module release branches can use the same defaults, but set it to
NetworkStackApiStableShims.

The shims are removed from FrameworksNetIntegrationTests, as they are
already available there through service-connectivity-pre-jarjar. Keeping
them as a dependency would make FrameworksNetIntegrationTests use both
Stable shims (directly) and Current shims
(through service-connectivity-pre-jarjar).

Bug: 266205506
Test: m
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:921290b49d109360aae5dc39effaa3b0e691f65a)
Merged-In: I88228152834a1c06830fb51e868fb8e3d8c47519

Change-Id: I88228152834a1c06830fb51e868fb8e3d8c47519
2023-03-27 15:56:23 +09:00
Remi NGUYEN VAN
8ff46fc063 Use stable shims in service-connectivity
Keep using NetworkStackApiStableShims as this is a module release
branch.

Use java_defaults in the "merge conflicts expected" section, so that
module release branches can use the same defaults, but set it to
NetworkStackApiStableShims.

The shims are removed from FrameworksNetIntegrationTests, as they are
already available there through service-connectivity-pre-jarjar. Keeping
them as a dependency would make FrameworksNetIntegrationTests use both
Stable shims (directly) and Current shims
(through service-connectivity-pre-jarjar).

Ignore-AOSP-First: this needs to be submitted separately in each branch,
                   with downstream branches first as there are merge
		   conflicts in Tethering/apex/Android.bp that cannot be
		   automerged.

Bug: 266205506
Test: m
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:921290b49d109360aae5dc39effaa3b0e691f65a)
Merged-In: I88228152834a1c06830fb51e868fb8e3d8c47519

Change-Id: I88228152834a1c06830fb51e868fb8e3d8c47519
2023-03-27 15:39:30 +09:00
Chiachang Wang
356248ea14 Merge "Remove unused context parameter" am: f643f2265e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2500317

Change-Id: I6d3ab82f38b1bfa4411a6d5b332f79197b194b2c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-27 06:27:59 +00:00
Chiachang Wang
087c293a81 Merge "Adjust polling interval for auto on/off keepalives" am: 0342985117
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2499515

Change-Id: I9819508610cc637786d03365483f776e5d07d0eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-27 06:27:47 +00:00
Chiachang Wang
f643f2265e Merge "Remove unused context parameter" 2023-03-27 06:10:05 +00:00
Chiachang Wang
0342985117 Merge "Adjust polling interval for auto on/off keepalives" 2023-03-27 06:05:08 +00:00
Chidera Olibie
4264d1489b [Cronet] Move OWNERS file to parent tests directory
This file was added when there was only Cronet/tests/cts directory.
We now have move directories inside Cronet/tests hence the move

Test: m
Change-Id: Ib9b4af307f7085844060b4aed3b7c153a64ff962
2023-03-26 22:43:57 +00:00
chiachangwang
bdb9d577ef Remove unused context parameter
Test: m
Change-Id: Ia2226117b4ad5c1c099e903898bd74f0f2fc9f36
2023-03-25 09:17:26 +00:00
chiachangwang
d953d0182a Adjust polling interval for auto on/off keepalives
The system polls TCP connections every 2 minutes for the auto
on/off keepalives. For some carriers, the NAT-T keepalive delay
is lower than this, which means it's possible a TCP connection
is opened seconds after the poll. This may cause connections
being disconnected because keepalive timed-out.

The minimal acceptable value should be the same as the keepalive
delay. But the system may take time to restart keepalive. Adjust
the delay of the polling alarm to be lower than the keepalive
delay to preserve some time for the system to restart the
keepalive.

Bug: 273411114
Test: atest FrameworksNetTests
Change-Id: I28f71ceb7b72d83e6e0f8f7d22d3d1e9dbdaa467
2023-03-25 09:15:08 +00:00
Chiachang Wang
a057c9f4e7 Merge "Verify the update of shouldLongLivedTcpExcluded in VpnTransportInfo" am: ce1bc54e66
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2489116

Change-Id: I4b0da65dd2be9c975c68b0b23cfb84a00c35f49e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-25 04:34:19 +00:00
Chiachang Wang
ce1bc54e66 Merge "Verify the update of shouldLongLivedTcpExcluded in VpnTransportInfo" 2023-03-25 04:12:22 +00:00
Patrick Rohr
2c7e6b7298 Merge changes I833bff2a,I87c60690 am: 37f9b2888c
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2507201

Change-Id: I4b50bf404f21e2e3af0a14b1d01b1afddae672fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-24 16:27:18 +00:00
Patrick Rohr
37f9b2888c Merge changes I833bff2a,I87c60690
* changes:
  cronet import: set -e -x in cronet_import.sh
  cronet import: set gclient --delete_unversioned_trees
2023-03-24 15:58:48 +00:00
Patrick Rohr
38e3cd8ee9 cronet import: set -e -x in cronet_import.sh
To better surface errors in the import script.

Test: run script
Change-Id: I833bff2aebd9a89f2cccfe3b6271db86f1bd6dab
2023-03-24 06:56:22 -07:00
Patrick Rohr
538dd3e875 cronet import: set gclient --delete_unversioned_trees
This option deletes gclient dependencies that were remove upstream, so
it makes sense to always set this flag for the import (since the import
directoy is reused to speed up the process).

This change also fixes setup_folder_origin to run in a subshell to
contain the directory change it performs.

Test: none
Change-Id: I87c60690be81843c3947acc0251967372ed4c34a
2023-03-24 06:55:49 -07:00
Mohannad Farrag
eed0750b1d Merge "gn2bp: Turn off allocator_shims for musl only" am: 465805c6a8
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2502695

Change-Id: I501791468a1d4bebcbc12328c6f37b83d32da669
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-24 12:17:54 +00:00
Mohannad Farrag
465805c6a8 Merge "gn2bp: Turn off allocator_shims for musl only" 2023-03-24 11:52:54 +00:00
Mohannad Farrag
8c5b578a0d gn2bp: Turn off allocator_shims for musl only
* I've investigated turning off `allocator_shims` globally for all of Cronet but
this didn't sound like a good option. allocator_shims are used for security measures,
where sometimes malloc caller forget to check for NULL which happens on oom. allocator_shims would
instantly kill the app instead of depending on the caller to do the validity check.
* The solution here was to manually remove the files and add them to `android` and `glibc` only so allocator_shims
is never compiled for musl.
* Chromium does not support musl so there's no flag for `musl` with allocator_shims.

Test: mma
Change-Id: I2a63b14482a526d06a089647e6f61eea9f1691dc
2023-03-24 11:37:22 +00:00