Everything you suggested except using LLVM.h should be updated in r201691. I’ll get the LLVM.h change in as soon as I rebase it and the buildbots catch up a bit.
Ben On Feb 19, 2014, at 7:56 AM, Ben Langmuir <[email protected]> wrote: > > On Feb 19, 2014, at 2:07 AM, Dmitri Gribenko <[email protected]> wrote: > >> On Wed, Feb 19, 2014 at 10:06 AM, Dmitri Gribenko <[email protected]> >> wrote: >>> On Wed, Feb 19, 2014 at 3:29 AM, Ben Langmuir <[email protected]> wrote: >>>> +TEST(VirtualFileSystemTest, overlay_dirs) { >>>> + IntrusiveRefCntPtr<DummyFileSystem> Lower(new DummyFileSystem()); >>>> + IntrusiveRefCntPtr<DummyFileSystem> Upper(new DummyFileSystem()); >>>> + IntrusiveRefCntPtr<vfs::OverlayFileSystem> >>>> + O(new vfs::OverlayFileSystem(Lower)); >>>> + O->pushOverlay(Upper); >>>> + >>>> + ErrorOr<vfs::Status> Status1((error_code())), Status2((error_code())), >>>> + Status3((error_code())); >>>> + >>>> + Lower->addDirectory("/lower-only"); >>>> + Lower->addDirectory("/both"); >>>> + Upper->addDirectory("/both"); >>>> + Upper->addDirectory("/upper-only"); >>>> + >>>> + // non-merged paths should be the same >>>> + ASSERT_TRUE(Status1 = Lower->status("/lower-only")); >>>> + ASSERT_TRUE(Status2 = O->status("/lower-only")); >>>> + EXPECT_TRUE(Status1->equivalent(*Status2)); >>>> + >>>> + ASSERT_TRUE(Status1 = Lower->status("/lower-only")); >>>> + ASSERT_TRUE(Status2 = O->status("/lower-only")); >>>> + EXPECT_TRUE(Status1->equivalent(*Status2)); >>>> +} >>> >>> What was the purpose of "/both" and Status3 in this test? >> >> Also, the second time it should probably be testing upper-only. > > Hmm, originally I was checking that the unique ID for /both in the overlay > was distinct from its value in either lower or upper. However, I decided that > wasn’t worth implementing right now, as tracking it is expensive and might be > pointless if no one ever looks at the UIDs for the original file systems. I > guess I’ll remove that code. The permissions test covers checking that the > merged directory looks correct. > > And yes, the upper test was obviously wrong, thanks! > > Ben > >> >> Dmitri >> >> -- >> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if >> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/ > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
