Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file.dart test suite failures #29096

Open
61 tasks
zanderso opened this issue Mar 16, 2017 · 5 comments
Open
61 tasks

file.dart test suite failures #29096

zanderso opened this issue Mar 16, 2017 · 5 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. customer-flutter library-io os-windows type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@zanderso
Copy link
Member

On google/file.dart#56, @tvolkert has noted inconsistencies in test outcomes between Windows and other platforms. I'm mirroring this in the Dart issue tracker so that we don't lose track of it, and to keep more fine-grained notes:

These tests from https://github.com/google/file.dart/blob/master/test/local_test.dart either fail when they should succeed or succeed when they should fail:

  • 'FileSystem > currentDirectory > throwsIfHasNonExistentPathInComplexChain',
  • 'FileSystem > currentDirectory > staysAtRootIfSetToParentOfRoot',
  • 'FileSystem > currentDirectory > resolvesLinksIfEncountered',
  • 'FileSystem > currentDirectory > succeedsIfSetToDirectoryLinkAtTail',
  • 'FileSystem > stat > isFileForLinkToFile',
  • 'FileSystem > type > isFileForLinkToFileAndFollowLinksTrue',
  • 'FileSystem > type > isNotFoundForLinkWithCircularReferenceAndFollowLinksTrue',
  • 'Directory > uri',
  • 'Directory > exists > falseIfExistsAsLinkToFile',
  • 'Directory > exists > falseIfNotFoundSegmentExistsThenIsBackedOut',
  • 'Directory > create > throwsIfAlreadyExistsAsLinkToFile',
  • 'Directory > rename > throwsIfDestinationIsNonEmptyDirectory',
  • 'Directory > rename > throwsIfDestinationIsLinkToEmptyDirectory',
  • 'Directory > delete > throwsIfPathReferencesLinkToFileAndRecursiveFalse',
  • 'Directory > resolveSymbolicLinks > throwsIfPathNotFoundInMiddleThenBackedOut',
  • 'Directory > createTemp > succeedsWithNestedPathPrefixThatExists',
  • 'Directory > list > followsLinksIfFollowLinksTrue',
  • 'Directory > list > returnsLinkObjectsForRecursiveLinkIfFollowLinksTrue',
  • 'File > uri',
  • 'File > create > succeedsIfAlreadyExistsAsLinkToFile',
  • 'File > create > succeedsIfAlreadyExistsAsLinkToNotFoundAtTail',
  • 'File > create > succeedsIfAlreadyExistsAsLinkToNotFoundInDifferentDirectory',
  • 'File > rename > succeedsIfDestinationExistsAsLinkToFile',
  • 'File > rename > succeedsIfDestinationExistsAsLinkToNotFound',
  • 'File > rename > succeedsIfSourceExistsAsLinkToFile',
  • 'File > copy > succeedsIfDestinationExistsAsLinkToFile',
  • 'File > copy > succeedsIfSourceExistsAsLinkToFile',
  • 'File > copy > succeedsIfSourceIsLinkToFileInDifferentDirectory',
  • 'File > copy > succeedsIfDestinationIsLinkToFileInDifferentDirectory',
  • 'File > openRead > succeedsIfExistsAsLinkToFile',
  • 'File > openWrite > succeedsIfExistsAsLinkToFile',
  • 'File > openWrite > ioSink > throwsIfEncodingIsNullAndWriteObject',
  • 'File > openWrite > ioSink > allowsChangingEncoding',
  • 'File > openWrite > ioSink > succeedsIfAddRawData',
  • 'File > openWrite > ioSink > succeedsIfWrite',
  • 'File > openWrite > ioSink > succeedsIfWriteAll',
  • 'File > openWrite > ioSink > succeedsIfWriteCharCode',
  • 'File > openWrite > ioSink > succeedsIfWriteln',
  • 'File > openWrite > ioSink > addStream > succeedsIfStreamProducesData',
  • 'File > openWrite > ioSink > addStream > blocksCallToAddWhileStreamIsActive',
  • 'File > openWrite > ioSink > addStream > blocksCallToWriteWhileStreamIsActive',
  • 'File > openWrite > ioSink > addStream > blocksCallToWriteAllWhileStreamIsActive',
  • 'File > openWrite > ioSink > addStream > blocksCallToWriteCharCodeWhileStreamIsActive',
  • 'File > openWrite > ioSink > addStream > blocksCallToWritelnWhileStreamIsActive',
  • 'File > openWrite > ioSink > addStream > blocksCallToFlushWhileStreamIsActive',
  • 'File > readAsBytes > succeedsIfExistsAsLinkToFile',
  • 'File > readAsString > succeedsIfExistsAsLinkToFile',
  • 'File > writeAsBytes > succeedsIfExistsAsLinkToFile',
  • 'File > writeAsString > succeedsIfExistsAsLinkToFile',
  • 'File > stat > isFileIfExistsAsLinkToFile',
  • 'File > delete > succeedsIfExistsAsLinkToFileAndRecursiveFalse',
  • 'Link > uri > whenTargetIsDirectory',
  • 'Link > uri > whenTargetIsFile',
  • 'Link > uri > whenLinkDoesntExist',
  • 'Link > stat > isFileIfTargetIsFile',
  • 'Link > stat > isDirectoryIfTargetIsDirectory',
  • 'Link > create > succeedsIfLinkDoesntExistViaTraversalAndRecursiveTrue',
  • 'Link > rename > returnsCovariantType',
  • 'Link > rename > succeedsIfDestinationExistsAsLinkToFile',
  • 'Link > rename > throwsIfDestinationExistsAsLinkToDirectory',
  • 'Link > rename > succeedsIfDestinationExistsAsLinkToNotFound',
@zanderso zanderso added area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. customer-flutter library-io os-windows type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Mar 16, 2017
@tvolkert
Copy link
Contributor

either fail when they should succeed or succeed when they should fail

... or return an unexpected value (e.g. when we expect true from exists(), but the result is false)

@goderbauer
Copy link
Contributor

We have the first report from a Flutter user who was experiencing a crash on Windows, which was most likely caused by resolveSymbolicLinks not working properly on Windows (see flutter/flutter#8882).

@bkonyi
Copy link
Contributor

bkonyi commented Jun 27, 2019

I've started looking at some of these in my spare time. I have a feeling some of these tests are failing solely due to differences in behavior between how Windows and other OSes do things. For example, FileSystem > currentDirectory > throwsIfHasNonExistentPathInComplexChain is failing on Windows since cd invalid_dir/../valid_dir will change directory to valid_dir on Windows but fail on Linux. In those cases, we don't intend to try and artificially match behavior between platforms, right?

@bkonyi
Copy link
Contributor

bkonyi commented Apr 6, 2021

I don't foresee myself having the bandwidth to look at this any time in the near future, so I'm going to unassign myself.

@bkonyi bkonyi removed their assignment Apr 6, 2021
@Xiphoseer
Copy link

Xiphoseer commented Jun 27, 2022

I just dug into possibly related problem, because I had issues with a build_runner builder / glob pattern not traversing a symlink. I posted some of my findings in PowerShell/PowerShell#15235 (comment). The bottom line is that

CreateFileW(listing->path_buffer().AsStringW(), 0,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
fails on symlinks to directories that were not created with SYMBOLIC_LINK_FLAG_DIRECTORY.

Specifically, this could be a source for #45981

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. customer-flutter library-io os-windows type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

5 participants