CTS: allow continue to use the old AIDs on devices launch with P
Some vendors may have been using the AIDs outside the oem ranges for long that those aids need continue to be maitained for the existing devices. We allow them countinue to use the old AID names and values on device launch with P and before, to give them the period of time to adopt the new AID scheme. Bug: 116405200 Change-Id: I0453ed14df4c0855575ef1404c596ddc6ded681b
This commit is contained in:
parent
a8a716e42a
commit
5d9312bb13
|
@ -250,7 +250,9 @@ static void expect_ids(const T& ids) {
|
|||
|
||||
// Upgrading devices launched before API level 28 may not comply with the below check.
|
||||
// Due to the difficulty in changing uids after launch, it is waived for these devices.
|
||||
if (android::base::GetIntProperty("ro.product.first_api_level", 0) < 28) {
|
||||
// Also grant this check for device launched with 28(P) to give the vendor time to
|
||||
// adopt the AID scheme.
|
||||
if (android::base::GetIntProperty("ro.product.first_api_level", 0) <= 28) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -584,6 +586,10 @@ static void TestAidNamePrefix(const std::string& file_path) {
|
|||
|
||||
TEST(pwd, vendor_prefix_users) {
|
||||
#if defined(__BIONIC__)
|
||||
if (android::base::GetIntProperty("ro.product.first_api_level", 0) <= 28) {
|
||||
return;
|
||||
}
|
||||
|
||||
TestAidNamePrefix("/vendor/etc/passwd");
|
||||
#else
|
||||
print_no_getpwnam_test_info();
|
||||
|
@ -592,6 +598,10 @@ TEST(pwd, vendor_prefix_users) {
|
|||
|
||||
TEST(pwd, vendor_prefix_groups) {
|
||||
#if defined(__BIONIC__)
|
||||
if (android::base::GetIntProperty("ro.product.first_api_level", 0) <= 28) {
|
||||
return;
|
||||
}
|
||||
|
||||
TestAidNamePrefix("/vendor/etc/group");
|
||||
#else
|
||||
print_no_getgrnam_test_info();
|
||||
|
|
Loading…
Reference in New Issue