diff options
author | Elliott Hughes <enh@google.com> | 2015-04-01 12:22:40 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-04-01 12:22:40 -0700 |
commit | 0ad256c1b234cddc97290be761f8a0163a5c6c00 (patch) | |
tree | 7f1124ef13c059647062349357f5ff7c0d29d5cf /tests | |
parent | d227d57d50f7a5251dbbfa3f2b41d3fe882851fa (diff) | |
download | bionic-0ad256c1b234cddc97290be761f8a0163a5c6c00.zip bionic-0ad256c1b234cddc97290be761f8a0163a5c6c00.tar.gz bionic-0ad256c1b234cddc97290be761f8a0163a5c6c00.tar.bz2 |
Fix ftw tests when run as non-root.
Root can create subdirectories inside non-writable directories, but
other users can't.
Change-Id: I102fe610d1bd2733aebf184b544e58612465287d
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ftw_test.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/ftw_test.cpp b/tests/ftw_test.cpp index 6741d00..b7e5bd5 100644 --- a/tests/ftw_test.cpp +++ b/tests/ftw_test.cpp @@ -30,11 +30,11 @@ static void MakeTree(const char* root) { char path[PATH_MAX]; snprintf(path, sizeof(path), "%s/dir", root); - ASSERT_EQ(0, mkdir(path, 0555)); + ASSERT_EQ(0, mkdir(path, 0755)) << path; snprintf(path, sizeof(path), "%s/dir/sub", root); - ASSERT_EQ(0, mkdir(path, 0555)); + ASSERT_EQ(0, mkdir(path, 0555)) << path; snprintf(path, sizeof(path), "%s/unreadable-dir", root); - ASSERT_EQ(0, mkdir(path, 0000)); + ASSERT_EQ(0, mkdir(path, 0000)) << path; snprintf(path, sizeof(path), "%s/dangler", root); ASSERT_EQ(0, symlink("/does-not-exist", path)); |