aboutsummaryrefslogtreecommitdiff
path: root/libcxx
diff options
context:
space:
mode:
authorJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>2016-07-18 06:06:50 +0000
committerJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>2016-07-18 06:06:50 +0000
commit16be8ee1fff9793becfde9d9815b257aadce1ca3 (patch)
treeb1298165526cfbe611dec2ccdcff68a33e104fed /libcxx
parenta23470efe73675cedb71693d9253e50a39dcb914 (diff)
downloadllvm-16be8ee1fff9793becfde9d9815b257aadce1ca3.zip
llvm-16be8ee1fff9793becfde9d9815b257aadce1ca3.tar.gz
llvm-16be8ee1fff9793becfde9d9815b257aadce1ca3.tar.bz2
[libcxx][filesystem] Remove setgid from parent before testing permissions
man page for mkdir says: "If the parent directory has the set-group-ID bit set, then so will the newly created directory." Differential Revision: https://reviews.llvm.org/D22265 llvm-svn: 275760
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp
index 0944a08..c32bdd2 100644
--- a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp
+++ b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp
@@ -60,6 +60,9 @@ TEST_CASE(create_existing_directory)
TEST_CASE(create_directory_one_level)
{
scoped_test_env env;
+ // Remove setgid which mkdir would inherit
+ permissions(env.test_root, perms::remove_perms | perms::set_gid);
+
const path dir = env.make_env_path("dir1");
const path attr_dir = env.create_dir("dir2");
permissions(attr_dir, perms::none);