From f9d2299ee2c05477f72dd137f4abddb68b91d8b2 Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Wed, 16 Jan 2019 16:25:40 +0100 Subject: [PATCH] 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 --- tests/grp_pwd_test.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/grp_pwd_test.cpp b/tests/grp_pwd_test.cpp index ca34205a5..4b207b698 100644 --- a/tests/grp_pwd_test.cpp +++ b/tests/grp_pwd_test.cpp @@ -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 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) {