Commit graph

1758 commits

Author SHA1 Message Date
Kenn Frankel
ae3f1fb976 Convert Nlinterceptor HAL to Vendor Apex (CF)
Bug: 300011249
Test: atest VtsHalNetlinkInterceptorV1_0Test

Change-Id: I521877b24354ff95eb941daf314ca1f14d37bd70
2023-11-01 22:58:04 +00:00
Xin Li
e4d528153d Merge "Merge android14-tests-dev" into main 2023-10-26 20:11:38 +00:00
Xin Li
11ee4fea87 Merge android14-tests-dev
Bug: 263910020
Merged-In: I770dc5620648df2eab608e030c5e76cf190f315d
Change-Id: If4fe726d538386d70061e8051299d8fb393ef5df
2023-10-10 16:17:14 -07:00
Jooyung Han
3efe294141 Cleanup: use shared apex_key (wifi HAL APEX)
Bug: 296524155
Test: m
Change-Id: Id1bdc3614cf0387f726211c4b8e04909879198eb
2023-10-10 15:49:06 +09:00
Ye Jiao
2236b96bf4 Disable Wi-Fi framework during VTS
When VTS case kills supplicant in SetUp, Wi-Fi framework will trigger
recovery process and causes races between VTS and Wi-Fi framework.

Disable Wi-Fi framework using 'cmd wifi' in SetUp.

Bug: 297820612
Test: run vts -m VtsHalWifiHostapdV1_0TargetTest with new case
(cherry picked from https://android-review.googlesource.com/q/commit:46538346af90bf93dcafa36206fc2ea5c545dd93)
Merged-In: I5ea7f00cfebf79021185f66766454d053c973b31
Change-Id: I5ea7f00cfebf79021185f66766454d053c973b31
2023-09-26 16:35:18 +00:00
Gabriel Biren
93ce27b837 Merge "Disable Wi-Fi framework during VTS" into main am: bddf425784
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2728874

Change-Id: Idf7f13190d2e731afa4633b7bc31437ae2ed0ed3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-25 23:41:06 +00:00
Gabriel Biren
ff914778ef Rename toggleWifiFramework in the Hostapd
AIDL test utils in order to avoid having
an ambigous function call.

aosp/2728874 adds a method of the same
name, which is causing pre-submit issues.

Bug: 297820612
Test: atest VtsHalHostapdTargetTest
Change-Id: Ie4da0a0037e7411e7908401f021b48246ea227bd
Merged-In: Ie4da0a0037e7411e7908401f021b48246ea227bd
(cherry picked from commit 94950dc20d)
2023-09-15 16:59:29 +00:00
Ye Jiao
46538346af Disable Wi-Fi framework during VTS
When VTS case kills supplicant in SetUp, Wi-Fi framework will trigger
recovery process and causes races between VTS and Wi-Fi framework.

Disable Wi-Fi framework using 'cmd wifi' in SetUp.

Bug: 297820612
Test: run vts -m VtsHalWifiHostapdV1_0TargetTest with new case
Change-Id: I5ea7f00cfebf79021185f66766454d053c973b31
2023-09-14 01:19:47 +00:00
Ryan Prichard
3cef7f7bfe Merge "[RESTRICT AUTOMERGE] Undefine NAN before defining it again" into main 2023-09-07 21:09:05 +00:00
Sunil Ravi
2079fbcd04 wifi: set join to true in p2p connect tests am: 858665687d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2743883

Change-Id: I961f6a8cc9569ad401a1df41f252325f94392350
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-07 02:41:10 +00:00
Ryan Prichard
4dcd87fbef [RESTRICT AUTOMERGE] Undefine NAN before defining it again
After upgrading libc++, math.h happens to be included at the point
where this file tries to define NAN. Redefining a macro to a different
value is an error, but #undef'ing a macro is OK even if the macro isn't
actually defined.

Bug: b/175635923
Test: treehugger
Change-Id: Ie8e3e87189bcd7ed8fccccfc0a79e04a5bfda16b
Merged-In: Ie8e3e87189bcd7ed8fccccfc0a79e04a5bfda16b
2023-09-06 18:42:10 -07:00
Ryan Prichard
99a4f3cf62 Undefine NAN before defining it again
After upgrading libc++, math.h happens to be included at the point
where this file tries to define NAN. Redefining a macro to a different
value is an error, but #undef'ing a macro is OK even if the macro isn't
actually defined.

Bug: b/175635923
Test: treehugger
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:dd390faa2fcb49ce0e0ebc6ef180118ec370f957)
Merged-In: Ie8e3e87189bcd7ed8fccccfc0a79e04a5bfda16b
Change-Id: Ie8e3e87189bcd7ed8fccccfc0a79e04a5bfda16b
2023-09-07 01:41:11 +00:00
Sunil Ravi
858665687d wifi: set join to true in p2p connect tests
After adding ag/21179155, auto join flag is
not set for every p2p connect command. The tests
are passing an unknown peer MAC address to connect(). To
pass the tests, the connect should trigger a scan and
try to find this unknown mac address. So set join flag
to true to run the same scan logic.

Bug: 298310537
Bug: 268236829
Bug: 218608010
Test: atest VtsHalWifiSupplicantP2pIfaceTargetTest
Change-Id: Id5baa0f599d11a3563780aae15ff3cea0407060c
Merged-In: Id5baa0f599d11a3563780aae15ff3cea0407060c
2023-09-06 23:30:32 +00:00
Nethaji B
e20d2cc6e7 Skip wifi AP tests, if AP feature is not supported am: 6eab68a9e6 am: 7d5727bf65 am: 37fb2fe77d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2740896

Change-Id: I5e37d8c9f66ba3d54ad62a969735397db3d4d228
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 18:58:07 +00:00
Nethaji B
1c2d61fa57 Skip wifi AP tests, if AP feature is not supported am: 6eab68a9e6 am: 7d5727bf65
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2740896

Change-Id: Ie0b7bdaf3d9d907b969e40cae85d566bc1f15048
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 18:05:25 +00:00
Nethaji B
37fb2fe77d Skip wifi AP tests, if AP feature is not supported am: 6eab68a9e6 am: 7d5727bf65
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2740896

Change-Id: I4eade72a9c5fa16035382a52ed1d6be69edd67e7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 18:00:56 +00:00
Nethaji B
7d5727bf65 Skip wifi AP tests, if AP feature is not supported am: 6eab68a9e6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2740896

Change-Id: I653411aa1c02a8025c145444b6ee1f749116ee39
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 17:17:15 +00:00
Nethaji B
6eab68a9e6 Skip wifi AP tests, if AP feature is not supported
- Added API to check wifi chip supports AP interface
- Check AP support as a precondition for AP related TCs

Bug: 284925541
Test: atest VtsHalWifiApV1_5TargetTest
Change-Id: I1121d7b787ed972980bab0e05a52f3ca2f3d0a24
2023-09-05 19:56:15 +00:00
Gabriel Biren
c6cacf6149 Use the hostapd_test_utils helper methods in
the Hostapd AIDL VTS tests.

At the beginning of each test, we now:
 1. Disable the Wifi framework, Hostapd, and Vendor HAL.
 2. Enable the Hostapd and Vendor HAL.

At the end of each test, we now:
 1. Disable the Hostapd and Vendor HAL.
 2. Enable the Wifi framework.

Bug: 283402709
Test: atest VtsHalHostapdTargetTest --iterations 10
       # Tested on both an Android T and U device.
       # All tests passed in both cases.
Change-Id: I8b5e24ad44d13fad09d84f1b212e60ca8df3aa7e
2023-08-30 19:11:00 +00:00
Gabriel Biren
3454ce179a Add hostapd_test_utils helper methods for the
Hostapd AIDL VTS tests.

Main purpose will be to enable/disable the
HALs and Wifi framework before and after
each test.

Bug: 283402709
Test: atest VtsHalHostapdTargetTest
Change-Id: Ib3ceca4ad25f472e1b75fa95661235c880a489fd
2023-08-30 19:09:30 +00:00
Jaewan Kim
5b454f372e Disable verbose nlinterceptor log
Test: No verbose log on Cloud Android with Wi-Fi is turned on
Bug: 256518068
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7df5c1c34538d1e051dc3df63fcba563e40713c8)
Merged-In: I062e698b64114f139997cd24b16f90dd52048247
Change-Id: I062e698b64114f139997cd24b16f90dd52048247
2023-08-10 18:03:56 +00:00
Gabriel Biren
4c3eeb417e Use a 64-bit instance of 0x1 when creating
the event bitmask.

Comments on ag/24025770 suggest that the bit
shift will lead to undefined behavior for
event codes greater than 31.

Bug: 290318208
Test: atest VtsHalWifiNanIfaceTargetTest
       # manually set some of the expected
       # events codes to > 31 to verify that
       # the bit shift works as expected
Change-Id: I09e11dac8acf90baf047e24cebe1d01970b1dc8a
2023-07-13 19:46:59 +00:00
Gabriel Biren
3f7bfd2dc5 Represent NAN callback events as a bitmap
to better handle overlapping events.

Reimplementation of aosp/2473685 for
the AIDL VTS tests.

Bug: 290318208
Test: atest VtsHalWifiNanIfaceTargetTest
Change-Id: I1a0e6ab8dd529c10fcec8f26424a7181e7d91568
2023-07-11 22:23:34 +00:00
Yuyang Huang
54bbf07e06 Add TV devices that have MdnsOffloadManagerService to APF exempt list
For Panel TV devices, the vendor can implemented TV specific mDNS
offload instead of APF in U. If TV specific mDNS offload is implemented.
MdnsOffloadManagerService will exist in the system ext partition. The
APF vts will be skipped if MdnsOffloadManagerService exist.

Bug: 283038712
Test: atest VtsHalWifiStaIfaceTargetTest
Change-Id: If55ec42507460b9a2c6eee683d85b8109f2af236
2023-06-28 02:24:35 +00:00
Gabriel Biren
0f1628e1ac Merge "Set the value of using_dynamic_iface_combination_ in the WifiChip constructor." into udc-dev 2023-06-16 20:58:26 +00:00
Gabriel Biren
01cf38f349 Merge "Improve process to run the Vendor HAL gTest suite." into udc-dev 2023-06-15 00:12:52 +00:00
Gabriel Biren
80f5392763 Improve process to run the Vendor HAL gTest suite.
This includes:
 - Adding a README to help users get started.
 - Improving the test script to avoid issue where
   device is not ready for the next ADB command
   after 'adb root'.

Bug: 271914366
Test: Manual test
       1. Reboot device.
       2. ./runtests.sh
       3. Tests are expected to execute.
Change-Id: I9f452384a7067708f617d1e932f06b2f5c7ab119
2023-06-14 22:53:28 +00:00
Gabriel Biren
989c78a51f Set the value of using_dynamic_iface_combination_
in the WifiChip constructor.

gTest suite currently cannot mock the legacy HAL
call for getSupportedIfaceConcurrencyMatrix.
If we set using_dynamic_iface_combination_ to true
in the unit tests, we can avoid making this call.

Bug: 271914366
Test: ./runtests.sh # gTest
Test: atest VtsHalWifiChipTargetTest # VTS
Change-Id: Ic43daab6ff5fdc5f78af614ad775f436fbbe8726
2023-06-14 22:45:29 +00:00
Gabriel Biren
b354c89236 Merge "Add a new utility class wifi_hidl_test_utils_1_6 for the Wifi VTS tests." 2023-06-07 15:49:51 +00:00
Gabriel Biren
eadd5160d8 Add a new utility class wifi_hidl_test_utils_1_6
for the Wifi VTS tests.

Main method is getBridgedWifiApIface_1_6, which
allows us to configure the chip based on the
Bridged AP IfaceConcurrencyType, rather than
the AP IfaceType like in getBridgedWifiApIface_1_5.

Implementations were largely copied from
wifi_hidl_test_utils and wifi_hidl_test_utils_1_5.

Bug: 283402709
Test: atest VtsHalHostapdTargetTest
       # tested on a Bluejay device that supports
       # the AddAccessPointWithDualBandConfig test
Change-Id: I2571876149fc14c8de02e1cec9934dd052cada5c
Merged-In: I2571876149fc14c8de02e1cec9934dd052cada5c
2023-06-06 22:09:59 +00:00
Gabriel Biren
a2482fde1a Add a new utility class wifi_hidl_test_utils_1_6
for the Wifi VTS tests.

Main method is getBridgedWifiApIface_1_6, which
allows us to configure the chip based on the
Bridged AP IfaceConcurrencyType, rather than
the AP IfaceType like in getBridgedWifiApIface_1_5.

Implementations were largely copied from
wifi_hidl_test_utils and wifi_hidl_test_utils_1_5.

Bug: 283402709
Test: atest VtsHalHostapdTargetTest
       # tested on a Bluejay device that supports
       # the AddAccessPointWithDualBandConfig test
Change-Id: I2571876149fc14c8de02e1cec9934dd052cada5c
Merged-In: I2571876149fc14c8de02e1cec9934dd052cada5c
2023-06-06 22:08:48 +00:00
Gabriel Biren
5df702513f Merge "Add a new utility class wifi_hidl_test_utils_1_6 for the Wifi VTS tests." into udc-dev 2023-06-06 20:01:57 +00:00
Gabriel Biren
cd6da07327 Add a new utility class wifi_hidl_test_utils_1_6
for the Wifi VTS tests.

Main method is getBridgedWifiApIface_1_6, which
allows us to configure the chip based on the
Bridged AP IfaceConcurrencyType, rather than
the AP IfaceType like in getBridgedWifiApIface_1_5.

Implementations were largely copied from
wifi_hidl_test_utils and wifi_hidl_test_utils_1_5.

Bug: 283402709
Test: atest VtsHalHostapdTargetTest
       # tested on a Bluejay device that supports
       # the AddAccessPointWithDualBandConfig test
Change-Id: I2571876149fc14c8de02e1cec9934dd052cada5c
2023-06-05 22:52:52 +00:00
Treehugger Robot
5d806f5adb Merge "wifi: Fix single AP iface isn't deleted" into udc-dev 2023-06-02 03:36:59 +00:00
Sunil Ravi
780bef050a wifi: Fix single AP iface isn't deleted
Bug: 222599182
Bug: 278808480
Test: Manual Test, the AP iface is deleted.
Change-Id: I07faf0afcd1f69af4ef57204ceac02c2572453f2
2023-06-01 21:54:24 +00:00
Gabriel Biren
9c7ff0f4e0 Skip HIDL v1.6 RTT responder VTS tests if the
capabilities do not indicate responder support.

Bug: 280550766
Test: atest VtsHalWifiRttV1_6TargetTest
Change-Id: I4e76a874837c6199b2bef65b3f0c138260972b4a
(cherry picked from commit e8aca0a7aa)
2023-05-23 16:40:08 +00:00
Gabriel Biren
e8aca0a7aa Skip HIDL v1.6 RTT responder VTS tests if the
capabilities do not indicate responder support.

Bug: 280550766
Test: atest VtsHalWifiRttV1_6TargetTest
Change-Id: I4e76a874837c6199b2bef65b3f0c138260972b4a
2023-05-22 18:58:06 +00:00
Yuyang Huang
5c3c6483d3 Update APF VTS to include the vendor API level check
APF is support is mandatory since VSR 14. Before that, the APF
requirement is optional. Vendors can opted into upgrading their
HAL to AIDL, so the VTS need to check if vendor API level on the device
and only mandate the APF capability check if the vendor API level is
greater or equal to 14.

Bug: 283181837
Test: atest VtsHalWifiStaIfaceTargetTest
Change-Id: I21513187d4ca99d721d0e9dc5e243adad77ab8c6
2023-05-18 18:11:56 +09:00
TreeHugger Robot
a60e28c818 Merge "Remove unused wifi offload HAL." into udc-dev 2023-05-13 02:22:28 +00:00
Gabriel Biren
8e9d701b56 Remove unused wifi offload HAL.
Bug: 280901687
Test: m
Change-Id: Iad9a2c470b27fbe5432fd5a88244162f8f73a71c
2023-05-11 01:07:42 +00:00
maheshkkv
0ace7e5f91 Add documentation for Aware suspend & resume
Bug: 281882132
Test: build
Change-Id: Ifea3dd9a0bd635c95e3b80f09427d380b75e0fa9
2023-05-10 17:01:24 -07:00
Gabriel Biren
4f9c93276d Merge "Skip HIDL v1.6 RTT responder VTS tests if the capabilities do not indicate responder support." into udc-dev 2023-05-09 23:28:34 +00:00
Gabriel Biren
6eafc23dcf Skip HIDL v1.6 RTT responder VTS tests if the
capabilities do not indicate responder support.

Bug: 280550766
Test: atest VtsHalWifiRttV1_6TargetTest
Change-Id: I4e76a874837c6199b2bef65b3f0c138260972b4a
2023-05-08 18:29:10 +00:00
Gabriel Biren
6d41484860 Skip RTT responder VTS tests if the capabilities
do not indicate responder support.

Bug: 280550766
Test: atest WifiRttControllerAidlTest
Change-Id: I343dc3f2729274db5628f54501b89a470a512206
2023-05-03 22:11:51 +00:00
Gabriel Biren
8fddf60046 Merge "Fix VtsHalWifiSupplicantP2pIfaceTargetTest failed issue" into udc-dev 2023-04-26 15:56:54 +00:00
zhengyu.zhan
38bff8b0c7 Fix VtsHalWifiSupplicantP2pIfaceTargetTest failed issue
supplicant_test_utils::initializeService() only stop Supplicant,
don't start it. refer Android T code, It should start Supplicant
when initializeService().

Bug: 279572212
Test: VtsHalWifiSupplicantP2pIfaceTargetTest pass

Change-Id: I9f4b3e21ee0865eb95d71f7f832b2eb405de9607
2023-04-25 22:17:28 +00:00
Gabriel Biren
fce371b9b5 Add a lock around any public methods in
the AidlCallbackHandler.

Bug: 278433745
Test: Start wifi.
Change-Id: I2b143b9e8671eaf8c63c5623c09d2a04f914a772
2023-04-21 18:15:16 +00:00
Sunil Ravi
abb157f297 Merge "wifi: Skip SetStrictConversativePeerMode VTS test" into udc-dev 2023-04-17 18:38:55 +00:00
Sunil Ravi
974a74d896 wifi: Skip SetStrictConversativePeerMode VTS test
SetStrictConversativePeerMode HAL API is added in
AIDL version 2. So if the HAL interface version is
less than 2, skip the test.

Bug: 278169264
Bug: 277318919

Test: atest VtsHalWifiSupplicantStaNetworkTargetTest
Change-Id: I7f8ace88b0f37679ecaedd5370b47e220c437d50
2023-04-15 01:10:46 +00:00
Yuyang Huang
b37f9a8a83 Add @VsrTest annotation to Apf test
Bug: 259309511
Test: atest VtsHalWifiStaIfaceTargetTest
Change-Id: I860e7bff6a31ae7871a6041ab76c2c685b7c8c38
2023-04-14 12:26:32 +09:00