Skip to content

Commit 61345a8

Browse files
committed
Add debug output for failing test
1 parent ba58df0 commit 61345a8

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/SafeDirectoryOwnershipTests.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,17 @@ private IDisposable WithSafeDirectoryConfig(string repoDir)
110110

111111
private IDisposable WithEnlistmentOwner(SecurityIdentifier newOwner)
112112
{
113+
Console.WriteLine("Users Group SID:" + usersSid.Value);
114+
Console.WriteLine("Admin Group SID:" + new SecurityIdentifier(WellKnownSidType.BuiltinAdministratorsSid, null).Value);
115+
Console.WriteLine("Current User SID: " + WindowsIdentity.GetCurrent().User.Value);
116+
Console.WriteLine("Current User Name: " + WindowsIdentity.GetCurrent().User.Translate(typeof(NTAccount)).Value);
113117
var repoDir = this.Enlistment.WorkingDirectoryBackingRoot;
114118
var currentOwner = GetDirectoryOwner(repoDir);
119+
Console.WriteLine("Current Directory Owner SID: " + currentOwner.Value);
120+
115121
SetDirectoryOwner(repoDir, newOwner);
122+
var updatedOwner = GetDirectoryOwner(repoDir);
123+
Console.WriteLine("Updated Directory Owner SID: " + updatedOwner.Value);
116124
return new Disposable(() =>
117125
SetDirectoryOwner(repoDir, currentOwner));
118126
}

0 commit comments

Comments
 (0)