commit | 1fc0518f130ce415c4c735515ff178fdaa6ff73f | [log] [tgz] |
---|---|---|
author | Jorge Lucangeli Obes <jorgelo@google.com> | Thu Apr 05 10:17:01 2018 -0400 |
committer | Treehugger Robot <treehugger-gerrit@google.com> | Thu Apr 05 17:04:56 2018 +0000 |
tree | 3159e42c7ebd6d698333fc29d4d465c1841f1598 | |
parent | 4fe5b4fbf48c94ad02e2b59f51c5b1a4b7045f40 [diff] |
system_unittest: Fix on Android. Some system unit tests were failing on Android: -get_temp_path() was failing because it was trying to call mkstemp() on a RO file. This happens because tests are usually run with 'adb shell', and in that case CWD is /, which is RO. --Fix by using /data/local/tmp on Android. -setup_mount_destination() was failing because /etc/passwd doesn't exist. --Fix by using /etc/hosts. -setup_mount_destination() was failing to fail because almost all user IDs are valid. Fix by skipping that check on Android. https://blackbox.googleplex.com/#/custom/apct/testcase/git_master/continuous_native_tests/6/mj_system_unittest_gtest.mkdir_p%23create_tree https://blackbox.googleplex.com/#/custom/apct/testcase/git_master/continuous_native_tests/6/mj_system_unittest_gtest.setup_mount_destination%23create_bind_dir https://blackbox.googleplex.com/#/custom/apct/testcase/git_master/continuous_native_tests/6/mj_system_unittest_gtest.setup_mount_destination%23create_bind_file https://blackbox.googleplex.com/#/custom/apct/testcase/git_master/continuous_native_tests/6/mj_system_unittest_gtest.setup_mount_destination%23create_char_dev https://blackbox.googleplex.com/#/custom/apct/testcase/git_master/continuous_native_tests/6/mj_system_unittest_gtest.setup_mount_destination%23create_pseudo_fs https://blackbox.googleplex.com/#/custom/apct/testcase/git_master/continuous_native_tests/6/mj_system_unittest_gtest.write_pid_to_path%23basic Bug: None Test: Passes on HiKey, passes on Linux. Change-Id: I685eedcad9c01a17fb3141ff2d95dc2d99284ee1