Commit graph

66,048 commits

Message SHA1
Merge "Add tests for captive/partial after roam and ignore roam failures"
Jean Chalard   authored and   Gerrit Code Review   commited 2022-09-16 07:49:24 +00:00
1df85dfdff
Merge "Factorize ignoreValidationAfterRoam tests"
Jean Chalard   authored and   Gerrit Code Review   commited 2022-09-16 07:48:57 +00:00
4a4c752572
Merge changes Ieb67513a,I10b60a6c
* changes:
  Fix address family check in extractIpAddressAnswers()
  Fix wrong domain type in runResNqueryCheck()

Treehugger Robot   authored and   Gerrit Code Review   commited 2022-09-16 03:40:54 +00:00
f6a4f3ea0e
Merge "Fix jniThrowException to print correct error message in NativeMultinetworkJni.cpp"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-09-16 02:16:11 +00:00
c13715999c
Merge "Add native_dump to the Dependencies"
Motomu Utsumi   authored and   Gerrit Code Review   commited 2022-09-16 01:23:22 +00:00
db3accc65a
Merge changes I806a9f32,I9536ce6a
* changes:
  Switch to source-built GSON.
  Bugfix:com.android.server.nearby.fastpair.cache.FastPairCacheManagerTest#getAllInfo fail

Krzysztof Kosiński   authored and   Gerrit Code Review   commited 2022-09-16 00:10:14 +00:00
ea7475e1ac
Merge "Improve accept/reject comment readability."
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-09-15 21:55:39 +00:00
4681d10699
Merge "owners: add motomuman to core networking owners"
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-09-15 21:52:51 +00:00
09c0f84d9a
Improve accept/reject comment readability.
Test: N/A
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: If4cad0b83d2e62bfbbc0f65e9ffeefc69381c371

Maciej Żenczykowski   commited 2022-09-15 18:46:10 +00:00
1686030e6c
[automerger skipped] ethernet: remove buggy test expectations for compatibility am: 49a829db74 -s ours
am skip reason: Merged-In I1650bbc2a5883a874b92ecf2bcc7a56d01f4a905 with SHA-1 8b983158dc is already in history

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

Change-Id: I6e8c2d7ecc168d68a53cf9f3570603db633a60f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Patrick Rohr   authored and   Automerger Merge Worker   commited 2022-09-15 18:37:21 +00:00
ace9577ddc
owners: add motomuman to core networking owners
Test: owners file change
Change-Id: I54290c2d039acb7281cc7311480793b037c60d4f

Patrick Rohr   commited 2022-09-15 18:24:48 +00:00
e18aab5228
ethernet: remove buggy test expectations for compatibility
EthernetManagerTest#testCallbacks() should not enforce up/up/down/up
callbacks, so this bug can be fixed in mainline without breaking CTS13.

Test: atest EthernetManagerTest
Bug: 234314411
Change-Id: I1650bbc2a5883a874b92ecf2bcc7a56d01f4a905
Merged-In: I1650bbc2a5883a874b92ecf2bcc7a56d01f4a905

Patrick Rohr   commited 2022-09-15 18:17:27 +00:00
49a829db74
Merge "Make the hiddenapi*-tiramisu.txt files part of framework-connectivity-t"
Paul Duffin   authored and   Gerrit Code Review   commited 2022-09-15 11:55:36 +00:00
dadf95ff6a
Merge "Replace requestNetwork with registerSystemDefaultNetworkCallback"
Lucas Lin   authored and   Gerrit Code Review   commited 2022-09-15 09:00:39 +00:00
e490cffb0a
Merge "Add a field and score flag for first evaluation"
Jean Chalard   authored and   Gerrit Code Review   commited 2022-09-15 08:56:26 +00:00
be0e453159
Merge "Use conventional args style for gen_jarjar"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-09-15 08:20:57 +00:00
e82dfc895a
Add tests for captive/partial after roam and ignore roam failures
Test: This
Change-Id: Idc547d6e8b54f62b791552cf9e93ddab96991f5d

Chalard Jean   commited 2022-09-15 17:07:18 +09:00
c18ae65f6b
Factorize ignoreValidationAfterRoam tests
Test: ConnectivityServiceTest
Change-Id: Ied3704459a77fcef9eb34e08ab5a45ea85d4ce77

Chalard Jean   commited 2022-09-15 16:57:50 +09:00
3bad973354
Merge "Remove usage for deprecated ro.radio.noril"
Chiachang Wang   authored and   Gerrit Code Review   commited 2022-09-15 06:21:49 +00:00
fc54e71b02
Merge "Test no Internet and partial connectivity notifications."
Jean Chalard   authored and   Gerrit Code Review   commited 2022-09-15 03:56:13 +00:00
76fdaf89c6
[automerger skipped] Merge "ethernet: skip tests on devices without support" into android13-tests-dev am: 175881c63b -s ours
am skip reason: Merged-In Ie39cc371315899ead8c6991ef8d5e8b95cc0e3a8 with SHA-1 29d4aaabcf is already in history

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

Change-Id: I512f26895783285da5c284693d220296808e3f6f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Treehugger Robot   authored and   Automerger Merge Worker   commited 2022-09-15 00:52:29 +00:00
60e97267ac
[automerger skipped] ethernet: skip tests on devices without support am: bfeb1580a7 -s ours
am skip reason: Merged-In Ie39cc371315899ead8c6991ef8d5e8b95cc0e3a8 with SHA-1 29d4aaabcf is already in history

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

Change-Id: I619de7e27ecb53c8fecfccb8c6978dd677ac08de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Patrick Rohr   authored and   Automerger Merge Worker   commited 2022-09-15 00:52:27 +00:00
9f278d117b
Merge "ethernet: skip tests on devices without support" into android13-tests-dev
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-09-15 00:29:48 +00:00
175881c63b
[automerger skipped] DO NOT MERGE: DscpPolicy: remove post-T dependencies from test am: 4fdc5fda4a -s ours
am skip reason: skipped by user reminv

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

Change-Id: I43a754c377b24f6cd1f5dd3c8863923fe4e173a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2022-09-14 23:26:51 +00:00
85f5a62902
[automerger skipped] DscpPolicyTest: use tap instead of tun am: 8a42c7c674 -s ours
am skip reason: skipped by user prohr

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

Change-Id: Ifd2497672a814c19ebb40f45fc972051fe781318
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Patrick Rohr   authored and   Automerger Merge Worker   commited 2022-09-14 23:26:50 +00:00
6675ca1979
ethernet: skip tests on devices without support
Test: atest EthernetManagerTest
Bug: 239521025
Change-Id: Ie39cc371315899ead8c6991ef8d5e8b95cc0e3a8
Merged-In: Ie39cc371315899ead8c6991ef8d5e8b95cc0e3a8

Patrick Rohr   commited 2022-09-14 23:00:13 +00:00
bfeb1580a7
Merge "Revert "UpstreamNetworkMonitor: add NOTIFY_TEST_NETWORK_AVAILABLE""
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-09-14 14:25:13 +00:00
1949d98e81
Merge "EthernetTetheringTest: toggle wifi while test network is not selected"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-09-14 14:25:13 +00:00
4e81086326
Update xTS owners for cherry-pick purposes
Add owners to approve xTS changes that are cherry-picks
of changes already merged in aosp/master, as suggested
by current owners.

Also add LAST_RESORT_SUGGESTION to everyone except
lorenzo@, as only lorenzo@ is expected to approve the
original changes, so suggesting other reviewers would
most of the time not be helpful.

Change-Id: I3d04eab6dc5070e09840b9b9563d8955ed18669d
Test: m

Remi NGUYEN VAN   commited 2022-09-14 08:25:46 +00:00
84a8476c6d
Remove usage for deprecated ro.radio.noril
The ro.radio.noril system properties is not used anymore. Tests
that require to check if device supports wifi but not telephony
should verify it via PackageManager.hasSystemFeature(). Also
remove the systemProperties mocking since the only need for the
mocking is removed.

Bug: 242647857
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: Ie34e87394458e64a9363678a863d6d977834958f

chiachangwang   commited 2022-09-14 14:08:24 +08:00
4e8b49bee4
Switch to source-built GSON.
Bug: 243950468
Test: local build, presubmit
Change-Id: I806a9f32402a8aeb36d72e3dca2160c4d8ff92e8

Krzysztof Kosiński   commited 2022-09-14 05:51:44 +00:00
9d654aad5b
Bugfix:com.android.server.nearby.fastpair.cache.FastPairCacheManagerTest#getAllInfo fail
Test fails on MTS but works fine on Eng atest.
Ideally, save one DiscoveryItem, the size should be 1, save two items,
the size should be 2.
But in Eng atest, the result shows that there seems to be an extra DiscoveryItem stored in the
database. After investigation, found that the extra one is from another test case: saveRetrieveInfo, where another DiscoveryItem was saved to the database.
Since tests can be run in parallel, sometimes one test may run before or after another. So, it may have different test results.
Combining the two tests into a single test and letting them run sequentially solved the problem.

Bug: 238394647
Test: unit test
Change-Id: I9536ce6ad4fff78188f0ceb325d275b05aa47da4
Merged-In: I9536ce6ad4fff78188f0ceb325d275b05aa47da4

Qin Wang   authored and   Krzysztof Kosiński   commited 2022-09-14 05:50:51 +00:00
29db97b432
EthernetTetheringTest: toggle wifi while test network is not selected
Used to avoid flaky test because upstream changed events
order can't be guaranteed. Once tethering choose non-test
upstream {wifi, ..}, test network wont't be chosen.

Fix flaky tests which are using initTetheringTester():
testIcmpv6Echo
testTetherClatUdp
testTetherUdpV4_VerifyBpf
testTetherUdpV4
testTetherUdpV4Dns
testTetherUdpV6

Moreover, add permission ACCESS_WIFI_STATE to AndroidManifest.xml
to avoid nested runAsShell while using CtsNetUtils to access WIFI.

STACKTRACE:
java.lang.IllegalStateException: adoptShellPermissionIdentity calls must not be nested
at com.android.testutils.TestPermissionUtil.runAsShell(TestPermissionUtil.kt:49)
at com.android.testutils.TestPermissionUtil.runAsShell(TestPermissionUtil.kt:70)
at com.android.testutils.TestPermissionUtil.runAsShell$default(TestPermissionUtil.kt:65)
at com.android.testutils.TestPermissionUtil.runAsShell(Unknown Source:16)
at android.net.cts.util.CtsNetUtils.disconnectFromWifi(CtsNetUtils.java:293)
at android.net.cts.util.CtsNetUtils.disconnectFromWifi(CtsNetUtils.java:255)
at android.net.cts.util.CtsNetUtils.toggleWifi(CtsNetUtils.java:160)

Bug: 243314243
Test: atest EthernetTetheringTest
Change-Id: I814899ae71f5c302d490a0dd81d7210ac138faa5

Hungming Chen   authored and   Nucca Chen   commited 2022-09-14 04:03:24 +00:00
d09bb0773a
Merge "Add ServiceSpecificException to avoid system crash"
Junyu Lai   authored and   Gerrit Code Review   commited 2022-09-14 02:55:43 +00:00
2716323c86
Add native_dump to the Dependencies
This is a preparation for the upcoming CL that will add the test for
BpfNetMaps#dump.

Bug: 217624062
Test: dumpsys connectivity trafficcontroller, atest BpfNetMapsTest
Change-Id: I79aa6f6153dc94f806411c642d72f4801915a588

Motomu Utsumi   commited 2022-09-14 11:49:16 +09:00
df8d299ecc
Merge changes from topic "dump_map_status"
* changes:
  Move Interface index name map dump to NetworkStatsService
  Move stats map A/B dump to NetworkStatsService
  Add BpfInterfaceMapUpdater#getIfNameByIndex

Motomu Utsumi   authored and   Gerrit Code Review   commited 2022-09-14 01:27:49 +00:00
9e1675d38c
Make the hiddenapi*-tiramisu.txt files part of framework-connectivity-t
Previously, the hiddenapi*-tiramisu.txt files that were created as part
of the work for creating framework-connecvity-t were just added to the
list of hidden API files on the bootclasspath_fragment. Unfortunately,
that made it impossible to exclude those when generating an sdk
snapshot for S which cannot include framework-connectivity-t.

This change moves those files to be part of framework-connectivity-t
instead of the bcpf so that they will only be used in an sdk snapshot
when the library is part of the snapshot.

Bug: 240406019
Test: packages/modules/common/build/mainline_modules_sdks.sh
      # Ran the previous command with and without this change to make
      # sure that this change does not change the sdk snapshot
      # contents. A follow up change will exclude the
      # framework-connectivity-t library from the S sdk snapshot.
Change-Id: Ib5c5c6046d96b911c8e9e5ac3729ce963f1b6907

Paul Duffin   commited 2022-09-13 15:13:15 +00:00
c8164e4963
Merge "Fix TetheringServiceTest#testTetheringManagerLeak flaky"
KH Shi   authored and   Gerrit Code Review   commited 2022-09-13 11:16:13 +00:00
b259ee802f
Merge "EthernetTetheringTest: use EthernetManager to check iface before T"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-09-13 11:10:31 +00:00
f62267c7db
Add a field and score flag for first evaluation
A wifi network that is still evaluating, i.e. that doesn't know
yet if it's behind a captive portal, should not be preferred
to a network that yields to bad wifi because the stack doesn't
know yet if it's bad.

To rank the networks correctly, the ranker will therefore need
to know whether a network is still being evaluated. This patch
adds the time when this happened first to the NAI (as a
timestamp for debuggability) and the corresponding flag in
FullScore.

This doesn't have new tests because it doesn't yet expose
new behavior. Tests will come with the behavior.

Test: FrameworksNetTests
Change-Id: I737f314760356926fc07e6eef52f3c8abba2248b

Chalard Jean   commited 2022-09-13 19:33:30 +09:00
f9f4a8ddfe
Test no Internet and partial connectivity notifications.
Test: new unit tests pass
Change-Id: I363fa3ef15476a30e7b8708a80867dd456e5e520

Chalard Jean   commited 2022-09-13 19:33:26 +09:00
4c46308265
EthernetTetheringTest: use EthernetManager to check iface before T
For cuttlefish before T, TetheredInterfaceRequester may be responded
to over 200ms. That causes tests to become flaky. Using ethernet
manager to check available tethering interface instead of repeated
increases TetheredInterfaceRequester timeout
AVAILABLE_TETHER_IFACE_REQUEST_TIMEOUT_MS.

Bug: 243314243
Test: atest EthernetTetheringTest

Change-Id: I9cfab19adf1a54be82040da225c89b6570a36d4c

Hungming Chen   authored and   Nucca Chen   commited 2022-09-13 09:37:36 +00:00
f927fbae30
Fix TetheringServiceTest#testTetheringManagerLeak flaky
The clearance of the weak reference to TetheringManager can't be a
confirmation check of the completion running of its finalization.
The weak references to a weakly-reachable object will be cleared
before it becomes eligible for finalization. Calling of
System.runFinalization() method doesn't guarantee finalizers are
executed synchronously. In fact, finalizer of TetheringManager is
running in a different thread in this test.

GCs and finalizers behaviors could be vary on different JVMs.
Due to the unsynchronization, besides the weak reference of
TetheringManager, we need to add retries to the checking of
unregister Tethering internal callback as well.

Bug: 243340454
Test: atest TetheringServiceTest#testTetheringManagerLeak --iterations 10000
Change-Id: I8231146f26deb0825dadb70d8d0dbdc963989558

KH Shi   commited 2022-09-13 05:56:29 +00:00
b254987348
Merge "Improve the dependency declaration for Net tests"
Yike Zhang   authored and   Gerrit Code Review   commited 2022-09-13 04:42:15 +00:00
fd2ef76b7d
[automerger skipped] DscpPolicy Move to kernel 5.15 am: f8dbbdcb69 -s ours
am skip reason: Merged-In I2e4b509de1d8940fc63ae057a8326f13c0fd1420 with SHA-1 a8ca597aec is already in history

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

Change-Id: I9c77e241995ea7818218695bfffc1410c752458d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Tyler Wear   authored and   Automerger Merge Worker   commited 2022-09-12 18:27:23 +00:00
7b26dddf2b
Move Interface index name map dump to NetworkStatsService
Map status dump will do access check if map is null.
This could show different message from the current dump output.

Information in map content dump does not change
$ dumpsys connectivity trafficcontroller
....
     mIfaceIndexNameMap:
      ifaceIndex=5 ifaceName=ip6_vti0
      ifaceIndex=19 ifaceName=r_rmnet_data3
      ifaceIndex=17 ifaceName=r_rmnet_data1
      ifaceIndex=18 ifaceName=r_rmnet_data2
      ifaceIndex=23 ifaceName=wifi-aware0
....

$ dumpsys netstats
....
  BPF map content:
    ifaceIndex=5 ifaceName=ip6_vti0
    ifaceIndex=19 ifaceName=r_rmnet_data3
    ifaceIndex=17 ifaceName=r_rmnet_data1
    ifaceIndex=18 ifaceName=r_rmnet_data2
    ifaceIndex=8 ifaceName=rmnet_ipa0
....

Bug: 217624062
Test: dumpsys netstats, atest
com.android.server.net.BpfInterfaceMapUpdaterTest

Change-Id: If182bd97f72713b6347028668cf7bd4676b8aea4

Motomu Utsumi   commited 2022-09-12 16:53:51 +09:00
fdb601603d
Move stats map A/B dump to NetworkStatsService
Map status dump will do access check if map is null.
This could show different message from the current dump output.

Information in map content dump does not change
$ dumpsys connectivity trafficcontroller
....
      mStatsMapA:
      ifaceIndex ifaceName tag_hex uid_int cnt_set rxBytes rxPackets txBytes txPackets
      20 wlan0 0x0 1051 0 144 2 312 4
      10 rmnet_data0 0x0 0 0 0 0 48 1
      20 wlan0 0x0 0 0 0 0 136 2
      20 wlan0 0xffffff82 1051 0 144 2 312 4

      mStatsMapB:
      ifaceIndex ifaceName tag_hex uid_int cnt_set rxBytes rxPackets txBytes txPackets
....

$ dumpsys netstats
....
  mStatsMapA:
    ifaceIndex ifaceName tag_hex uid_int cnt_set rxBytes rxPackets txBytes txPackets
    20 wlan0 0x0 1051 0 144 2 312 4
    10 rmnet_data0 0x0 0 0 0 0 48 1
    20 wlan0 0x0 0 0 0 0 136 2
    20 wlan0 0xffffff82 1051 0 144 2 312 4
  mStatsMapB:
    ifaceIndex ifaceName tag_hex uid_int cnt_set rxBytes rxPackets txBytes txPackets
....

Bug: 217624062
Test: dumpsys netstats, dumpstate, atest NetworkStatsServiceTest

Change-Id: Ifbd45f0ad6dd9c519a15a7680cf0ea99fb5f5dcf

Motomu Utsumi   commited 2022-09-12 16:53:48 +09:00
608c32c782
Merge "Check automotive system feature on Constructor"
Paul Hu   authored and   Gerrit Code Review   commited 2022-09-12 07:36:33 +00:00
ab32bf8aa1
Add BpfInterfaceMapUpdater#getIfNameByIndex
Upcoming CL uses this to dump stats bpf map

Bug: 217624062
Test: atest com.android.server.net.InterfaceMapValueTest
com.android.server.net.BpfInterfaceMapUpdaterTest

Change-Id: I5454b6abbd9d84cb7e1dccaaa772d66726cfe3d0

Motomu Utsumi   commited 2022-09-12 15:03:18 +09:00
95e095dd0d
DO NOT MERGE: DscpPolicy: remove post-T dependencies from test
The DscpPolicyTest needs to be merged into CTS13 R2, so it cannot
always use APIs that were introduced after the T cutoff.

Run the test when the new APIs are available, but skip it otherwise as
the feature is known to be broken unless the device is using a newer
connectivity module.

DO NOT MERGE: should not be used for U+ tests.

Test: atest DscpPolicyTest
Bug: 243891394
Bug: 243120975
Change-Id: I86eeb7a008c6e299fdf7cb709844bc336f09bdfa

Remi NGUYEN VAN   commited 2022-09-12 05:39:10 +00:00
4fdc5fda4a