Commit graph

1775 commits

Author SHA1 Message Date
Kenn Frankel
51f4d2506d Merge "Convert Nlinterceptor HAL to Vendor Apex (CF)" into main am: cf4cbd0b9b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2798153

Change-Id: I5ade17306ca8aca2d6720f06fa45f8402d288e9b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-07 19:41:22 +00:00
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
84fe582d6e Merge 10952656
Merged-In: I27fe6f65f491db9d88710cf163eba12079499a09
Change-Id: I0c62786a40dd3c2d042929c7cb2e4334169bef84
2023-10-17 10:08:42 -07: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
0fc404280f Merge "Disable Wi-Fi framework during VTS" into main am: bddf425784 am: 93ce27b837 am: 369df82b89 am: 36b3a962ab
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2728874

Change-Id: I65c0ce4ff152b3e65a1ef6003358a36ba817e514
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-26 02:12:26 +00:00
Gabriel Biren
369df82b89 Merge "Disable Wi-Fi framework during VTS" into main am: bddf425784 am: 93ce27b837
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2728874

Change-Id: Idad98c56ad219fd26f7e26e4b1c66df90d35646c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-26 00:37:32 +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
e8566c8e7d Rename toggleWifiFramework in the Hostapd am: ff914778ef am: bec9c969af am: ad2bd3d243 am: 615ebc2a61
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/24772977

Change-Id: If874fd8070b54df8534b46f478329c29156f1c7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-15 21:40:44 +00:00
Gabriel Biren
615ebc2a61 Rename toggleWifiFramework in the Hostapd am: ff914778ef am: bec9c969af am: ad2bd3d243
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/24772977

Change-Id: Ia0bdba896a535b74cad394ea50f43426fbe7082a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-15 20:57:14 +00:00
Gabriel Biren
11d6365d10 Rename toggleWifiFramework in the Hostapd am: ff914778ef am: bec9c969af
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/24772977

Change-Id: I3c9029c58e34759df9d75ab01357b90bb3273782
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-15 19:56:20 +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
c5ba9b1abd Merge "Undefine NAN before defining it again" into aosp-main-future am: 236bbe3305 am: 3e5ee9a6e6 am: 5742e2ba25
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/24685603

Change-Id: I262b7ff132cfcd1bd8d21d6528d13d76fc075998
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-07 22:48:54 +00:00
Ryan Prichard
3e5ee9a6e6 Merge "Undefine NAN before defining it again" into aosp-main-future am: 236bbe3305
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/24685603

Change-Id: I69ab8927b8f8b4fc4ad559c9a65a8f4a58a4e893
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-07 21:23:50 +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
176cedc0bd Skip wifi AP tests, if AP feature is not supported am: 6eab68a9e6 am: 7d5727bf65 am: 1c2d61fa57 am: 5c5332f235 am: b9a3ec5cba am: ed306b3146
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2740896

Change-Id: I41b03e86b5961f0223a4cdb2b94096fc5649bda8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 21:08: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
639d0d8f06 Use the hostapd_test_utils helper methods in am: c6cacf6149 am: b2d1a3b4c7 am: 9af8f6c18d am: b17aeef124
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/24589850

Change-Id: I5e17279bc315ec1cadfe7bee661d96698899dd5a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-01 05:32:13 +00:00
Gabriel Biren
ae1b183f6a Add hostapd_test_utils helper methods for the am: 3454ce179a am: b3a1c6260f am: 1539083a4d am: 61ae64167c
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/24589589

Change-Id: Iaa985dfcb8d07e95e940731c0e35c9f5f0a15687
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-01 05:32:10 +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
maheshkkv
236b04d3c3 Fix Legacy to AIDL conversion for link state
Bug: 296807191
Test: hardware/interfaces/wifi/aidl/default/tests/runtests.sh
Change-Id: Iea60d7894b22558b386f62a77ff43aa374b6c40f
2023-08-22 17:52:00 +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
1f06b4bf76 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 18:24:14 +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
Gabriel Biren
3a34c72b61 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 21:23:31 +00:00
Yuyang Huang
50c033fe79 Merge "Add TV devices that have MdnsOffloadManagerService to APF exempt list" into stage-aosp-udc-ts-dev am: 32d8479f86 am: 5d0f680ed9 am: 8d0d289758
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/23831006

Change-Id: Id4fd3f80c084f5d0d9a597035934f1aa0b7978d1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-30 08:36:10 +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
Ye Jiao
84310761ce Fix memory leak in WifiLegacyHal.
`WifiLegacyHal::getSupportedRadioCombinationsMatrix()`
allocs a buffer and returns it to
`WifiChip::getSupportedRadioCombinationsInternal()`, but
`WifiChip::getSupportedRadioCombinationsInternal()` never frees it.

Bug: 287883356
Test: manually test
Change-Id: I0e9d529e93cbb5fe254d48947661a2ae3d99d763
2023-06-21 23:03:34 +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