Commit Graph

3933 Commits

Author SHA1 Message Date
Treehugger Robot
f6affa800b Merge "Fix a possible flake in disconnectFromWiFi" am: 1c4a66ddc4 am: 0061457a54 am: d35c7ff990
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1892098

Change-Id: I143b15be049b955bf5dc2a74c4d82b9b711a1ce7
2021-11-22 08:32:07 +00:00
Treehugger Robot
0061457a54 Merge "Fix a possible flake in disconnectFromWiFi" am: 1c4a66ddc4
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1892098

Change-Id: I6df297447ade42e38963855809c499c55b6ea85c
2021-11-22 07:53:43 +00:00
Treehugger Robot
1c4a66ddc4 Merge "Fix a possible flake in disconnectFromWiFi" 2021-11-22 07:34:57 +00:00
Remi NGUYEN VAN
33b7412577 Merge "Update NSD tests without AsyncChannel" am: 469d941752 am: b7fd5bd3e1 am: ee2dd397d6
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1823893

Change-Id: I054e294cb32c0abf70e3ea419db09a2e492e3bc5
2021-11-22 06:45:59 +00:00
Remi NGUYEN VAN
b7fd5bd3e1 Merge "Update NSD tests without AsyncChannel" am: 469d941752
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1823893

Change-Id: I897bdce6cdaf4ea390d8ce6be03b87bacd6da82e
2021-11-22 06:19:18 +00:00
Aaron Huang
3bde36484b Merge "Use real ProxyTracker in ConnectivityServiceTest" am: c7037475fa am: 4fc403c3b0 am: 1faca14f77
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1885529

Change-Id: I2f4a689aae9dafbad0bb5e3cd74f43a5c72fd898
2021-11-22 06:03:37 +00:00
Remi NGUYEN VAN
469d941752 Merge "Update NSD tests without AsyncChannel" 2021-11-22 05:58:15 +00:00
Aaron Huang
4fc403c3b0 Merge "Use real ProxyTracker in ConnectivityServiceTest" am: c7037475fa
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1885529

Change-Id: Id685a51b37d59a822aaa9307f9d4b55053211612
2021-11-22 05:41:34 +00:00
Aaron Huang
c7037475fa Merge "Use real ProxyTracker in ConnectivityServiceTest" 2021-11-22 05:25:28 +00:00
Remi NGUYEN VAN
d1ed21007a Remove unused service and test dependencies am: f96ecf2708 am: e03f77170a am: 7d865f3e10
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1895317

Change-Id: I22260179985637d82e20b346786bed44148e5dc2
2021-11-19 16:27:47 +00:00
Remi NGUYEN VAN
e03f77170a Remove unused service and test dependencies am: f96ecf2708
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1895317

Change-Id: I677a6b4c0b68648b4fab0e6f67edc88aa8be77b2
2021-11-19 15:59:07 +00:00
Remi NGUYEN VAN
f96ecf2708 Remove unused service and test dependencies
Nothing uses StateMachine in service-connectivity, and
FrameworksNetTestsLib pulled a lot of unused dependencies with
services.core and services.net.

Remove unused dependencies. This helps measure code coverage more
accurately.

Bug: 207020032
Test: atest ConnectivityCoverageTests
Change-Id: I39857865594a3263c4b1deeda23312c8e4f86a77
2021-11-19 21:14:39 +09:00
Xin Li
c96c26077b Merge "Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918" into stage-aosp-master 2021-11-18 21:29:06 +00:00
Treehugger Robot
1233439894 Merge "Disable CtsNetTestCases if needed" am: 2c75c0444d am: d42bf9e53b am: 65a20ad635
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1892477

Change-Id: Icdd62c981cbc18e6fdf47998b60b196887f182a8
2021-11-18 12:26:30 +00:00
Treehugger Robot
65a20ad635 Merge "Disable CtsNetTestCases if needed" am: 2c75c0444d am: d42bf9e53b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1892477

Change-Id: Iccc7f22c470cbc5c38b156c60452659d982309b2
2021-11-18 12:14:16 +00:00
Treehugger Robot
2c75c0444d Merge "Disable CtsNetTestCases if needed" 2021-11-18 11:43:07 +00:00
Remi NGUYEN VAN
cd4b4ee973 Update NSD tests without AsyncChannel
Update the tests to use the newer NsdManager based on Binder interfaces
instead of AsyncChannel.

Bug: 190249673
Test: atest NsdManagerTest NsdServiceTest
Change-Id: I0991b598331e335a0bc211f010da7f034fb2441b
2021-11-18 18:22:45 +09:00
Chalard Jean
bfc2b02f14 S- not to crash on NetworkInfo(null) or setDetailedState(null) am: dece0d805f am: 66bd87f0d4 am: 2f6631cd7c
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1892101

Change-Id: I968710654234e9756ef5f3cc39a5cb4741887366
2021-11-17 07:25:40 +00:00
Chalard Jean
2f6631cd7c S- not to crash on NetworkInfo(null) or setDetailedState(null) am: dece0d805f am: 66bd87f0d4
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1892101

Change-Id: Iddb56ae95da59cfc9bc45b2f6139b1a578ad0c9d
2021-11-17 07:15:12 +00:00
Taras Antoshchuk
bc3f86dfa3 Disable CtsNetTestCases if needed
Apply NetworkStackNextEnableDefaults to CtsNetTestCases to disable it
in branches where NetworkStackNext and related targets should not be
built.

Test: presubmit
Change-Id: I850b4294aa4c3c01f8871760185ca7fedc0f8584
2021-11-15 17:40:42 +01:00
Chalard Jean
dece0d805f S- not to crash on NetworkInfo(null) or setDetailedState(null)
When NetworkInfo(null) or setDetailedState(null, any, any) are
called, S used to not crash but plant a null bomb for later
which may explode in some calls (notably, parceling) : see the
bug referenced below for details.

To help catching these errors earlier a patch was made to crash
as soon as one of these methods is called with a null argument,
but this will also crash incorrect use on existing code that
may never actually step on the mine, crashing code that used not
to crash. For safety, implement the new behavior only on T.

Bug: 145972387
Test: NetworkInfoTest
Change-Id: Ib710497d83b2d26439c2bd4d2f572310db97d6fd
2021-11-15 21:18:25 +09:00
Aaron Huang
e3879abb07 Use real ProxyTracker in ConnectivityServiceTest
Currently CS test uses a mock ProxyTracker object to verify that
the sendProxyBroadcast() is called. Also, if the network is a
default network then sendProxyBroadcast() will be indirectly
called in setDefaultProxy(). This only verifies that the method
is called but it doesn't verify that the broadcast is sent.

Instead of testing setDefaultProxy() is called, it is better to
verify that the broadcast is actually sent. Therefore, use a
real ProxyTracker in the test to verify the broadcast is sent.

Test: FrameworksNetTests:ConnectivityServiceTest
Change-Id: Id5c9e07e8326f24bd2665b4bb08f96d6d57d999c
2021-11-15 20:01:12 +08:00
Chalard Jean
05c291e5a3 Fix a possible flake in disconnectFromWiFi
1. There is a theoretical issue where the callback is not yet
   registered when wifi is disabled, but there is no evidence
   of it actually happening
2. 2 minutes timeout makes no sense for these tests that have a
   total 1 minute timeout anyway

Bug: 196387278
Test: CtsNetTestCases
Change-Id: I120af9b312ca34431d0e62dd85233fcdaa1b09b9
2021-11-15 11:58:07 +00:00
markchien
6c1659d26e Rename tethering jni and get the jni by its package name am: f967b11087 am: de93cf9aba am: 6d52305aa9 am: 7e7b752079
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1885530

Change-Id: Ie7aa98d74332eac0c38b6378764523574e84e650
2021-11-11 14:31:18 +00:00
markchien
7e7b752079 Rename tethering jni and get the jni by its package name am: f967b11087 am: de93cf9aba am: 6d52305aa9
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1885530

Change-Id: Iff63a9588d74a43346d9c18729c0e9f0e1a1b21e
2021-11-11 14:19:27 +00:00
markchien
6d52305aa9 Rename tethering jni and get the jni by its package name am: f967b11087 am: de93cf9aba
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1885530

Change-Id: I39d4a2a9bc402d3ea8f33a1ce5dfec6cb91f4b15
2021-11-11 14:02:34 +00:00
markchien
de93cf9aba Rename tethering jni and get the jni by its package name am: f967b11087
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1885530

Change-Id: Icc18029f126a4845d6d2071d9e36458cbab4c313
2021-11-11 13:42:39 +00:00
Maciej Żenczykowski
ff81692077 Merge changes from topics "rename-libbpfmapjni", "rename-libtetherutiljni"
* changes:
  Rename libbpfmapjni and include bpf common util library
  Rename tethering jni and get the jni by its package name
2021-11-11 13:19:48 +00:00
Treehugger Robot
8f1c12a8f1 Merge "replace R + 1 with S" am: 7eb9f88a6e am: d5ad273033 am: 56d7b04870 am: 511e606557
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1888235

Change-Id: Iba216770137e1af79fabf3bf29d15044d07c3ef2
2021-11-11 08:31:31 +00:00
Treehugger Robot
511e606557 Merge "replace R + 1 with S" am: 7eb9f88a6e am: d5ad273033 am: 56d7b04870
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1888235

Change-Id: I4ed04aa023e712715f96c930cd9fbac7ff012a2f
2021-11-11 08:14:19 +00:00
Treehugger Robot
56d7b04870 Merge "replace R + 1 with S" am: 7eb9f88a6e am: d5ad273033
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1888235

Change-Id: Ifc7daa30ed3b963a2ba2991626eea59d16c8a682
2021-11-11 08:02:01 +00:00
Treehugger Robot
7eb9f88a6e Merge "replace R + 1 with S" 2021-11-11 07:26:39 +00:00
Remi NGUYEN VAN
eae2769799 Merge "Fix NetworkCapabilitiesTest on S" am: 4638c093ed am: 31969c1dc5 am: dbb110de2d am: 3598bd16b6
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1887835

Change-Id: I8d7901d4fc7c9af00c00185dc50115de811f125a
2021-11-11 05:39:01 +00:00
Remi NGUYEN VAN
3598bd16b6 Merge "Fix NetworkCapabilitiesTest on S" am: 4638c093ed am: 31969c1dc5 am: dbb110de2d
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1887835

Change-Id: I8841bbb775f966beda2e5a4d081f452490af7985
2021-11-11 05:22:40 +00:00
Remi NGUYEN VAN
dbb110de2d Merge "Fix NetworkCapabilitiesTest on S" am: 4638c093ed am: 31969c1dc5
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1887835

Change-Id: I8b9d732884b6c2344e1fccfe786ac2dc5aad6b23
2021-11-11 05:10:26 +00:00
Remi NGUYEN VAN
4638c093ed Merge "Fix NetworkCapabilitiesTest on S" 2021-11-11 04:42:36 +00:00
Remi NGUYEN VAN
daa03defee Fix NetworkCapabilitiesTest on S
Mark NetworkCapabilitiesTest as ConnectivityModuleTest so that it is
only run in MTS with the Connectivity module installed, and fix
parceling tests to use the right number of fields in that case.

NetworkCapabilitiesTest is only useful to test the Connectivity module,
and not other modules like NetworkStack, as it is a unit test of a class
in the Connectivity module.

Bug: 205901761
Test: atest NetworkCapabilitiesTest
Change-Id: I10ba0f866bc7a39b2c90bdde12a79feefea2d5ee
2021-11-11 12:30:07 +09:00
Maciej Żenczykowski
8834250ef8 replace R + 1 with S
Test: TreeHugger
Bug: 170424293
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I43f53268b6c1605d928ce3431cc95b8a66b6c052
2021-11-10 18:20:01 -08:00
Xin Li
e41bbea995 Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467
Merged-In: I745ef4d42ecaf06bb81d9dbe0b7162267fea65a8
Change-Id: I7b2a1fc519124cfc10806dde5fd543504a51e072
2021-11-10 08:06:18 +00:00
markchien
f967b11087 Rename tethering jni and get the jni by its package name
tetherutiljni is renamed to com_android_networkstack_tethering_jni_util

Bug: 205088391
Test: atest TetheringTests
      atest CtsTetheringTest
      atest TetheringPrivilegedTests
Change-Id: Ifd1f4473625e33d3ebe190c9f8a2b5d54aa1ff49
2021-11-10 14:07:24 +08:00
Remi NGUYEN VAN
eb96b60f67 Don't rematch all requests when adding new ones am: 959d2cb6bd am: b92f209a18 am: 0cd2be4ab9 am: c32b4e9ef3
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1784387

Change-Id: I83a8fffbc81531b64aa8d945e264ead373b9733a
2021-11-10 05:12:15 +00:00
Remi NGUYEN VAN
c32b4e9ef3 Don't rematch all requests when adding new ones am: 959d2cb6bd am: b92f209a18 am: 0cd2be4ab9
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1784387

Change-Id: Ia87ab722412c3a534d70327595180338f1ff1cf3
2021-11-10 05:00:44 +00:00
Remi NGUYEN VAN
0cd2be4ab9 Don't rematch all requests when adding new ones am: 959d2cb6bd am: b92f209a18
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1784387

Change-Id: I31e55ccdfe8b4a4bf432fd03035602d044d6b2a4
2021-11-10 04:42:48 +00:00
Remi NGUYEN VAN
959d2cb6bd Don't rematch all requests when adding new ones
With the network selection rewrite in S, rematching a single request can
now easily be done; this can be used as an optimization in
handleRegisterNetworkRequests to avoid rematching all requests when
registering a new one.

This can be disabled by a flag that is unset by default,
REMATCH_ALL_REQUESTS_ON_REGISTER.

Test: atest ConnectivityServiceTest
Change-Id: If76f79b41ac88863974f7025624667134bea2570
2021-11-08 19:17:57 +09:00
Treehugger Robot
926a04bb5d Merge "Include the failing stats in stats failure assertions." am: 27979bd116 am: db33b9ea65 am: 06fe60cef1 am: 90427f67b0
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1883772

Change-Id: I1aec89d6e43ca111e5621276521ad1b77c3b0eeb
2021-11-08 07:28:28 +00:00
Treehugger Robot
90427f67b0 Merge "Include the failing stats in stats failure assertions." am: 27979bd116 am: db33b9ea65 am: 06fe60cef1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1883772

Change-Id: Iee2caabd9adbdfdffea197582c8005d444ca32c8
2021-11-08 07:10:53 +00:00
Treehugger Robot
06fe60cef1 Merge "Include the failing stats in stats failure assertions." am: 27979bd116 am: db33b9ea65
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1883772

Change-Id: Ib0202cc1198d49a99c7f927ace1207e91795d901
2021-11-08 06:53:20 +00:00
Treehugger Robot
27979bd116 Merge "Include the failing stats in stats failure assertions." 2021-11-08 06:20:39 +00:00
Lorenzo Colitti
5156e787f3 Include the failing stats in stats failure assertions.
Currently debugging IpSecManagerTest counter test failures is
difficult because the assertion message does not say how many
bytes/packets were expected.

Add this information to the assertion message.

Bug: 204860049
Test: test-only change
Change-Id: I4e12be9a58a688fcee3362dceb31d9f21e981d6c
2021-11-08 13:25:45 +09:00
Les Lee
31a09fa459 Merge "Add test case to test normalize" am: b5ee639fe0 am: 663dfcaec0 am: a02490446c am: 9381fb73df
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1881008

Change-Id: I102ccec75f219d389da5a100e28916bbcd4b0029
2021-11-06 01:58:02 +00:00