From f5fd5adf04aa35983a383085c786e69fd2257eba Mon Sep 17 00:00:00 2001 From: Orion Hodson Date: Thu, 27 Oct 2022 10:28:24 +0100 Subject: 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 --- tests/grp_pwd_test.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- cgit v1.2.3