Skip to content

Allow FileInfo_Query_FileIdInformation tests on OTHERFS#256

Open
gwr wants to merge 1 commit into
microsoft:mainfrom
racktopsystems:fix2
Open

Allow FileInfo_Query_FileIdInformation tests on OTHERFS#256
gwr wants to merge 1 commit into
microsoft:mainfrom
racktopsystems:fix2

Conversation

@gwr

@gwr gwr commented Jan 14, 2022

Copy link
Copy Markdown

The test function FileInfo_Query_FileIdInformation
tries to use FSCTL_READ_FILE_USN_DATA on OTHERFS,
which is generally not going to work.
I've modified this function to only try that on
NTFS or REFS.

This could be a possible fix for microsoft/ProtocolTestFramework#35

The test function FileInfo_Query_FileIdInformation
tries to use FSCTL_READ_FILE_USN_DATA on OTHERFS,
which is generally not going to work.
I've modified this function to only try that on
NTFS or REFS.
@Dingshouqing

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 2 pipeline(s).

@Dingshouqing Dingshouqing left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We checked the file system at beginning of FileInfo_Query_FileIdInformation, so could you update your PR as below:
Modify line 40

BaseTestSite.Assume.AreNotEqual(FileSystem.FAT32, fsaAdapter.FileSystem, "File system should not be FAT32.");

something like below:

If(!(this.fsaAdapter.FileSystem == FileSystem.NTFS || this.fsaAdapter.FileSystem == FileSystem.REFS))
{
      site.Assume.Inconclusive("FileInfo_Query_FileIdInformation only supported by NTFS or REFS file system.");
}

@gwr

gwr commented Jan 18, 2022

Copy link
Copy Markdown
Author

Reporting "Inconclusive" for other than NTFS or REFS seems OK.

I'd prefer that we could test the FileIdInformation info. level on OTHERFS
(because we do actually support it) but I'm not sure how the test might
verify that the 64-bit ID returned is the correct one on OTHERFS.

@Dingshouqing

Copy link
Copy Markdown
Member

That sounds reasonable, how about updating the changes as below:

  1. Add a new property in “MS-FSA_ServerTestSuite.deployment.ptfconfig” like following:
<Property name="WhichFileSystemSupport_FileIdInformation" value="NTFS;REFS" />
  1. Upgrade line 40 to check whether current file system supports FileIdInformation, if it configured in value list then will continue the test
if (!this.fsaAdapter.TestConfig.GetProperty("WhichFileSystemSupport_FileIdInformation").Contains(this.fsaAdapter.FileSystem.ToString()))
       {
          BaseTestSite.Assume.Inconclusive("Current file system does not support FileIdInformation.");
      }

This will provide a way for OTHERFS if it supports FileIdInformation(by update following change) and wants to test.

<Property name="WhichFileSystemSupport_FileIdInformation" value="NTFS;REFS;OTHERFS" />

@Dingshouqing

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 2 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants