diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-08-06 07:26:44 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-08-06 07:26:44 +0000 |
commit | 7fca0027c0412a7705f77108ee3bca7d9ea160e3 (patch) | |
tree | fa2a0f95e9959af3360c049fa15fc465de030224 | |
parent | c60e18b8a41bdc0bf00b30347389909209e4031a (diff) | |
parent | fe1dc33b28525a503da6c052acaa5894c0dae6e8 (diff) | |
download | bionic-oreo-dr2-release.tar.gz |
release-request-ce5644bf-c7ec-4125-96f7-5f9bba4fe5ad-for-git_oc-dr1-release-4249716 snap-temp-L41100000089724307android-8.0.0_r34android-8.0.0_r33android-8.0.0_r27android-8.0.0_r26android-8.0.0_r25android-8.0.0_r24android-8.0.0_r23android-8.0.0_r22android-8.0.0_r21oreo-dr3-releaseoreo-dr2-releaseoreo-dr1-release
Change-Id: I878aa8a8bbee56cdbb0af64b40eca8f0888a032d
-rw-r--r-- | tests/grp_pwd_test.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/grp_pwd_test.cpp b/tests/grp_pwd_test.cpp index f8232aa73..b8df8e790 100644 --- a/tests/grp_pwd_test.cpp +++ b/tests/grp_pwd_test.cpp @@ -207,7 +207,14 @@ TEST(pwd, getpwent_iterate) { application = true; } else { ASSERT_STREQ("/", pwd->pw_dir); - ASSERT_FALSE(exist[pwd->pw_uid]); + // TODO(b/27999086): fix this check with the OEM range + // If OEMs add their own AIDs to private/android_filesystem_config.h, this check will fail. + // Long term we want to create a better solution for OEMs adding AIDs, but we're not there + // yet, so therefore we do not check for uid's in the OEM range. + if (!(pwd->pw_uid >= 2900 && pwd->pw_uid <= 2999) && + !(pwd->pw_uid >= 5000 && pwd->pw_uid <= 5999)) { + ASSERT_FALSE(exist[pwd->pw_uid]); + } exist[pwd->pw_uid] = true; } } @@ -453,7 +460,14 @@ TEST(grp, getgrent_iterate) { if (grp->gr_gid >= exist.size()) { application = true; } else { - ASSERT_FALSE(exist[grp->gr_gid]); + // TODO(b/27999086): fix this check with the OEM range + // If OEMs add their own AIDs to private/android_filesystem_config.h, this check will fail. + // Long term we want to create a better solution for OEMs adding AIDs, but we're not there + // yet, so therefore we do not check for gid's in the OEM range. + if (!(grp->gr_gid >= 2900 && grp->gr_gid <= 2999) && + !(grp->gr_gid >= 5000 && grp->gr_gid <= 5999)) { + ASSERT_FALSE(exist[grp->gr_gid]); + } exist[grp->gr_gid] = true; } } |