commit | bc42603a8daae62b158d159c97ef8acfaa39d70d | [log] [tgz] |
---|---|---|
author | Tianjie Xu <xunchang@google.com> | Fri Nov 11 13:53:25 2016 -0800 |
committer | Tianjie Xu <xunchang@google.com> | Mon Dec 05 11:59:58 2016 -0800 |
tree | 196107fcbfce0a13fe374c4b49b3b4450d283ec0 | |
parent | d2c56629ab99068e14b25c015ce376b8ac2f13d6 [diff] |
Retry ioctl in uncrypt if it returns block# 0 In some conditions, ioctl(fd, FIBMAP, &block) returns block number 0.This is a failure to locate the actual block number of the update package and will result in an invalid block.map. This CL retries ioctl a few times if it returns block number as 0. Bug: 31632090 Test: On N9, uncrypt retries ioctl and produces the correct blockmap. Change-Id: I913f98cf5c112915c2e803d0683db273c89053b6
mm -j && m ramdisk-nodeps && m recoveryimage-nodeps # To boot into the new recovery image # without flashing the recovery partition: adb reboot bootloader fastboot boot $ANDROID_PRODUCT_OUT/recovery.img
# After setting up environment and lunch. mmma -j bootable/recovery # Running the tests on device. adb root adb sync data # 32-bit device adb shell /data/nativetest/recovery_unit_test/recovery_unit_test adb shell /data/nativetest/recovery_component_test/recovery_component_test # Or 64-bit device adb shell /data/nativetest64/recovery_unit_test/recovery_unit_test adb shell /data/nativetest64/recovery_component_test/recovery_component_test
recovery-refresh
and recovery-persist
executables exist only on systems without /cache partition. And we need to follow special steps to run tests for them.
Execute the test on an A/B device first. The test should fail but it will log some contents to pmsg.
Reboot the device immediately and run the test again. The test should save the contents of pmsg buffer into /data/misc/recovery/inject.txt. Test will pass if this file has expected contents.