aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2020-07-10 10:40:21 -0700
committerTom Cherry <tomcherry@google.com>2020-07-10 19:01:20 -0700
commit4785c135498ee01e3799f4c88369560cec252c17 (patch)
tree43f5638b23709086555b94a041fe0788d21c6f65
parentc8c3bc58a1e2acb1048e2fb4f2914f60e0977942 (diff)
downloadbionic-android11-dev.tar.gz
Don't test pw_shell for old vendor imagesandroid11-dev
R GSI on P product tests fail since pw_shell has changed. This value has no practical use on Android, so we ignore testing it for older vendor images. Bug: 160937247 Test: this test does/doesn't run appropriately Merged-In: Ie485bd019b3826e71ad19131effcbb002f888d52 Change-Id: Ie485bd019b3826e71ad19131effcbb002f888d52 (cherry picked from commit b9fa04d805912d58d920ccd1a7af77daf81293e7)
-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,