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
diff --git a/tests/grp_pwd_test.cpp b/tests/grp_pwd_test.cpp
index bf65720..65a54a6 100644
--- a/tests/grp_pwd_test.cpp
+++ b/tests/grp_pwd_test.cpp
@@ -441,6 +441,17 @@
}
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