diff options
author | Orion Hodson <oth@google.com> | 2022-10-27 10:28:24 +0100 |
---|---|---|
committer | Orion Hodson <oth@google.com> | 2022-10-27 11:21:29 +0100 |
commit | f5fd5adf04aa35983a383085c786e69fd2257eba (patch) | |
tree | 888f9963fd61e17878d35e6a18df7a41bb950287 | |
parent | 159a0e884f639321811722251bf712ecaa50522f (diff) | |
download | bionic-f5fd5adf04aa35983a383085c786e69fd2257eba.tar.gz |
Fix-up for change in pwd/grp ids for PRNG seeder daemon
The PRNG seeder daemon is introduced in TM-QPR2 which can lead to
breakage running Android 13 CTS tests depending on when the platform
and CTS tests are built.
Fix: 253185870
Test: run cts --module CtsBionicTestCases
Change-Id: I94fa0aa2f32b09222aee08891e7643bf14d1a204
-rw-r--r-- | tests/grp_pwd_test.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/grp_pwd_test.cpp b/tests/grp_pwd_test.cpp index bf65720f9..65a54a659 100644 --- a/tests/grp_pwd_test.cpp +++ b/tests/grp_pwd_test.cpp @@ -441,6 +441,17 @@ static void expect_ids(T ids, bool is_group) { } return result; }; + + // AID_PRNG_SEEDER (1092) was added in TM-QPR2, but CTS is shared + // across Android 13 versions so we may or may not find it in this + // test (b/253185870). + if (android::base::GetIntProperty("ro.build.version.sdk", 0) == __ANDROID_API_T__) { +#ifndef AID_PRNG_SEEDER +#define AID_PRNG_SEEDER 1092 +#endif + ids.erase(AID_PRNG_SEEDER); + expected_ids.erase(AID_PRNG_SEEDER); + } EXPECT_EQ(expected_ids, ids) << return_differences(); } #endif |