From 290de46ec2c632f96e6ad59535710ecd1d2f142c Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Thu, 21 Mar 2019 13:14:59 +0100 Subject: Fix installd_dexopt_test. The way Binder status error messages are printed was changed in I911c3a667ddbe39245e5c3bbbd09154b2902aad8. Fix tests to deal with it. Bug: 128555505 Test: atest installd_dexopt_test Change-Id: I9372eccf5bc9e97fc043112fa4b463560a3ff2a5 --- cmds/installd/tests/installd_dexopt_test.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'cmds') diff --git a/cmds/installd/tests/installd_dexopt_test.cpp b/cmds/installd/tests/installd_dexopt_test.cpp index 71b710b0d3..1d4a2f0e5e 100644 --- a/cmds/installd/tests/installd_dexopt_test.cpp +++ b/cmds/installd/tests/installd_dexopt_test.cpp @@ -576,7 +576,7 @@ TEST_F(DexoptTest, DexoptSecondaryStorageValidationError) { CompileSecondaryDex(secondary_dex_ce_, DEXOPT_STORAGE_DE, /*binder_ok*/ false, /*compile_ok*/ false, &status); EXPECT_STREQ(status.toString8().c_str(), - "Status(-8): '-1: Dexoptanalyzer path validation failed'"); + "Status(-8, EX_SERVICE_SPECIFIC): '-1: Dexoptanalyzer path validation failed'"); } TEST_F(DexoptTest, DexoptSecondaryAppOwnershipValidationError) { @@ -585,7 +585,7 @@ TEST_F(DexoptTest, DexoptSecondaryAppOwnershipValidationError) { CompileSecondaryDex("/data/data/random.app/secondary.jar", DEXOPT_STORAGE_CE, /*binder_ok*/ false, /*compile_ok*/ false, &status); EXPECT_STREQ(status.toString8().c_str(), - "Status(-8): '-1: Dexoptanalyzer path validation failed'"); + "Status(-8, EX_SERVICE_SPECIFIC): '-1: Dexoptanalyzer path validation failed'"); } TEST_F(DexoptTest, DexoptSecondaryAcessViaDifferentUidError) { @@ -593,7 +593,8 @@ TEST_F(DexoptTest, DexoptSecondaryAcessViaDifferentUidError) { binder::Status status; CompileSecondaryDex(secondary_dex_ce_, DEXOPT_STORAGE_CE, /*binder_ok*/ false, /*compile_ok*/ false, &status, kSystemUid); - EXPECT_STREQ(status.toString8().c_str(), "Status(-8): '-1: Dexoptanalyzer open zip failed'"); + EXPECT_STREQ(status.toString8().c_str(), + "Status(-8, EX_SERVICE_SPECIFIC): '-1: Dexoptanalyzer open zip failed'"); } TEST_F(DexoptTest, DexoptPrimaryPublic) { @@ -615,7 +616,7 @@ TEST_F(DexoptTest, DexoptPrimaryFailedInvalidFilter) { DEX2OAT_FROM_SCRATCH, &status); EXPECT_STREQ(status.toString8().c_str(), - "Status(-8): \'256: Dex2oat invocation for " + "Status(-8, EX_SERVICE_SPECIFIC): \'256: Dex2oat invocation for " "/data/app/com.installd.test.dexopt/base.jar failed: unspecified dex2oat error'"); } -- cgit v1.2.3-59-g8ed1b