Snap for 6676900 from 4785c135498ee01e3799f4c88369560cec252c17 to rvc-release
Change-Id: I7786aeba3baeda131d69be0dce9abd31effeb994
diff --git a/tests/grp_pwd_test.cpp b/tests/grp_pwd_test.cpp
index 9c6b0c5..cab7175 100644
--- a/tests/grp_pwd_test.cpp
+++ b/tests/grp_pwd_test.cpp
@@ -75,7 +75,11 @@
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,