From 16be8ee1fff9793becfde9d9815b257aadce1ca3 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Mon, 18 Jul 2016 06:06:50 +0000 Subject: [PATCH] [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 --- .../fs.op.create_directory/create_directory_with_attributes.pass.cpp | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.7.4