Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[zxcrypt] Fix tests to use fuchsia_device_ControllerRebind
Currently the Rebind api in zxcrypt tests use the following sequence: 1. block rebind fidl api which will call device_rebind libdriver api. 2. device_rebind schedules unbind on all the children but does not guarantee whether the device is actually unbound and bound again. 3. The tests then issue the Bind device controller api to bind the driver again. In the current scenario, depending on the timing of these operations, #3 will fail with ZX_ERR_ALREADY_BOUND if #2 is still in the process of unbinding. In the case where #2 actually completes unbind #3 will succeed. This change does the following. 1. It uses the new rebind device controller api, which takes care of unbind and bind synchronously. see https://fuchsia-review.googlesource.com/c/fuchsia/+/334253 2. Because we are using the rebind api, we do not need the additional bind 3. The Rebind api has a strict requirement of clients closing the children before callign the rebind on the parent. Made sure about that before calling the rebind api. Test: /system/test/sys/zxcrypt-test Bug:40740 Change-Id: Ic1a610697343be71889f4e053f34ca0b098ddefa
- Loading branch information