zipalign: Fix pageAlignSharedLibs arg in tests

zipalign_test is passing (int)4096 instead of required bool
for the pageAlignSharedLibs parameter. Update the test to use
the correct type.

Bug: 276963821
Test: atest -c zipalign_tests
Change-Id: I4150dbd411e5a40427281645aa03262f7b0c9e3a
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
This commit is contained in:
Kalesh Singh
2023-08-17 14:21:06 -07:00
parent f7171f4dff
commit 7e0aa04637

View File

@@ -49,7 +49,7 @@ TEST(Align, Unaligned) {
const std::string src = GetTestPath("unaligned.zip");
const std::string dst = GetTempPath("unaligned_out.zip");
int processed = process(src.c_str(), dst.c_str(), 4, true, false, 4096);
int processed = process(src.c_str(), dst.c_str(), 4, true, false, false);
ASSERT_EQ(0, processed);
int verified = verify(dst.c_str(), 4, true, false);
@@ -61,14 +61,14 @@ TEST(Align, DoubleAligment) {
const std::string tmp = GetTempPath("da_aligned.zip");
const std::string dst = GetTempPath("da_d_aligner.zip");
int processed = process(src.c_str(), tmp.c_str(), 4, true, false, 4096);
int processed = process(src.c_str(), tmp.c_str(), 4, true, false, false);
ASSERT_EQ(0, processed);
int verified = verify(tmp.c_str(), 4, true, false);
ASSERT_EQ(0, verified);
// Align the result of the previous run. Essentially double aligning.
processed = process(tmp.c_str(), dst.c_str(), 4, true, false, 4096);
processed = process(tmp.c_str(), dst.c_str(), 4, true, false, false);
ASSERT_EQ(0, processed);
verified = verify(dst.c_str(), 4, true, false);
@@ -91,7 +91,7 @@ TEST(Align, Holes) {
const std::string src = GetTestPath("holes.zip");
const std::string dst = GetTempPath("holes_out.zip");
int processed = process(src.c_str(), dst.c_str(), 4, true, false, 4096);
int processed = process(src.c_str(), dst.c_str(), 4, true, false, true);
ASSERT_EQ(0, processed);
int verified = verify(dst.c_str(), 4, false, true);
@@ -103,7 +103,7 @@ TEST(Align, DifferenteOrders) {
const std::string src = GetTestPath("diffOrders.zip");
const std::string dst = GetTempPath("diffOrders_out.zip");
int processed = process(src.c_str(), dst.c_str(), 4, true, false, 4096);
int processed = process(src.c_str(), dst.c_str(), 4, true, false, true);
ASSERT_EQ(0, processed);
int verified = verify(dst.c_str(), 4, false, true);
@@ -120,7 +120,7 @@ TEST(Align, DirectoryEntry) {
const std::string src = GetTestPath("archiveWithOneDirectoryEntry.zip");
const std::string dst = GetTempPath("archiveWithOneDirectoryEntry_out.zip");
int processed = process(src.c_str(), dst.c_str(), 4, true, false, 4096);
int processed = process(src.c_str(), dst.c_str(), 4, true, false, true);
ASSERT_EQ(0, processed);
ASSERT_EQ(true, sameContent(src, dst));