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
diff --git a/tests/grp_pwd_test.cpp b/tests/grp_pwd_test.cpp
index ca34205..4b207b6 100644
--- a/tests/grp_pwd_test.cpp
+++ b/tests/grp_pwd_test.cpp
@@ -198,7 +198,7 @@
}
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_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_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_i0) {
- check_get_group("u1_i0", 199000);
+ check_get_group("u1_i0", 190000);
}
TEST(grp, getgrnam_r_reentrancy) {