Skip to content

Mac: Support basic projection changes and re-categorize functional tests#220

Closed
wilbaker wants to merge 12 commits intomicrosoft:masterfrom
wilbaker:mac_projection_changes
Closed

Mac: Support basic projection changes and re-categorize functional tests#220
wilbaker wants to merge 12 commits intomicrosoft:masterfrom
wilbaker:mac_projection_changes

Conversation

@wilbaker
Copy link
Member

@wilbaker wilbaker commented Aug 29, 2018

Summary of VFSForGit product changes

  • Added update\delete placeholder functionality to ProjFS.Mac
  • Update VFSForGit (for Mac) to add files\folders to the placeholder list as they are created during enumeration
  • Fixed bugs\issues in MacFileSystemVirtualizer.UpdatePlaceholderIfNeeded

With these changes most projection change scenarios are covered. #219 has been filed for supporting projection changes where new files need to be created by VFSForGit (something not covered by the changes in this PR).

Summary of test changes

  • Eliminated --mac-only flag and replaced it with an OS check in the functional tests
  • Switched from a allow-list of tests that should run on Mac to a deny-list of tests that should not run on Mac
  • Fixed up Windows specific paths
  • Enabled many more tests on Mac (283 now passing, up from 204)
 Test Run Summary
   Overall result: Warning
   Test Count: 286, Passed: 282, Failed: 0, Warnings: 0, Inconclusive: 0, Skipped: 4
     Skipped Tests - Ignored: 4, Explicit: 0, Other: 0
     Start time: 2018-08-29 23:15:15Z
     End time: 2018-08-29 23:28:25Z
     Duration: 790.114 seconds

Follow up work items
#219
#223
#231

Fixes #196

@@ -60,17 +60,20 @@ public static void Main(string[] args)

if (runner.HasCustomArg("--windows-only"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need the --windows-only flag? The platform check below should cover this too, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're still using thethe --windows-only flag to restrict GVFS.FunctionalTests.Windows.exe to running the Windows specific tests.

From RunFunctionalTests.bat:

dotnet %~dp0\..\..\BuildOutput\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\GVFS.FunctionalTests.dll %2 %3 %4 %5 || goto :endFunctionalTests
%~dp0\..\..\BuildOutput\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\GVFS.FunctionalTests.Windows.exe --windows-only %2 %3 %4 %5 || goto :endFunctionalTests

We could always run all the tests with both exes but it would slow down the tests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outside the scope of this PR, but do we need to maintain the ability to run the core tests in the .NET Framework project, if we never run them from that project? Not saying we should necessarily, but it seems like we could simplify this so that the .NET Framework test project contains only the Windows-specific tests. Any reason not to?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to?

The only reason I can think of (and maybe it's not a good enough reason to keep it), is that it's an easy way for developers to run all of the functional tests from the IDE (they can simply run the .NET Framework project).

I'm also wondering the reverse, is there any reason to run .NET Core version of the functional tests on Windows? Or should we just run them all with the .NET Framework?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't remember I ran the functional tests from the IDE :-). If that's something you do, I'm totally fine with making it easier.

Running all of the Windows tests on .NET Framework may actually make more sense, since the Windows client is still using .NET Framework. The current setup is also working well enough, so this is a someday-maybe clean up as far as I'm concerned.

<< std::hex << updateFlags << std::dec << ")" << std::endl;
#endif

PrjFS_Result result = PrjFS_DeleteFile(relativePath, updateFlags, failureCause);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just a temporary approach? Will we be able to update the existing placeholder in place?

Copy link
Member Author

@wilbaker wilbaker Aug 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not thinking this (delete+add) would be a temporary approach:

  • ProjFS on Windows internally does a delete+add when updating placeholders
  • Git does a delete+add when updating the working tree as part of a checkout

We do need to compare content ID, but I was thinking we'd stick with delete+add so that applications see the same events with VFSForGit as they do with Git.

wilbaker and others added 6 commits August 29, 2018 12:19
…data for correlation

When matching up data with ETW event there is an EnlistmentId and mountId that it tied to data about the enlistment and the mounted process. Other events are not tied to this data so when an exception happens getting the mount data that corresponds to it is not directly correlated.

This adds the EnlistmentId and MountId to the ETW data so that the data can be correlated.
@wilbaker
Copy link
Member Author

wilbaker commented Aug 30, 2018

@sanoursa I believe I've addressed\replied to all of your feedback so far. The latest changes are ready for another look.

Copy link
Contributor

@sanoursa sanoursa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

public const string M1 = "M1_CloneAndMount";
// The FailsOnBuildAgent category is for tests that pass on dev
// machines but not on the build agents
public const string FailsOnBuildAgent = "FailsOnBuildAgent";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just curious, any theories as to why some of the tests are failing on the build agent?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nickgra had investigated this a bit. The failures all have to do with non-ASCII file names, and I think Nick mentioned there must be a setting on the build agents that impacts how the file names are displayed.

From what I remember it was something to do with continuation characters being added into the names, @nickgra, do you remember any of the details?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've nailed it, that's about as far as I got in the investigation. I have some ideas on how we can debug this further, I'll follow up offline.

@@ -60,17 +60,20 @@ public static void Main(string[] args)

if (runner.HasCustomArg("--windows-only"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outside the scope of this PR, but do we need to maintain the ability to run the core tests in the .NET Framework project, if we never run them from that project? Not saying we should necessarily, but it seems like we could simplify this so that the .NET Framework test project contains only the Windows-specific tests. Any reason not to?

…s and re-categorize functional tests

Mac: Support basic projection changes and re-categorize functional tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants