Lines Matching refs:FS
19 using llvm::sys::fs::UniqueID;
100 void addRegularFile(StringRef Path, sys::fs::perms Perms = sys::fs::all_all) {
102 0, 0, 1024, sys::fs::file_type::regular_file, Perms);
106 void addDirectory(StringRef Path, sys::fs::perms Perms = sys::fs::all_all) {
108 0, 0, 0, sys::fs::file_type::directory_file, Perms);
114 0, 0, 0, sys::fs::file_type::symlink_file, sys::fs::all_all);
250 Lower->addDirectory("/both", sys::fs::owner_read);
251 Upper->addDirectory("/both", sys::fs::owner_all | sys::fs::group_read);
257 Lower->addRegularFile("/both/foo", sys::fs::owner_read);
258 Upper->addRegularFile("/both/bar", sys::fs::owner_write);
273 EC = llvm::sys::fs::createUniqueDirectory(Name, Path);
276 EC = llvm::sys::fs::create_directory(Twine(Path));
284 EXPECT_FALSE(llvm::sys::fs::remove(Path.str()));
292 IntrusiveRefCntPtr<vfs::FileSystem> FS = vfs::getRealFileSystem();
295 vfs::directory_iterator I = FS->dir_begin(Twine(TestDirectory), EC);
304 I = FS->dir_begin(Twine(TestDirectory), EC);
319 IntrusiveRefCntPtr<vfs::FileSystem> FS = vfs::getRealFileSystem();
322 auto I = vfs::recursive_directory_iterator(*FS, Twine(TestDirectory), EC);
331 I = vfs::recursive_directory_iterator(*FS, Twine(TestDirectory), EC);
489 Lower->addRegularFile("/onlyInLow", sys::fs::owner_read);
490 Lower->addRegularFile("/hiddenByMid", sys::fs::owner_read);
491 Lower->addRegularFile("/hiddenByUp", sys::fs::owner_read);
492 Middle->addRegularFile("/onlyInMid", sys::fs::owner_write);
493 Middle->addRegularFile("/hiddenByMid", sys::fs::owner_write);
494 Middle->addRegularFile("/hiddenByUp", sys::fs::owner_write);
495 Upper->addRegularFile("/onlyInUp", sys::fs::owner_all);
496 Upper->addRegularFile("/hiddenByUp", sys::fs::owner_all);
511 EXPECT_EQ(sys::fs::owner_all, I->getPermissions());
520 EXPECT_EQ(sys::fs::owner_write, I->getPermissions());
556 IntrusiveRefCntPtr<vfs::FileSystem> FS;
557 FS = getFromYAMLString("");
558 EXPECT_EQ(nullptr, FS.get());
559 FS = getFromYAMLString("[]");
560 EXPECT_EQ(nullptr, FS.get());
561 FS = getFromYAMLString("'string'");
562 EXPECT_EQ(nullptr, FS.get());
569 IntrusiveRefCntPtr<vfs::FileSystem> FS =
589 ASSERT_TRUE(FS.get() != nullptr);
593 O->pushOverlay(FS);
619 IntrusiveRefCntPtr<vfs::FileSystem> FS =
633 ASSERT_TRUE(FS.get() != nullptr);
637 O->pushOverlay(FS);
655 IntrusiveRefCntPtr<vfs::FileSystem> FS =
669 ASSERT_TRUE(FS.get() != nullptr);
673 O->pushOverlay(FS);
688 IntrusiveRefCntPtr<vfs::FileSystem> FS = getFromYAMLString("{]", Lower);
689 EXPECT_EQ(nullptr, FS.get());
691 FS = getFromYAMLString("{ 'roots':[}", Lower);
693 FS = getFromYAMLString(
696 EXPECT_EQ(nullptr, FS.get());
699 FS = getFromYAMLString("{ 'knobular': 'true', 'roots':[] }", Lower);
700 EXPECT_EQ(nullptr, FS.get());
701 FS = getFromYAMLString("{ 'case-sensitive': 'maybe', 'roots':[] }", Lower);
702 EXPECT_EQ(nullptr, FS.get());
705 FS = getFromYAMLString("{ 'roots':'' }", Lower);
706 EXPECT_EQ(nullptr, FS.get());
707 FS = getFromYAMLString("{ 'roots':{} }", Lower);
708 EXPECT_EQ(nullptr, FS.get());
711 FS = getFromYAMLString(
713 EXPECT_EQ(nullptr, FS.get());
714 FS = getFromYAMLString("{ 'roots':[ { 'type': 'file', 'name': [], "
717 EXPECT_EQ(nullptr, FS.get());
718 FS = getFromYAMLString(
721 EXPECT_EQ(nullptr, FS.get());
722 FS = getFromYAMLString(
725 EXPECT_EQ(nullptr, FS.get());
726 FS = getFromYAMLString(
729 EXPECT_EQ(nullptr, FS.get());
730 FS = getFromYAMLString(
733 EXPECT_EQ(nullptr, FS.get());
734 FS = getFromYAMLString(
737 EXPECT_EQ(nullptr, FS.get());
740 FS = getFromYAMLString("{ 'roots':[ { 'type': 'file', 'name': 'me' }", Lower);
741 EXPECT_EQ(nullptr, FS.get());
742 FS = getFromYAMLString(
744 EXPECT_EQ(nullptr, FS.get());
745 FS = getFromYAMLString("{ 'roots':[ { 'name': 'me', 'contents': [] }", Lower);
746 EXPECT_EQ(nullptr, FS.get());
749 FS = getFromYAMLString("{ 'roots':[], 'roots':[] }", Lower);
750 EXPECT_EQ(nullptr, FS.get());
751 FS = getFromYAMLString(
754 EXPECT_EQ(nullptr, FS.get());
755 FS =
759 EXPECT_EQ(nullptr, FS.get());
762 FS = getFromYAMLRawString("{ 'roots':[] }", Lower);
763 EXPECT_EQ(nullptr, FS.get());
766 FS = getFromYAMLRawString("{ 'version':'foo', 'roots':[] }", Lower);
767 EXPECT_EQ(nullptr, FS.get());
768 FS = getFromYAMLRawString("{ 'version':-1, 'roots':[] }", Lower);
769 EXPECT_EQ(nullptr, FS.get());
770 FS = getFromYAMLRawString("{ 'version':100000, 'roots':[] }", Lower);
771 EXPECT_EQ(nullptr, FS.get());
779 IntrusiveRefCntPtr<vfs::FileSystem> FS = getFromYAMLString(
793 ASSERT_TRUE(nullptr != FS.get());
796 EXPECT_EQ("//root/external/file", FS->status("//root/A")->getName());
798 EXPECT_EQ("//root/external/file", FS->status("//root/B")->getName());
799 EXPECT_EQ("//root/C", FS->status("//root/C")->getName());
802 FS = getFromYAMLString(
817 ASSERT_TRUE(nullptr != FS.get());
820 EXPECT_EQ("//root/A", FS->status("//root/A")->getName());
822 EXPECT_EQ("//root/external/file", FS->status("//root/B")->getName());
823 EXPECT_EQ("//root/C", FS->status("//root/C")->getName());
831 IntrusiveRefCntPtr<vfs::FileSystem> FS = getFromYAMLString(
836 ASSERT_TRUE(nullptr != FS.get());
837 EXPECT_FALSE(FS->status("//root/path/to/file").getError());
838 EXPECT_FALSE(FS->status("//root/path/to").getError());
839 EXPECT_FALSE(FS->status("//root/path").getError());
840 EXPECT_FALSE(FS->status("//root/").getError());
843 FS = getFromYAMLString(
849 ASSERT_TRUE(nullptr != FS.get());
850 EXPECT_FALSE(FS->status("//root/path/to/file").getError());
851 EXPECT_FALSE(FS->status("//root/path/to").getError());
852 EXPECT_FALSE(FS->status("//root/path").getError());
853 EXPECT_FALSE(FS->status("//root/").getError());
856 FS = getFromYAMLString(
862 ASSERT_TRUE(nullptr != FS.get());
863 EXPECT_FALSE(FS->status("//root/path/to/file").getError());
864 EXPECT_FALSE(FS->status("//root/path/to").getError());
865 EXPECT_FALSE(FS->status("//root/path").getError());
866 EXPECT_FALSE(FS->status("//root/").getError());
874 IntrusiveRefCntPtr<vfs::FileSystem> FS = getFromYAMLString(
880 ASSERT_TRUE(nullptr != FS.get());
881 EXPECT_FALSE(FS->status("//root/path/to/file").getError());
882 EXPECT_FALSE(FS->status("//root/path/to").getError());
883 EXPECT_FALSE(FS->status("//root/path").getError());
884 EXPECT_FALSE(FS->status("//root/").getError());
895 IntrusiveRefCntPtr<vfs::FileSystem> FS =
916 ASSERT_TRUE(FS.get() != NULL);
920 O->pushOverlay(FS);