Commit graph android_packages_modules_Co.../thread/tests
Message SHA1
check the Thread required features before running ThreadNetworkControllerTest
This CL checks if the device supports Thread specific features before
running the test case ThreadNetworkControllerTest. If the device
doesn't support specific features, just skip the test case.

Bug: b/330879812
Test: atest ThreadNetworkIntegrationTests
Change-Id: I1452ab02cc62228102d4a140f39abf13b79542c7

Zhanglong Xia   commited 2024-03-26 13:20:24 +08:00
c1d4e1eea1
[mdns] support discovering and resolving services
Bug: 305866779
Test: atest ThreadNetworkIntegrationTests:android.net.thread.ServiceDiscoveryTest

Change-Id: I96ee5b835c90fa55136dbbde68d36bbf2044b420

Handa Wang   commited 2024-03-22 06:32:23 +00:00
abefbf0b9f
Merge "[Thread] fix ot-daemon state consistency issues" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-03-22 06:31:18 +00:00
3a9d363bdf
[Thread] fix ot-daemon state consistency issues
1. the OtDaemonState in OtDaemonCallbackProxy class is not cleared when
   ot-daemon dies
2. register ot-daemon state callback within the IOtDaemon#initialize API
   to avoid missing state changes between initialize() and
registerStateCallback()

Bug: 330441708
Change-Id: Ice58566582b40a6d25627cf01dec93da61ad3596

Kangping Dong   commited 2024-03-22 10:58:24 +08:00
0d22aded3d
[Thread] add system API setChannelMaxPowers
The `setChannelMaxPowers` allows privilege app to set the max
power of each channel. It is going to be used for controlling the
output power of the Thread radio chip.

Bug: b/320594263
Test: atest ThreadNetworkUnitTests && atest CtsThreadNetworkTestCases

Change-Id: Ic47eccd6de2da0e6cdb8f21d5b4df156b1f11747

Zhanglong Xia   commited 2024-03-22 10:49:09 +08:00
62abecc9b5
[Thread] add command to force stop ot-daemon
The Thread HAL supports only one client for a single Thread chip, so
ot-daemon needs to be force stopped in VTS tests because the testapp
needs to connect to the HAL service to perform tests.

Bug: 328538612
Change-Id: I5288e5747ab3957050d0e85c1ea684c6ead6c87d

Kangping Dong   commited 2024-03-21 19:02:39 +08:00
82599d3e21
[Thread] do not restart ot-daemon when Thread is disabled
Current implementation will auto-restart ot-daemon even when Thread
has been disabled by ThreadNetworkController#setEnabled(false). This
commit fixes this issue and also adds the "enable" / "disable" shell
command to ease testing.

Bug: 328538612
Change-Id: Icc9360ccf5d7daa6345def75d1860f046600b85b

Kangping Dong   commited 2024-03-20 23:49:53 +08:00
adb3c1ac62
Merge changes from topic "overlay-vendor-model-name" into main
* changes:
  [Thread] support customize meshcop txt via resourceoverlay
  [Thread] add resourceoverlay config for vendor and model name

Kangping Dong   authored and   Gerrit Code Review   commited 2024-03-19 12:21:23 +00:00
ab1945c790
[Thread] support customize meshcop txt via resourceoverlay
Currently support customizing the vendor name, vendor oui and model
name.

Bug: 311324956
Test: atest ThreadNetworkIntegrationTests:android.net.thread.ServiceDiscoveryTest#meshcopOverlay_vendorAndModelNameAreSetToOverlayValue
Change-Id: I3ad916112c73c3f8a7eef4e3fa8d421ab9bf8276

Kangping Dong   commited 2024-03-18 20:13:37 +08:00
ea4390cc4c
[Thread] unify synchronous controller API for testing
This commit creates the new `ThreadNetworkControllerWrapper` class to
unify the asynchronous version of the ThreadNetworkController API to
simplify Thread tests.

Test: atest ThreadNetworkIntegrationTests
Change-Id: Ibc6e6e2dad5041b092315aa0278915c137867488

Kangping Dong   commited 2024-03-18 19:17:02 +08:00
62eac0132d
Merge "Use a short timeout for FullThreadDevice.ping" into main
Kangping Dong   authored and   Gerrit Code Review   commited 2024-03-18 11:13:11 +00:00
c1df0d07dd
Use a short timeout for FullThreadDevice.ping
In the tests there may not be a reponse to ftd ping command, and the
function does not check for ping success. So using a short timeout of
0.1s to let the function finish faster.

This change also removed the additional start BR step in
unicastRouting_borderRouterSendsUdpToThreadDevice_datagramReceived as
this is already done in setUp().

Bug: 328144082

Test: atest ThreadNetworkIntegrationTests:android.net.thread.BorderRoutingTest
Change-Id: I18202c74596d4a08bc8238723049e05994cca659

Yang Sun   commited 2024-03-18 17:32:40 +08:00
4bf1dcd7f4
Merge "[Thread] use TestRule to filter Thread tests" into main
Kangping Dong   authored and   Gerrit Code Review   commited 2024-03-17 14:17:32 +00:00
f8ffba4c04
[Thread] use TestRule to filter Thread tests
It's error-prone to check dependent feature in both setUp() and
tearDown() to filter specific Thread tests. This commit adds
`ThreadFeatureCheckRule` and refactor the Thread tests to use the new
test rule to filter test cases.

Test: manually verified the annonated tests are skipped with
ASSUMPTION_FAILED when the dependency feature is not supported

Change-Id: I7a5efe6bda53fc1a6e204f6f40dd3ab2c3940988

Kangping Dong   commited 2024-03-16 20:00:40 +08:00
f1182f1057
Merge "Add reset API for NsdPublisher" into main
Handa Wang   authored and   Gerrit Code Review   commited 2024-03-15 15:00:01 +00:00
88dd959eef
Merge "[Thread] add CtsThreadNetworkTestCases to CTS" into main
Kangping Dong   authored and   Gerrit Code Review   commited 2024-03-15 13:31:05 +00:00
b2f8b5f87a
[Thread] add CtsThreadNetworkTestCases to CTS
Bug: 329561498
Merged-In: I07d78c0d375370aa83024e3e154b7841a5018e64
Change-Id: I5157ae990046efcba411d2b5498c0d16f0c5efcd

Kangping Dong   commited 2024-03-15 15:57:42 +08:00
60e06c4ac9
Add reset API for NsdPublisher
This is needed by `ot-daemon` to clear all registrations when
re-initializing the `ot-daemon`'s `Application` class.

Bug: 323301831

Change-Id: I5ed3d2d29b08f4187ac1f406052d362cf2249c19

Handa Wang   commited 2024-03-14 14:37:38 +00:00
da90deda1b
reduce the timeout for discovering the lost of MeshCoP service in CTS
This is to avoid exceeding the time limit of 60 seconds per test case.

Bug: 323301831

Change-Id: I4921740b2561d75d78084436b53c7bac8c01023c

Handa Wang   commited 2024-03-14 07:51:51 +00:00
e1545c3bca
Fix the issue that border routing is unavailable when ot-daemon restarts
Bug: 325771342
Test: atest ThreadNetworkIntegrationTests:android.net.thread.BorderRoutingTest

Change-Id: I60f41ef079167955d29d5e6f809ad2dd343c188b

Handa Wang   commited 2024-03-13 00:33:53 +00:00
aac3ef4da9
Check kernel version for multicast routing support.
Multicast routing is only supported on 14_5.15.0 and onwards. When sdk
version is 34+, thread is supported, if kernel version is e.g.
5.15.144-android13 then multicast routing is not supported so we need to
skip multicast routing tests.

Bug: 328133320

Test: atest ThreadNetworkIntegrationTests:android.net.thread.BorderRoutingTest
Change-Id: I5d67f4558b40ee3ec0569298c7c02726d5d19e98

Yang Sun   commited 2024-03-07 20:44:05 +08:00
734c626fea
Merge "Merge Android 14 QPR2 to AOSP main" into main
Xin Li   authored and   Gerrit Code Review   commited 2024-03-07 06:41:03 +00:00
612de50da2
Merge "Use factoryreset as a workaround to reduce the delay of reforming a network" into main
Handa Wang   authored and   Gerrit Code Review   commited 2024-03-07 06:23:21 +00:00
2aa81a6edc
Use factoryreset as a workaround to reduce the delay of reforming a
network

There's a defect in ot-daemon that re-forming a network after erasing
the persistent data will take longer delay. We can use the
`factoryreset` command to work this around so that the test cases take
less time.

Bug: 323301831
Bug: 328235705

Change-Id: I36e67fe0f7f1165a03e71397065a6166117acadb

Handa Wang   commited 2024-03-07 03:11:23 +00:00
b929c98c3c
[mdns] support regsitering hosts in NsdPublisher
This CL also adds an integration test case for the Advertising Proxy feature.
Currently the test case is disabled because it's unstable on some branches.
Will re-enable the test case when it's stable enough.

Bug: 318323473
Test: atest ThreadNetworkIntegrationTests:android.net.thread.ServiceDiscoveryTest
Change-Id: Ic88efb3b80640f95b53e4ec2428369e87be71649

Handa Wang   commited 2024-03-07 02:59:14 +00:00
c6037af2bf
Merge "Revert "[mdns] support regsitering hosts in NsdPublisher"" into main
Vaibhav Devmurari   authored and   Gerrit Code Review   commited 2024-03-06 14:48:13 +00:00
18b2cb9670
Revert "[mdns] support regsitering hosts in NsdPublisher"
Revert submission 2943805-nsdpublisher-publish-host

Reason for revert: Test failures: b/328384504

Reverted changes: /q/submissionid:2943805-nsdpublisher-publish-host

Change-Id: I5919fea68cae0d3817319994f43eb47e912f9157

Vaibhav Devmurari   authored and   Gerrit Code Review   commited 2024-03-06 12:15:11 +00:00
ba1cc3886e
Merge "Reduce time needed to run test." into main am: da42fec566
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2988131

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

Yang Sun   authored and   Automerger Merge Worker   commited 2024-03-06 02:31:26 +00:00
ab41a0442c
Merge "Reduce time needed to run test." into main
Yang Sun   authored and   Gerrit Code Review   commited 2024-03-06 02:18:46 +00:00
da42fec566
Merge "[mdns] support regsitering hosts in NsdPublisher" into main am: b7347bd441
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2943805

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

Handa Wang   authored and   Automerger Merge Worker   commited 2024-03-05 12:47:44 +00:00
abdaaebf47
Reduce time needed to run test.
The multicastRouting_infraNetworkSwitch_outboundPacketIsForwarded test
has been flaky due to it sometimes taking more than 66000ms. Make the test
execution time shorter by pinging one multicast address instead of two
from the ftd.

Bug: 328144082

Test: atest ThreadNetworkIntegrationTests:android.net.thread.BorderRoutingTest
Change-Id: I1a1b3526f49befa7c367a8e6c5eb86463f97e986

Yang Sun   commited 2024-03-05 16:05:09 +08:00
5104619c3f
[mdns] support regsitering hosts in NsdPublisher
This CL also adds an integration test case for the Advertising Proxy feature.

Bug: 318323473
Test: atest ThreadNetworkIntegrationTests:android.net.thread.ServiceDiscoveryTest

Change-Id: I626aa6250bc2cb94aee09067b4f8e6b14bd90fcf

Handa Wang   commited 2024-03-05 06:56:52 +00:00
87c688df4b
Merge "Update the imports to androidx.test.filters.*" into main am: 64a8fa9d13
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2983295

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

Ram Peri   authored and   Automerger Merge Worker   commited 2024-03-01 17:22:19 +00:00
7e6d34064a
Merge "Update the imports to androidx.test.filters.*" into main
Ram Peri   authored and   Gerrit Code Review   commited 2024-03-01 16:38:04 +00:00
64a8fa9d13
Update the imports to androidx.test.filters.*
Bug: 316941721
Test: mmma .
Change-Id: I113714afaeb99bf76ff4dc19304371ad0ec097e0

Fangqiu Su   commited 2024-02-29 17:56:14 +00:00
61a14ca475
Merge "Use a TAP test network for MeshCoP service test cases" into main am: 2b071e919b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2983811

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

Handa Wang   authored and   Automerger Merge Worker   commited 2024-02-29 08:38:38 +00:00
733dbc54da
Merge "Use a TAP test network for MeshCoP service test cases" into main
Handa Wang   authored and   Gerrit Code Review   commited 2024-02-29 07:56:37 +00:00
2b071e919b
Merge "Fix flaky multicast tests in Thread E2E test." into main am: f141b6ec7c
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2983812

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

Yang Sun   authored and   Automerger Merge Worker   commited 2024-02-29 06:25:25 +00:00
d2610c4ee8
Use a TAP test network for MeshCoP service test cases
Previously we were using TUN test network which is not eligible for mDNS
operations. The tests are flaky because we need to depend on other test
cases to connect to WiFi, which is not guaranteed. We'll use the TAP
test network to fix it.

Bug: 327306555
Bug: 327306158
Bug: 327306608
Test: https://android-build.corp.google.com/builds/abtd/run/L70000030002206431

Change-Id: Ie8ed0ee8b8208150efcd4424ed26e9ca7d85fd82

Handa Wang   commited 2024-02-29 04:49:56 +00:00
9f417260cf
Fix flaky multicast tests in Thread E2E test.
Bug: 327526332

Test: atest
ThreadNetworkIntegrationTests:android.net.thread.BorderRoutingTest
--iterations 10

Change-Id: I70f968e737e8540a27b8ce7c03dc0e3e1bf26b56

Yang Sun   commited 2024-02-29 11:24:09 +08:00
e23bb41c73
Merge "Revert "Use a TAP test network for MeshCoP service test cases"" into main am: e816bb776a
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2983551

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

Handa Wang   authored and   Automerger Merge Worker   commited 2024-02-29 02:28:48 +00:00
cc08f925d6
Merge "Revert "Use a TAP test network for MeshCoP service test cases"" into main
Handa Wang   authored and   Gerrit Code Review   commited 2024-02-29 01:44:18 +00:00
e816bb776a
Revert "Use a TAP test network for MeshCoP service test cases"
This reverts commit 55648268de.

Reason for revert: DroidMonitor revert

Change-Id: Idd86b0ceb18fc425c39fe3c75603a472568eabe1

Joseph Murphy   authored and   Gerrit Code Review   commited 2024-02-28 21:56:27 +00:00
8f0e34be48
Merge "Use a TAP test network for MeshCoP service test cases" into main am: 5b3bf1adef
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2981594

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

Treehugger Robot   authored and   Automerger Merge Worker   commited 2024-02-28 18:31:12 +00:00
43f0af3f97
Merge "Use a TAP test network for MeshCoP service test cases" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-02-28 17:23:16 +00:00
5b3bf1adef
Merge "[Thread] make Thread state customisable via resource overlay" into main am: 5ce2519a3e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2916726

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

Kangping Dong   authored and   Automerger Merge Worker   commited 2024-02-28 16:40:29 +00:00
19a5a97420
Merge "[Thread] make Thread state customisable via resource overlay" into main
Kangping Dong   authored and   Gerrit Code Review   commited 2024-02-28 16:28:55 +00:00
5ce2519a3e
Merge "[BBR] Apply downstream multicast config sent from ot-daemon" into main am: aa26b685f7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2920825

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

Yang Sun   authored and   Automerger Merge Worker   commited 2024-02-28 15:11:42 +00:00
820ab56ee5
Use a TAP test network for MeshCoP service test cases
Previously we were using TUN test network which is not eligible for mDNS
operations. The tests are flaky because we need to depend on other test
cases to connect to WiFi, which is not guaranteed. We'll use the TAP
test network to fix it.

Bug: 327306555
Bug: 327306158
Bug: 327306608

Change-Id: Ia6de8a507578dbdeea4a7ceaf52f417acf35baa2

Handa Wang   commited 2024-02-28 14:30:22 +00:00
55648268de
Merge "[BBR] Apply downstream multicast config sent from ot-daemon" into main
Yang Sun   authored and   Gerrit Code Review   commited 2024-02-28 14:15:46 +00:00
aa26b685f7