Retry when `Permission denied` is returned (2/n)

My test shows that with one more retry, the external storage will be
mounted correctly in most cases even when 'Permission denied' is
returned previously. See b/150749023#comment3 for more details.

This will reduce the chance of unnecessary recovery/reboot due to
failed #waitForStoreMount and greatly improve the steadiness of host
side tests.

Note retryOnPermissionDenied is set to 1 so we won't retry endlessly to
impact the boot tests.

testWaitForStoreMount_PermDenied is also modified to check if
'retryOnPermissionDenied' works correctly.

Bug: 150749023
Test: atest StagedRollbackTest#testBadApkOnly
Test: tradefed unit tests

Change-Id: I651ad8021b880f269f5e2d596a8d79679429164a
2 files changed
tree: aa31bbf7b99f9d8769342c12c8abe0cc30b9af65
  1. atest/
  2. clearcut_client/
  3. common_util/
  4. device_build_interfaces/
  5. global_configuration/
  6. invocation_interfaces/
  7. isolation/
  8. lite/
  9. proto/
  10. python-lib/
  11. remote/
  12. res/
  13. src/
  14. test_framework/
  15. test_result_interfaces/
  16. tests/
  17. util-apps/
  18. .classpath
  19. .gitignore
  20. .project
  21. Android.bp
  22. Android.mk
  23. atest_tradefed.sh
  24. CleanSpec.mk
  25. error_prone_rules.mk
  26. MANIFEST.mf
  27. OWNERS
  28. PREUPLOAD.cfg
  29. pylintrc
  30. README.md
  31. run_tf_cmd.sh
  32. script_help.sh
  33. TEST_MAPPING
  34. tradefed.sh
  35. tradefed_win.bat
README.md

Trade Federation (TF / Tradefed)

TF is a test harness used to drive Android automated testing. It runs on test hosts and monitors the connected devices, handling test scheduling & execution and device management.

Other test harnesses like Compatibility Test Suite (CTS) and Vendor Test Suite (VTS) use TF as a basis and extend it for their particular needs.

Building TF:

  • source build/envsetup.sh
  • tapas tradefed-all
  • make -j8

More information at: https://source.android.com/devices/tech/test_infra/tradefed/

See more details about Tradefed Architecture at: https://source.android.com/devices/tech/test_infra/tradefed/architecture

If you are a tests writer you should start looking in the test_framework/ component which contains everything needed to write a tests in Tradefed.