diff options
author | Tom Cherry <tomcherry@google.com> | 2020-07-13 16:50:41 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-07-13 16:50:41 +0000 |
commit | 56985e2934dafde591848daabeff0e5ae331f26e (patch) | |
tree | 43f5638b23709086555b94a041fe0788d21c6f65 | |
parent | 13a82a04ae476bad962de11b3156d26c58f5c12f (diff) | |
parent | 4785c135498ee01e3799f4c88369560cec252c17 (diff) | |
download | bionic-56985e2934dafde591848daabeff0e5ae331f26e.tar.gz |
Don't test pw_shell for old vendor images am: 4785c13549
Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/12133446
Change-Id: Ic45ee6e34a422039af3b81d2d157d02917eaae79
-rw-r--r-- | tests/grp_pwd_test.cpp | 6 |
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, |