summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2017-07-20 01:00:19 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-07-20 01:00:19 +0200
commit94a8ea1797cf807458f94953fe721985bf1261f0 (patch)
treebdcda7cd5a4e2baa1f45c66f6a1698df47119175 /tests
parentMerge "Fix the missing char when showing recovery logs." (diff)
parentFix the android-cloexec-* warnings in bootable/recovery (diff)
downloadandroid_bootable_recovery-94a8ea1797cf807458f94953fe721985bf1261f0.tar
android_bootable_recovery-94a8ea1797cf807458f94953fe721985bf1261f0.tar.gz
android_bootable_recovery-94a8ea1797cf807458f94953fe721985bf1261f0.tar.bz2
android_bootable_recovery-94a8ea1797cf807458f94953fe721985bf1261f0.tar.lz
android_bootable_recovery-94a8ea1797cf807458f94953fe721985bf1261f0.tar.xz
android_bootable_recovery-94a8ea1797cf807458f94953fe721985bf1261f0.tar.zst
android_bootable_recovery-94a8ea1797cf807458f94953fe721985bf1261f0.zip
Diffstat (limited to 'tests')
-rw-r--r--tests/component/updater_test.cpp4
-rw-r--r--tests/manual/recovery_test.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/component/updater_test.cpp b/tests/component/updater_test.cpp
index 357a39ef7..01b86f224 100644
--- a/tests/component/updater_test.cpp
+++ b/tests/component/updater_test.cpp
@@ -485,7 +485,7 @@ TEST_F(UpdaterTest, block_image_update) {
UpdaterInfo updater_info;
updater_info.package_zip = handle;
TemporaryFile temp_pipe;
- updater_info.cmd_pipe = fopen(temp_pipe.path, "wb");
+ updater_info.cmd_pipe = fopen(temp_pipe.path, "wbe");
updater_info.package_zip_addr = map.addr;
updater_info.package_zip_len = map.length;
@@ -561,7 +561,7 @@ TEST_F(UpdaterTest, new_data_short_write) {
UpdaterInfo updater_info;
updater_info.package_zip = handle;
TemporaryFile temp_pipe;
- updater_info.cmd_pipe = fopen(temp_pipe.path, "wb");
+ updater_info.cmd_pipe = fopen(temp_pipe.path, "wbe");
updater_info.package_zip_addr = map.addr;
updater_info.package_zip_len = map.length;
diff --git a/tests/manual/recovery_test.cpp b/tests/manual/recovery_test.cpp
index d36dd331e..92c6ef2d4 100644
--- a/tests/manual/recovery_test.cpp
+++ b/tests/manual/recovery_test.cpp
@@ -141,7 +141,7 @@ class ResourceTest : public testing::TestWithParam<std::string> {
// under recovery.
void SetUp() override {
std::string file_path = GetParam();
- fp = fopen(file_path.c_str(), "rb");
+ fp = fopen(file_path.c_str(), "rbe");
ASSERT_NE(nullptr, fp);
unsigned char header[8];