ReadFileSymbolicLink checks /system/bin/ps
According to https://android.googlesource.com/platform/build/+/refs/heads/android10-dev/core/Makefile#140, /default.prop may not be a symbolic link. Bug: 158552949 Test: atest CtsInitTestCases Change-Id: I19bde577fa50280e1ed6fb8fdbe846655abb930b Merged-In: I0d3f96c1656dfe02bfa0e801680f7fa887afd1d9 (cherry picked from commit 6f47feaccdbe849c982e0de9068e38be85006bfb)
This commit is contained in:
parent
84db2e40e1
commit
755a3dd78d
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue