aboutsummaryrefslogtreecommitdiff
path: root/tests/grp_pwd_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/grp_pwd_test.cpp')
-rw-r--r--tests/grp_pwd_test.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/grp_pwd_test.cpp b/tests/grp_pwd_test.cpp
index 9c6b0c5cb..cab717524 100644
--- a/tests/grp_pwd_test.cpp
+++ b/tests/grp_pwd_test.cpp
@@ -75,7 +75,11 @@ static void check_passwd(const passwd* pwd, const char* username, uid_t uid, uid
EXPECT_STREQ("/", pwd->pw_dir);
}
- EXPECT_STREQ("/bin/sh", pwd->pw_shell);
+ // This has changed over time and that causes new GSI + old vendor images testing to fail.
+ // This parameter doesn't matter on Android, so simply ignore its value for older vendor images.
+ if (android::base::GetIntProperty("ro.product.first_api_level", 0) >= 30) {
+ EXPECT_STREQ("/bin/sh", pwd->pw_shell);
+ }
}
static void check_getpwuid(const char* username, uid_t uid, uid_type_t uid_type,