ReadFileSymbolicLink checks /system/bin/ps am: 9285b496bd am: 7f5d723ead

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12066063

Change-Id: I84234b1f19c8ce491261689773630095c2605b85
This commit is contained in:
Boleyn Su 2020-07-02 19:20:37 +00:00 committed by Automerger Merge Worker
commit 419f1c5bbe

View file

@ -61,8 +61,9 @@ TEST(util, ReadFileWorldWiteable) {
TEST(util, ReadFileSymbolicLink) {
errno = 0;
// lrw------- 1 root root 23 2008-12-31 19:00 default.prop -> system/etc/prop.default
auto file_contents = ReadFile("/default.prop");
// lrwxrwxrwx 1 root shell 6 2020-06-26 09:55 /system/bin/ps -> toybox
auto file_contents = ReadFile("/system/bin/ps");
EXPECT_EQ(ELOOP, errno);
ASSERT_FALSE(file_contents.ok());
EXPECT_EQ("open() failed: Too many symbolic links encountered",