aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2017-08-04 20:28:05 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-08-04 20:28:05 +0000
commitf631e5a001559a4b0aeb024a62033082e648e901 (patch)
tree202a4d4de52a72351bac865ca55495eca07a3acb
parent2fdefadcee9bdcad11beb971c3e06fbf2cdf79ae (diff)
parenta14485addeacc23587743dad307184c00224b823 (diff)
downloadbionic-f631e5a001559a4b0aeb024a62033082e648e901.tar.gz
Merge "Remove a check for AIDs in the OEM range."
-rw-r--r--tests/grp_pwd_test.cpp18
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;
}
}