Age | Commit message (Collapse) | Author |
|
Bug: 259462957
Test: Compiles
Change-Id: Iade712396d653f924a500d3c1d1d20eb41699c3f
|
|
Test: m rust
Bug: 241303140
Merged-In: I8d250f541c99c619a750ec8b9ee5870335994268
Change-Id: I8d250f541c99c619a750ec8b9ee5870335994268
|
|
Message control and subsession key are fields required when Provisioned
STS is used. But, we cannot directly add these fields because of
backward compatability. So we come up with this workaround to fix the
compatability problem: when using provisioned STS, we will switch the
command from SessionUpdateControllerMulticastList to
SessionUpdateControllerMulticastListV2.
Test: atest ServiceUwbTests, libuwb_uci_rust_tests,
libuwb_uci_packet_tests
Bug: 232453347
Bug: 231581242
Change-Id: Id2bded30b073eea46c6cb803c693806dea3823a3
|
|
This test would fail on average every 2nd run when ran on a device. This
was due to a race condition between UwbEvent::ERROR event and the test method
dropping and thus invoking
assert!(self.expected_calls.lock().unwrap().is_empty()) from
mock_adaptation Drop too early.
To fix it I sent another event UwbEvent::CLOSE_CPLT at the end which is
processed only after the ERROR event, and since sending CLOSE_CPLT event
exits the dispatcher this enables calling
dispatcher.wait_for_exit() which then makes sure the test method doesn't
drop before both events get processed.
Bug: 251879446
Test: atest libuwb_uci_rust_tests --rerun-until-failure 20
Change-Id: If30794d6cff3c0130b4675af0eead27777803df8
|
|
This fixes a race condition where multiple UwbEvents CLOSE_CPLT were
sent to hal at the same time. In cases where the wrong call got executed
first, the list of expected events in mock_adaptation object weren't
properly cleared. This caused
assert!(self.expected_calls.lock().unwrap().is_empty()) implemented on
Drop to fail.
This fix removes the second unnecessary call to hal with CLOSE_CPLT since the same call will be made by calling dispatcher.send_jni_command(JNICommand::Disable(true).. after properly clearing the expected calls list.
Bug: 250003544
Test: atest libuwb_uci_rust_tests --retry-until-failure 20
Change-Id: I675519deb74b930d65f68c77a6e079cfa3c3f06c
|
|
The result of Enable Uwb was not handled. For now, if it fails to enable
uwb, the error will be sent back to JNI layer.
Test: libuwb_uci_rust_tests
Bug: 236139368
Change-Id: I4c81dab1cd1d6f2f0427ffa513eef915c3ec0a63
|
|
tm-mainline-prod
|
|
Test: atest libuwb_uci_rust_tests
Bug: 236969605
Change-Id: I41b32eff1b584df397c7d97499da657b1b0672ec
|
|
Bug: 238366471
Test: atest
Change-Id: Ia090d6933ce2d7520ae63a60bd6616120620d6c3
|
|
IUwbChip implementation based on the chip name.
Include chip_id in jni and uci callbacks.
Bug: 205605642
Test: atest libuwb_core_tests
Test: atest libuwb_uci_packet_tests
Test: atest libuwb_uci_rust_tests
Change-Id: I2a7053b2eed26e71a580b2b72f15c67b5dfd2458
Merged-In: I2a7053b2eed26e71a580b2b72f15c67b5dfd2458
|
|
As a part of the stack recovery, we toggle off UWB & then start it
again. This fails currently because the native stack does not exit as
expected on doDenitialize(). This was because the HAL close API fails
(because the HAL is dead) and we would not receive the HAL close
completed callback. So, instead exit the native stack immediately if the
HAL close invocation fails for some reason.
Bug: 236392438
Test: Manual steps:
1. Start a ranging session.
2. Kill vendor HAL.
3. Wait for recovery.
4. Start a new ranging session and ensure that it succeeds.
Change-Id: I709ead843a9632147a131b9ba80c08b0f4658624
|
|
i. Move all Mocks to separate files.
ii. Add #cfg(tests) or #cfg(tests, fuzzing) for all mocks.
Bug: 229275354
Test: make uwb_uci_rust_fuzzer libuwb_uci_rust_tests
Change-Id: Id6bc6631d034112a7f0aa603b120184a01da046d
|
|
Otherwise, this leads to race conditions in the lower layers since they
might still be cleaning up (from the toggle off) when we reinitializae
(for the toggle on).
Also,
i. Removed JNICommand::Exit since we don't need an explicit message to
exit the looper.
ii. Make Disable non-blocking since we are anyway waiting for the
close_cplt callback from doDeinitialize().
iii. Changed unit tests to assert on failures instead of returning
Result.
iv. Remove redundant setup_dispatcher helper method in unit tests.
Bug: 228347909
Test: atest libuwb_uci_rust_tests
Test: Manual tests
Change-Id: I3cb1b7b7cff7840a19c14c1fa07c03dd1f3e89ef
|
|
Also,
i. Fixed some errors in the PDL unit tests (which were not caught
before some reason!)
ii. Initialized logging for each test to ensure that we can get erorr
logs for debugging unit test failures.
iii. Send notification before response in MockUwbAdapatation to prevent
races.
Bug: 216552887
Test: atest libuwb_uci_rust_tests
Change-Id: Ib6d929f315a5623f2fa0280e65fe2e9cafabcf6c
|
|
Bug: 216552887
Test: atest libuwb_uci_rust_tests
Change-Id: Ic5dad51d246f43aba76e905b26c75f03f960a649
|
|
Clients using mocks should ideally be only dealing with the interface
exposed by the corresponding module. The current impl of
MockUwbAdaptation needs clients to dig into the internals of
UwbClientCallback.
For ex: Uci module tests have to deal with packet fragmentation inside
UwbClientCallback impl which should be hidden from unit tests of
clients.
Bug: 216552887
Test: atest libuwb_uci_rust_tests
Change-Id: I071daedd7b1f92089ac4db28707c44baf7a1598e
|
|
Bug: 216552887
Test: atest libuwb_uci_rust_tests
Change-Id: Ib218bf868f9f6fa6636f8d7d8f9d5b15acbd8f50
|
|
Create a mock adaptation to send mock JNICommand to lower level without
triggering HAL. Only SessionInit command is implemented now. More commands are to be added.
Test: adb shell /data/fuzz/$(get_build_var
TARGET_ARCH)/uwb_uci_rust_fuzzer/uwb_uci_rust_fuzzer
Bug: 202531943
Change-Id: I446aec2318869073444cb36ecae085a9153531f9
|
|
Send DeviceStatusNotification with state = Error to the java stack when
there is a fatal error in the HAL (indicated by HAL crash or explicit
HAL event with event = Error).
Bug: 227488208
Test: Manual tests
Test: atest libuwb_uci_rust_tests
Change-Id: I6e8c394c4c27e4173cb25528d0cbf04a2029a2c1
|
|
UCI spec mandates fragmentation of cmd/rsp/ntf if the
payload size if > 255 (len field is 8 byte).
Ideally this should be handled by the PDL more cleanly in the future
But, we need a fix for UWB in Android T.
Changes:
1. Add a new base |UciPacket| definition which can hold the whole
cmd/rsp/notif and is used throughout the UWB stack. Use this as the base
packet for all packet definitions in the PDL. This allows the stack
to abstract the fragmentation to |UwbAdaption| module.
2. Add a separate |UciPacketHal| definition representing the spec defined UCI
packet. This packet is sent/received from the HAL interface.
3. Add conversion mechanism from |UciPacket| to |UciPacketHal| &
vice-versa for incoming/outgoing HAL packets.
4. added a MockHal for testing of UwbAdaptationImpl.
Bug: 202760099
Test: Existing Manual tests.
Test: atest CtsUwbTestCases
Test: atest libuwb_uci_rust_tests
Change-Id: Id275000cf27e10d6e35285c5bfb2beca095f6d75
|
|
Handle the invalid input for creating Uci packet. It should not be
panicked.
Test: manual
Bug: 202531943
Change-Id: Icf0c28de2891b042476157d1bf01300831bc6114
|
|
Bug: 216552887
Test: libuwb_uci_rust_tests
Change-Id: Ia6739f470fe6239b0ffdae65b78067a6ccfe608f
|
|
Test: UwbManagerTest
Bug: 216512326
Change-Id: Ieba46c57e33c2729a7cc8349fb4508b8d7240b29
|
|
|
|
Add Uci packet logging, the function that the log will be automatically
deleted after 24 hrs is to be added.
Bug: 216512326
Test: Manual
Change-Id: I99b944cad1d9389517a4b2c4b4f359325b47b975
|
|
Bug: 221164955
Test: Manual steps
Signed-off-by: Taha HADMI <taha.hamdi@qorvo.com>
Change-Id: I2ee391b0fcff28295215f732aebc1e842b77deaa
|
|
Test: UwbManagerTest
Bug: 216512326
Change-Id: Idfb1e693e604c109188e18949054985841c935f9
|
|
Update power stats response data structure based on the vendor feedback.
Add power stats JNI commands.
Bug: 199768480
Test: atest libuwb_uci_packet_tests
Change-Id: I1a99ffe895a56072bea074a6f7f5ebb2fdf357ae
|
|
This ensures that we always have a fully parsed packet as the
payload for the rsp/notification enums.
Bug: b/202760099
Test: Unit tests
Change-Id: Ifd5148707ecefef7c3c683a586700f9938d21b40
|
|
Bug: 218898203
Test: Compiles
Change-Id: Ie43fbb68c87fa6e2eace63ee04b7ad71a661a629
|
|
This CL adds a test case to verify the logic of handling notification.
The MockUwbAdaptation sends a notification after receiving a UCI
command. Then MockEventManager should get the notification call.
Bug: 216552887
Test: atest --host libuwb_uci_rust_tests
Change-Id: Iebe7093b7929dc0748112a8b0f7e4942c13fc46b
|
|
This CL verifies the logic that fails to send a uci command. The
block_on_jni_command() method should be fail at this situation.
Bug: 216552887
Test: atest --host libuwb_uci_rust_tests
Change-Id: Iacbfb1b7a1f74da8255c32347b7bb482021c49bc
|
|
This CL verifies the retry logic for sending a uci command. The test
lets the first 2 tries not responding, then make the 3rd one
successfully return the repsonse.
Bug: 216552887
Test: atest --host libuwb_uci_rust_tests
Change-Id: I6eb9945ee44a66842487d9a662a9b905feb70ebf
|
|
This CL adds a test case that verifies the flow of sending a UCI
message, and waiting for the response.
Bug: 216552887
Test: atest --host libuwb_uci_rust_tests
Change-Id: Ie8eb5a59f34a0701adbd7ccd9329b848014014a7
|
|
This CL handles the panic inside the working thread that makes the
exit() method returns a Error.
Bug: 216552887
Test: atest --host libuwb_uci_rust_tests pass
Test: make the thread panic and confirm the test fails
Change-Id: I1b3517bc5a40c28aa378a2410ef3811a65c3cfd3
|
|
|
|
|
|
This CL adds a new test case to verify deinitialization. Also, we
extract the common setup to a dedicated function.
Bug: 216552887
Test: atest --host libuwb_uci_rust_tests
Change-Id: I1a79c820f18f5e875d5d774099030fe27038dc4c
|
|
In the previous CLs, we injected mock UwbAdaptation instance into the
dispatcher. This CL verifies the calling sequence of the mock
instance. Note that we allow the methods not in the sequence are
called.
Bug: 216552887
Test: atest --host libuwb_uci_rust_tests
Change-Id: Icd799570d60ed77027a8282ec188e1f72f4b8f48
|
|
We already log all UCI response/notifications received.
Bug: 205730040
Test: Manual
Change-Id: I5f23985b0653bc9387bc67bfbfc07e080d7fa4de
|
|
session_id is defined in the spec as 4 byte unsigned value. The HAL
interface only allows signed values, so we need to just cast the
received 4 byte value received via the UCI packet as i32 for the HAL call.
The alternative is to declare session_id as long in the HAL interface
and upconvert from u32 to i64.
Bug: 216104681
Test: Compiles
Change-Id: I050c1985b680246726c3a1328755aba487b72390
|
|
|
|
Addresses are 2 bytes long, fix the existing implementation to accept an
array of shorts instead of array of bytes.
Bug: 216104681
Test: Manual tests
Change-Id: I1e3ce0a966817d50fe5998054916545c99416b55
|
|
Bug: 217415765
Test: build
Change-Id: Ic4f33810349f44da8b683f32ada2c857b37eda82
|
|
Bug: 217415765
Test: build
Change-Id: I41230d104bad13c74a93413ceb1dcfdf47f6f6c5
|
|
Also prevents errors in drive_once from stopping the whole driver
Bug: 217415765
Test: build
Change-Id: I405b615dc7f59ca69affb531ca9ec6bbd40206b5
|
|
Bug: 217415765
Test: build
Change-Id: I6b42d3a85122c38aae4e7ec6b8673d1fbee0ee7e
|
|
Also caught issue where `env` was being recomputed rather than used from
parameters.
Bug: 217415765
Test: build
Change-Id: I6d2d53b0d6f3b426bbc0c42246639e58eb08e1a7
|
|
All variants of the enum are exhaustively checked for. By removing this
branch we ensure that the compiler will direct us to update the match if
we add a new variant in the future.
Bug: 217415765
Test: build
Change-Id: I06cd1143fdd482ec74e3cf4e0cb8208b6b7e1fe7
|
|
Bug: 217415765
Test: build
Change-Id: I2caa61854520609f37ae3013d04db3ef37bbcc47
|