Update getpwnam() tests to correctly handle new app zygote uids.

The UID range [90000..98999] is used for isolated processes that are
spawned from an application zygote. Otherwise they are identical to
regular isolated processes in the [99000..99999] range. Fix the tests to
match the new range.

Bug: 111434506
Test: atest bionic-unit-tests-static
Change-Id: Id0352f2cf0d21edb04d95f01ea2548e95b62317a
This commit is contained in:
Martijn Coenen 2019-01-16 16:25:40 +01:00
parent ca305a39e5
commit f9d2299ee2
1 changed files with 4 additions and 5 deletions

View File

@ -198,7 +198,7 @@ TEST(pwd, getpwnam_app_id_u0_a49999) {
}
TEST(pwd, getpwnam_app_id_u0_i1) {
check_get_passwd("u0_i1", 99001, TYPE_APP);
check_get_passwd("u0_i1", 90001, TYPE_APP);
}
TEST(pwd, getpwnam_app_id_u1_root) {
@ -218,9 +218,8 @@ TEST(pwd, getpwnam_app_id_u1_a40000) {
}
TEST(pwd, getpwnam_app_id_u1_i0) {
check_get_passwd("u1_i0", 199000, TYPE_APP);
check_get_passwd("u1_i0", 190000, TYPE_APP);
}
#if defined(__BIONIC__)
template <typename T>
static void expect_ids(const T& ids) {
@ -464,7 +463,7 @@ TEST(grp, getgrnam_app_id_all_a9999) {
}
TEST(grp, getgrnam_app_id_u0_i1) {
check_get_group("u0_i1", 99001);
check_get_group("u0_i1", 90001);
}
TEST(grp, getgrnam_app_id_u1_root) {
@ -484,7 +483,7 @@ TEST(grp, getgrnam_app_id_u1_a40000) {
}
TEST(grp, getgrnam_app_id_u1_i0) {
check_get_group("u1_i0", 199000);
check_get_group("u1_i0", 190000);
}
TEST(grp, getgrnam_r_reentrancy) {