aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2020-07-13 16:50:41 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-07-13 16:50:41 +0000
commit56985e2934dafde591848daabeff0e5ae331f26e (patch)
tree43f5638b23709086555b94a041fe0788d21c6f65
parent13a82a04ae476bad962de11b3156d26c58f5c12f (diff)
parent4785c135498ee01e3799f4c88369560cec252c17 (diff)
downloadbionic-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.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,