diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-02-22 21:46:50 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-02-22 21:46:50 +0000 |
commit | 0ee8f05f8daf401aa60d297af475fefab2fccf03 (patch) | |
tree | e21a75b39fbdf35841490a84c788428839d62d31 | |
parent | 7d48457306ae63434bba062b3d052905267f884e (diff) | |
parent | c8f185d176b87da8af5dc97249485c6ac1a64f56 (diff) | |
download | bionic-android14-tests-release.tar.gz |
Merge "Snap for 11485278 from 40f12b4aa685de19c07f58d35c31a2ccb3f5cfa9 to android14-tests-release" into android14-tests-releaseandroid-vts-14.0_r4android-cts-14.0_r4android14-tests-release
-rw-r--r-- | tests/grp_pwd_test.cpp | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/tests/grp_pwd_test.cpp b/tests/grp_pwd_test.cpp index 65a54a659..3d5a9335a 100644 --- a/tests/grp_pwd_test.cpp +++ b/tests/grp_pwd_test.cpp @@ -442,16 +442,33 @@ 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 + // AID_UPROBESTATS (1093) was added in V, but "trunk stable" means + // that the 2024Q builds don't have branches like the QPR builds used + // to, and are tested with the _previous_ release's CTS. + if (android::base::GetIntProperty("ro.build.version.sdk", 0) == __ANDROID_API_U__) { +#if !defined(AID_UPROBESTATS) +#define AID_UPROBESTATS 1093 #endif - ids.erase(AID_PRNG_SEEDER); - expected_ids.erase(AID_PRNG_SEEDER); + ids.erase(AID_UPROBESTATS); + expected_ids.erase(AID_UPROBESTATS); + if (getpwuid(AID_UPROBESTATS)) { + EXPECT_STREQ(getpwuid(AID_UPROBESTATS)->pw_name, "uprobestats"); + } } + // AID_VIRTUALMACHINE (3013) was added in V, but "trunk stable" means + // that the 2024Q builds don't have branches like the QPR builds used + // to, and are tested with the _previous_ release's CTS. + if (android::base::GetIntProperty("ro.build.version.sdk", 0) == __ANDROID_API_U__) { +#if !defined(AID_VIRTUALMACHINE) +#define AID_VIRTUALMACHINE 3013 +#endif + ids.erase(AID_VIRTUALMACHINE); + expected_ids.erase(AID_VIRTUALMACHINE); + if (getpwuid(AID_VIRTUALMACHINE)) { + EXPECT_STREQ(getpwuid(AID_VIRTUALMACHINE)->pw_name, "virtualmachine"); + } + } + EXPECT_EQ(expected_ids, ids) << return_differences(); } #endif |