summaryrefslogtreecommitdiffstats
path: root/tests/component
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2017-05-03 01:54:02 +0200
committerandroid-build-merger <android-build-merger@google.com>2017-05-03 01:54:02 +0200
commita616f0d4763af7aa9182f1846deb0f959d67b01b (patch)
treee04297c789fd1098489767882d72bbd4cb82636f /tests/component
parentMerge "recovery: Change install_package() to take std::string." am: ba365180d3 am: c0c4ae1583 am: a0fb95a386 (diff)
parentMerge "Move sysMapFile and sysReleaseMap into MemMapping class." am: fe7eecff4c am: 08d9ede8f2 (diff)
downloadandroid_bootable_recovery-a616f0d4763af7aa9182f1846deb0f959d67b01b.tar
android_bootable_recovery-a616f0d4763af7aa9182f1846deb0f959d67b01b.tar.gz
android_bootable_recovery-a616f0d4763af7aa9182f1846deb0f959d67b01b.tar.bz2
android_bootable_recovery-a616f0d4763af7aa9182f1846deb0f959d67b01b.tar.lz
android_bootable_recovery-a616f0d4763af7aa9182f1846deb0f959d67b01b.tar.xz
android_bootable_recovery-a616f0d4763af7aa9182f1846deb0f959d67b01b.tar.zst
android_bootable_recovery-a616f0d4763af7aa9182f1846deb0f959d67b01b.zip
Diffstat (limited to 'tests/component')
-rw-r--r--tests/component/updater_test.cpp4
-rw-r--r--tests/component/verifier_test.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/component/updater_test.cpp b/tests/component/updater_test.cpp
index dc4b5d724..35e87fd56 100644
--- a/tests/component/updater_test.cpp
+++ b/tests/component/updater_test.cpp
@@ -570,7 +570,7 @@ TEST_F(UpdaterTest, block_image_update) {
ASSERT_EQ(0, fclose(zip_file_ptr));
MemMapping map;
- ASSERT_EQ(0, sysMapFile(zip_file.path, &map));
+ ASSERT_TRUE(map.MapFile(zip_file.path));
ZipArchiveHandle handle;
ASSERT_EQ(0, OpenArchiveFromMemory(map.addr, map.length, zip_file.path, &handle));
@@ -646,7 +646,7 @@ TEST_F(UpdaterTest, new_data_short_write) {
ASSERT_EQ(0, fclose(zip_file_ptr));
MemMapping map;
- ASSERT_EQ(0, sysMapFile(zip_file.path, &map));
+ ASSERT_TRUE(map.MapFile(zip_file.path));
ZipArchiveHandle handle;
ASSERT_EQ(0, OpenArchiveFromMemory(map.addr, map.length, zip_file.path, &handle));
diff --git a/tests/component/verifier_test.cpp b/tests/component/verifier_test.cpp
index 4a3a981f7..2ef3828ad 100644
--- a/tests/component/verifier_test.cpp
+++ b/tests/component/verifier_test.cpp
@@ -40,7 +40,7 @@ class VerifierTest : public testing::TestWithParam<std::vector<std::string>> {
void SetUp() override {
std::vector<std::string> args = GetParam();
std::string package = from_testdata_base(args[0]);
- if (sysMapFile(package.c_str(), &memmap) != 0) {
+ if (!memmap.MapFile(package)) {
FAIL() << "Failed to mmap " << package << ": " << strerror(errno) << "\n";
}