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

#2291. Update Link.create() tests according to the documentation #2299

Merged
merged 3 commits into from
Oct 11, 2023

Conversation

sgrekhov
Copy link
Contributor

@sgrekhov sgrekhov commented Oct 6, 2023

These tests written according to the documentation and dart-lang/sdk#53684

This is just the part of the changes. The second part should add tests checking behaviour of links when its target is deleted and another FileSystemEntity is created instead. Say delete File target and create a Directory with the same name instead.

The third part will update createSync() tests

Copy link
Member

@eernstg eernstg left a comment

Choose a reason for hiding this comment

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

LGTM.

@brianquinlan, do you have further comments? It should suffice to look at libraries where the diff includes code, and skip the ones that only have comment updates.

I was wondering about one thing: A few libraries have been changed such that code which was previously only executed when Platform.isWindows will now be executed on all platforms (as far as I can see). This is probably fine, and this change is probably needed because the test runs will use 'Administrator Mode' on Windows (or a configuration setting called 'Developer Mode'). However, it is slightly puzzling that we can't see any other changes associated with this modifier way of executing the test.

Is this choice of "some-suitably-privileged-mode" specified in some configuration file which is not part of this PR, perhaps outside co19 entirely?

In that case it might be useful to document how the execution mode is chosen (at least for Windows, if that concept just doesn't occur for other platforms), perhaps in those few tests where it matters.

LibTest/io/Link/create_A01_t01.dart Show resolved Hide resolved
LibTest/io/Link/create_A04_t01.dart Show resolved Hide resolved
Copy link
Contributor Author

@sgrekhov sgrekhov left a comment

Choose a reason for hiding this comment

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

Looks like all Windows bots are run in Administrator mode. I don't know where it is configured

LibTest/io/Link/create_A04_t01.dart Show resolved Hide resolved
LibTest/io/Link/create_A01_t01.dart Show resolved Hide resolved
@eernstg
Copy link
Member

eernstg commented Oct 9, 2023

all Windows bots are run in Administrator mode

OK, so let's assume that the privileged execution mode it is documented somewhere else (maybe in the location where the administrator mode is actually chosen), and just keep relying on it here. It is already implied by the comments in several tests that it must be executed in a privileged manner.

@sgrekhov
Copy link
Contributor Author

Two more commits were made. Please take another look

@sgrekhov sgrekhov requested a review from eernstg October 11, 2023 13:38
Copy link
Member

@eernstg eernstg left a comment

Choose a reason for hiding this comment

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

LGTM.

@eernstg
Copy link
Member

eernstg commented Oct 11, 2023

@brianquinlan, I'll land this now. Your input is still very welcome, but we'll use a separate PR to handle any issues that you might wish to raise.

@eernstg eernstg merged commit d04448a into dart-lang:master Oct 11, 2023
2 checks passed
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Oct 15, 2023
2023-10-13 sgrekhov22@gmail.com Fixes dart-lang/co19#2310. Fix new roll failures (dart-lang/co19#2311)
2023-10-13 sgrekhov22@gmail.com Fixes dart-lang/co19#2306. Fix promoted instance type in not_promotable_A01_t04.dart (dart-lang/co19#2309)
2023-10-13 sgrekhov22@gmail.com Fixes dart-lang/co19#2307. Don't expect private fields promotion on static fields (dart-lang/co19#2308)
2023-10-11 sgrekhov22@gmail.com dart-lang/co19#2291. Update `Link.create()` tests according to the documentation (dart-lang/co19#2299)
2023-10-11 sgrekhov22@gmail.com dart-lang/co19#2275. Add `noSuchMethod` tests. Part 3 (dart-lang/co19#2294)
2023-10-10 sgrekhov22@gmail.com dart-lang/co19#2275. Add `noSuchMethod` tests. Part 4 (dynamic semantics) (dart-lang/co19#2296)
2023-10-10 sgrekhov22@gmail.com dart-lang/co19#2291. Update `Link.create()` according to the documentation. Part 2 (dart-lang/co19#2301)
2023-10-10 sgrekhov22@gmail.com Fixes dart-lang/co19#2268. Fix LibTest/io/WebSocket/closeCode_A01_t02.dart to be not racy (dart-lang/co19#2302)
2023-10-09 sgrekhov22@gmail.com dart-lang/co19#1400. Add more tests for private fields promotion of extension types (dart-lang/co19#2300)

Change-Id: Ib34f392c8a2a0aaab8b7b0cb028f918ab2a3249f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330460
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
@sgrekhov sgrekhov deleted the co19-2291 branch November 14, 2023 11:31
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.

None yet

2 participants