Commit graph

109,077 commits

Message SHA1
Add mapping to trigger NetworkSecurity unit tests on presubmit for tethering-mainline-presubmit
Test with connectivity/tethering module only, to catch integration issues with older versions of other modules.

Only the unit test are added to the test_mapping for now. The CTS tests are not compatible with older dessert releases.

Bug: 397130276
Test: n/a
Change-Id: I832bf21ebe5a0f7033e0f2a68714efa7a6e37bc8

Sandro Montanari   commited 2025-02-24 14:10:16 +00:00
f37bf52f86
Merge changes Ib2febede,Id3752790,I7cfcc93a,I26f6669f,I5d722c0d into main
* changes:
  Add missing javadocs to satisfy linter
  Make linter happy
  Use ThreadLeakMonitor for CSL2capProviderTest
  Add some tests to ensure BluetoothExceptions are handled
  Move creating L2capPacketForwarder to dependencies

Patrick Rohr   authored and   Gerrit Code Review   commited 2025-02-21 15:04:40 -08:00
2360f4500b
libclat_test: use static libc++
shot in the dark fix for mainline T test failure:

libclat_test did not report any run:
CANNOT LINK EXECUTABLE "/data/local/tmp/libclat_test": cannot locate symbol "_ZTVNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE" referenced by "/data/local/tmp/libclat_test"...

Bug: 398136085
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I10fea4441898a19430941ef4aa1951817cc350ba

Maciej Żenczykowski   commited 2025-02-21 11:59:49 -08:00
0558e3cde8
Add missing javadocs to satisfy linter
Test: TH
Change-Id: Ib2febede8b95bc74ef8d9b0f25b62320dde2cf84

Patrick Rohr   commited 2025-02-21 11:57:23 -08:00
14ba95c48e
Make linter happy
Test: TH
Change-Id: Id3752790b0c040adbb5d08ddcb7aa2279254b7de

Patrick Rohr   commited 2025-02-21 11:57:23 -08:00
4dd26d1ad2
Use ThreadLeakMonitor for CSL2capProviderTest
This CL introduces ThreadLeakMonitor for CSL2capProviderTest.
ThreadLeakMonitor ignores threads with unique names, so all
L2capNetworkProvider related threads must specify a name.

Test: TH
Change-Id: I7cfcc93ab562a1ada2058d8c73e968a8d0005b1d

Patrick Rohr   commited 2025-02-21 11:57:23 -08:00
b4f3922c01
Add some tests to ensure BluetoothExceptions are handled
This is just the beginning.

Also fixed a bug that put(null) on the blocking queue, which apparently
is not supported.

Test: TH
Change-Id: I26f6669f483d76fcba83735bb6d32880e23dd451

Patrick Rohr   commited 2025-02-21 11:57:23 -08:00
5a5c34a679
Move creating L2capPacketForwarder to dependencies
For testing which will not do any packet forwarding as that part is
already tested.

Test: TH
Change-Id: I5d722c0d8f85c8016061f624357ff7e6ddcbfdf1

Patrick Rohr   commited 2025-02-21 11:57:23 -08:00
fdb097e77f
Merge "Remove outdated TODO" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-02-21 11:38:06 -08:00
3b4cc6ebfb
Merge changes I89f65af3,Ic89a85b2 into main
* changes:
  Make linter happier
  Add thread checks

Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-02-21 11:37:35 -08:00
6d93b51386
Move SkDestroyListener to under staticlibs
Upcoming CL use SkDestroyListener from ConnectivityService

Bug: 311792075
Test: atest FrameworksNetTests
Change-Id: I96dec7e13aaa574b90e7caf3b559ee5172848e51

Motomu Utsumi   commited 2025-02-21 09:26:11 +09:00
1135975109
Update SkDestroyListner to support only monitor UDP sockets close
Bug: 311792075
Test: atest FrameworksNetTests
Change-Id: Ib7749049fb0bd6ce8218ec62bec96584106ad7c5

Motomu Utsumi   commited 2025-02-21 09:26:10 +09:00
7f86b7485a
Update SkDestroyListener to take consumer for inetDiagMessage processing
This is a no-op refactoring (except for logging) in preparation for an
upcoming CL(aosp/3502915) that will use SkDestroyListener to close quic
connections for destroyed quic sockets.

Test: atest FrameworksNetTests
Bug: 311792075
Change-Id: I41e2a16075fc9242cae19f84d1255358333744ab

Motomu Utsumi   commited 2025-02-21 09:25:39 +09:00
d159016c22
Remove outdated TODO
As was pointed out on the doc, "bandwidth constrained" implies that data
on this network costs money to the user, e.g. a satellite network. This
is not the case for an IPv6 over BLE network, so the TODO can be
removed.

Test: TH
Change-Id: Ide854634381d24c2f2fa49dc099f86f4cc2d813b

Patrick Rohr   commited 2025-02-20 14:56:29 -08:00
599bd47753
Make linter happier
Add 4 more spaces.

Test: TH
Change-Id: I89f65af37f847211ba49876bd7776ab44afbcb00

Patrick Rohr   commited 2025-02-20 14:56:29 -08:00
ef2e0123b4
Add thread checks
This CL adds thread checks to various functions. It also adds 2 missing
@Override annotations to make it clear that run() is part of the Thread
itself.

Test: TH
Change-Id: Ic89a85b25bdf6afaab0310a641956001d7c83a77

Patrick Rohr   commited 2025-02-20 14:56:29 -08:00
2195bb65b0
Merge "Support Paramerized in SetFeatureFlagsRule" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-02-20 00:10:15 -08:00
154cfdc40e
Support Paramerized in SetFeatureFlagsRule
Make Parameterized compatible with SetFeatureFlagsRule. If both
are used, the method names seen by SetFeatureFlagsRule may
be followed by [\d+] in Parameterized style, leading to a method
not found exception in SetFeatureFlagsRule. With this patch, both
can be used at the same time.

Test: add a Parameterized rule to CaptivePortalLoginActivityTest
      see how it fails with MethodNotFoundError without this patch
      see how it works as expected with this patch
Change-Id: I3fe1e63600dd792bc290ed130b8598b49f2b95e1

Chalard Jean   commited 2025-02-20 15:46:39 +09:00
1c0939c365
Check local network permissions when permission changes, or when user or
packages is added or removed

Bug: 388803658
Test: atest ConnectivityCoverageTests

Change-Id: I7d098c4d9a7614d0bd40ae23869a2010ee3f0779

Jacque Li   authored and   Neha Raj   commited 2025-02-20 04:59:45 +00:00
8d5c6eae80
Merge "Wrapping Network and Traffic permissions in a class for module usage." into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-02-19 19:27:48 -08:00
37e457bd0a
Merge "Adding stacked link addresses to local_net_access map" into main
Sarup Dalwani   authored and   Gerrit Code Review   commited 2025-02-19 19:01:55 -08:00
c42f5fc47f
Merge "Update lnp app compat to be enabled after cur development version" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-02-19 18:12:36 -08:00
30db3333b6
Properly handle provisioning failures
This effectively cannot happen for IPv6 link-local only provisioning
unless the interface goes away during "provisioning".

Test: TH
Change-Id: Ib2c5238fdb816e74afa2300017f1014f9376ad17

Patrick Rohr   commited 2025-02-19 16:19:51 -08:00
cf0655c78a
Mark LinkProperties as volatile
LinkProperties are populated on a different thread, so must be marked as
volatile.

Test: TH
Change-Id: I5fb98bf90aa0c3f420c3619a9d58cd82986cef7e

Patrick Rohr   commited 2025-02-19 16:19:51 -08:00
909691a2ca
Fix some log statements
Test: TH
Change-Id: I470b2e810332f0f2cd229916e81bf54228cbe440

Patrick Rohr   commited 2025-02-19 16:19:51 -08:00
4cdd7253de
Split parts of L2capNetwork constructor into a static create()
Provisioning can fail if the interface disappears. This CL splits
IpClient provisioning into the create function which will eventually
return null when provisioning fails.

Test: TH
Change-Id: Ie815b0781c7642c05684438525290067d17d1a9e

Patrick Rohr   commited 2025-02-19 16:19:51 -08:00
ea137bd5eb
Merge "Revert "Add mapping to trigger NetworkSecurity unit tests on presubmit for tethering-mainline-presubmit"" into main
Priyanka Advani (xWF)   authored and   Gerrit Code Review   commited 2025-02-19 13:43:22 -08:00
f4df7b2cc5
Merge "Fix import ordering and unused imports" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-02-19 13:16:01 -08:00
fb6657a459
Revert "Add mapping to trigger NetworkSecurity unit tests on presubmit for tethering-mainline-presubmit"
This reverts commit b54ea49050.

Reason for revert: Droidmonitor created revert due to b/397704210. Will be verifying through ABTD before submission.

Change-Id: I9ca21679c505c1db0ce40b607336dbf43abda011

Priyanka Advani (xWF)   authored and   Gerrit Code Review   commited 2025-02-19 12:28:14 -08:00
4a2854b30a
Merge "Move createTunInterface to Dependencies for testing" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-02-19 12:04:09 -08:00
1e692f6acb
Merge "Do not log when NetworkSpecifier is null" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-02-19 12:03:20 -08:00
7ec0ab79e0
Fix import ordering and unused imports
Test: TH
Change-Id: I652c75c0c301df0040131f75f369065ea0a58250

Patrick Rohr   commited 2025-02-19 10:10:38 -08:00
f7343d9c15
Move createTunInterface to Dependencies for testing
Test: TH
Change-Id: I7b253db7242084c7343a589c733eccf68b3be728

Patrick Rohr   commited 2025-02-19 10:05:33 -08:00
1ad7cbfb74
Do not log when NetworkSpecifier is null
To avoid logging requests with empty capabilities and no
NetworkSpecifier. This also renames the validation functions for clarity
as was suggested in a previous review, and changes the Log.w to Log.i if
the specifier is invalid.

Test: TH
Bug: 397130676
Change-Id: I488b466f83f85ea9f3c067c95c4e01846560dea7

Patrick Rohr   commited 2025-02-19 10:05:33 -08:00
1cf990e003
Merge "noop: change from deprecated __ANDROID_API_*__ to constants" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-02-19 09:59:59 -08:00
08d5e828d5
Update lnp app compat to be enabled after cur development version
Bug: 376030323
Test: atest CtsNetTestCases

Change-Id: I7345ac2a08d21d1226ff8607ce1edf44f0946859

Jacque Li   commited 2025-02-19 08:40:49 -08:00
8331a79292
Merge "noop: change from deprecated __ANDROID_API_U__ to 34" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-02-19 06:38:12 -08:00
44f39a5cf3
Add mapping to trigger NetworkSecurity unit tests on presubmit for tethering-mainline-presubmit
Test with connectivity/tethering module only, to catch integration issues with older versions of other modules.


Bug: 397130276
Change-Id: Idc2fec3fa7b17ae87f6dcebcf4179196abd9f971
Test: n/a

Sandro Montanari   commited 2025-02-19 03:03:14 -08:00
b54ea49050
[Thread] fix the failure in ThreadIntegrationTest
This test had an assumption that Thread is enabled which is not true. This CL enables Thread in the setUp().

Bug: 397583601
Change-Id: I9c4d5028a663c6fe1c581267ff7d172d0cba577c

Handa Wang   commited 2025-02-19 01:20:23 -08:00
424aec63e2
Merge changes If0b58d44,If3213856 into main
* changes:
  Remove stale TODO
  Revert "Mark blanket offer as transport primary"

Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-02-18 21:40:26 -08:00
2afeec6405
Merge changes I77101952,I399631c6,I5ea98a06,I0b243f45,I5554cd42, ... into main
* changes:
  Fix test comment
  Enable header compression when requested
  Implement 6lowpan header compression
  Add a basic CSTest for L2capNetworkProvider
  Release network reservations in tearDown
  Start L2capNetworkProvider in CS
  Revert "Join HandlerThread if BLE is not supported"

Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-02-18 21:39:41 -08:00
90a2f97e4c
Merge "ApfIntegrationTest: adjust for addLoad{8,16}(R0, x) -> addLoad{8,16}intoR0(x)" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-02-18 21:12:46 -08:00
4cce12906f
Remove stale TODO
This is no longer required.

Test: TH
Change-Id: If0b58d441e30ee5a0bfcbbed3f21883909ee19b2

Patrick Rohr   commited 2025-02-18 19:41:15 -08:00
fa02af9086
Fix test comment
Change-Id: I77101952b24825b2c3983ccc5ac384e369a97148

Patrick Rohr   commited 2025-02-18 19:41:15 -08:00
d6bcc2c5e0
Revert "Mark blanket offer as transport primary"
This reverts commit 07bad0cf27.

This change is not actually required. CS will match all matching offers
from the satisfying provider, no matter their score.

Test: TH
Change-Id: If3213856dc7c5f3f06f128f3d866bfa940e6af63

Patrick Rohr   commited 2025-02-18 19:41:15 -08:00
8b10b9804e
Enable header compression when requested
Passes the header compression parameter to L2capPacketForwarder to
enable it when requested.

Test: TH
Change-Id: I399631c6483991741e53154c431b12ae0595f1f3

Patrick Rohr   commited 2025-02-18 19:41:15 -08:00
b4f1f2981a
Implement 6lowpan header compression
This implements 6lowpan header compression per rfc 6282. While the
decompression logic is full-fledged (to accept almost any 6lowpan
compressed packet on ingress), the compression logic does *not* actually
compress the packet.

Fully fledged compression might be submitted in a follow up, to make
integration testing possible.

Test: TH
Change-Id: I5ea98a06e502fe0752cfe827dbdf8ee4a7dfb24c

Patrick Rohr   commited 2025-02-18 19:41:15 -08:00
a1430bbb11
Add a basic CSTest for L2capNetworkProvider
This moves the tests that used to be in L2capNetworkProviderTest into a
CSTest based CSL2capProviderTest; however, it still only tests that
reservation offers are created in response to reservation requests.

More thorough tests will be added in follow ups.

Test: TH
Change-Id: I0b243f4517ee41376716cf4930f90657c4bc77b0

Patrick Rohr   commited 2025-02-18 19:41:15 -08:00
16093391f3
ApfIntegrationTest: adjust for addLoad{8,16}(R0, x) -> addLoad{8,16}intoR0(x)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I3cf1052dac1951fe6155641b1a7aef6014ba1a0d

Maciej Żenczykowski   commited 2025-02-18 19:39:52 -08:00
349f14790d
Release network reservations in tearDown
Test: TH
Change-Id: I5554cd424efb692fabdae1420f257a70ee94de19

Patrick Rohr   commited 2025-02-18 19:22:32 -08:00
4a966de7f3