Commit Graph

1531 Commits

Author SHA1 Message Date
Derek Xu fe46d2089f [package:vm_service] Add dot_shorthands_test
Fixes: https://github.com/dart-lang/sdk/issues/59875
Change-Id: I2653a6473a00cbf89b26872c7e50a34e6d486a22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/431120
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2025-05-26 10:43:59 -07:00
Alexander Aprelev 24211892c8 [gardening] Mark pkg/test_runner/test/update_error_cmdline_test Slow.
Fixes https://github.com/dart-lang/sdk/issues/60534
TEST=ci

Change-Id: Ia6786e83111250c627d95e901902a045cc548fe1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430820
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2025-05-23 09:16:26 -07:00
Derek Xu 3dc9d8dcf9 [VM/Service] Add getQueuedMicrotasks RPC
TEST=pkg/vm_service/test/get_queued_microtasks_rpc_test

CoreLibraryReviewExempt: This CL does not include any core library API
changes, only VM Service implementation changes within
sdk/lib/vmservice/.
Change-Id: Ie5488f498e4d0f3d201e3f31423fd5029b74a726
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425160
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-05-13 14:29:37 -07:00
Daco Harkes 245498232c [deps] Roll dart-lang/native
`package:native_assets_cli` has been split up and
`package:native_assets_builder` has been renamed.

Change-Id: Ic9d5c21bb3c7ecf7924fdee6b4281153ad37fac5
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-win-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425504
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2025-05-01 02:18:11 -07:00
Ivan Inozemtsev d510876d9e Revert "[VM/Service] Shut down the VM immediately after the VM Service fails to start during VM initialization"
This reverts commit 56ccf437e6.

Reason for revert: b/409535026

TEST=ci

Original change's description:
> [VM/Service] Shut down the VM immediately after the VM Service fails to start during VM initialization
>
> TEST=pkg/vm_service/test/failure_to_start_vm_service_after_vm_is_initialized_test,
> pkg/vm_service/test/failure_to_start_vm_service_during_vm_initialization_test
>
> Fixes: https://github.com/dart-lang/sdk/issues/60256
> Change-Id: I0543ab26e5721a4048136f27e8f4429bef04920f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416300
> Commit-Queue: Derek Xu <derekx@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>

Change-Id: I61eb42f0f00ad97e95e3ebf19990fe75d2d416aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/421622
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-04-09 09:29:58 -07:00
Derek Xu 56ccf437e6 [VM/Service] Shut down the VM immediately after the VM Service fails to start during VM initialization
TEST=pkg/vm_service/test/failure_to_start_vm_service_after_vm_is_initialized_test,
pkg/vm_service/test/failure_to_start_vm_service_during_vm_initialization_test

Fixes: https://github.com/dart-lang/sdk/issues/60256
Change-Id: I0543ab26e5721a4048136f27e8f4429bef04920f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416300
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-04-08 08:57:17 -07:00
Derek Xu 19e2a2d58c [VM/Debugger] Make Debugger::FindBestFit skip functions with non-real start or end positions
TEST=confirmed that pkg/vm_service/test/regress_60396_test passes with
the changes in this CL and fails without them

Fixes: https://github.com/dart-lang/sdk/issues/60396
Change-Id: I093fa3abf98b41c47786f0d37987ae771efe072e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/420880
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-04-07 13:48:53 -07:00
Derek Xu f559fe7e30 [VM/Service] Add await missing from _handleReloadSourcesRequest
This should make reload_sources_with_resident_compiler_test pass
consistently. This change re-enables the test on vm-win-release-x64, and
I will monitor its runs to see if it starts passing consistently.

CoreLibraryReviewExempt: This CL does not include any core library API
changes, only VM Service implementation changes in
sdk/lib/vmservice/running_isolates.dart.
Issue: https://github.com/dart-lang/sdk/issues/59909
Change-Id: I530da624aa926f148ba3ecdffbfc61b0e1048758
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410800
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-02-19 10:18:13 -08:00
Daco Harkes 440593fe9d [gardening] Mark test slow
(Apparently the other test doesn't exist anymore, and normalize
automatically removed it.)

Bug: https://github.com/dart-lang/sdk/issues/56979
Bug: https://github.com/dart-lang/sdk/issues/60067
Change-Id: I934c6dc4041925631de31d1832e4946002b411b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408300
Reviewed-by: Tess Strickland <sstrickl@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2025-02-06 05:19:25 -08:00
Jens Johansen 8521d4f5d9 [CFE] Fix coverage destroyed by (wrong) offsets on extension method tearoffs
Say you have a class method like this:

```
class Bar {
  /*offset a*/ void /*offset b*/ qux() {
    /*offset c*/ print("hello");
  }
}
```

Lets also say that this method is run.
This will mark offset a and offset c as hits.
Offset b does not exist in coverage terms.

Now say you have an extension mehod like this:

```
extension Foo on Bar {
  /*offset a*/ void /*offset b*/ baz() {
    /*offset c*/ print("hello");
  }
}
```

Lets also say that this method is also executed.
This will mark offset a and offset c as hits.
Offset b does not exist in coverage terms for this method.

Because extension methods are special though we create a special tearoff for
it. Lets say we didn't execute that one.
The tearoff method - before this CL - had offset b on positions that caused
the position to exist in coverage terms, and as the method wasn't executed
this would make it a miss.

This CL fixes the issue by setting the offsets on the tearoff that before
introduced offset b to offset a instead.

Change-Id: I3a5339135f3d76327624b35f04cc14afccaf487a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404563
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-01-27 01:27:50 -08:00
Jens Johansen 46c9c29b6f [vm] Fix crash when expression evaluating with extension type with type parameter is available
Fixes https://github.com/dart-lang/sdk/issues/59653

Tested: Manually; added pkg/vm_service/test/issue_59653_test.dart and existing tests / CI.
Change-Id: I0969720c4d7c50e8756406477abe791891877abb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405381
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2025-01-23 23:26:39 -08:00
Derek Xu c8151ab03a [VM/Service] Write the info files associated with resident compilers started by tests into temp directories
Also re-enables the tests on vm-win-release-x64 because having different
tests try to communicate with the same resident compiler in parallel was
definitely a source of flakiness, and I don't think there's any way of
knowing whether or not it was the only source of flakiness without
re-enabling it on the bots.

Issue: https://github.com/dart-lang/sdk/issues/59909
Change-Id: I831f32779e0946fb35811edaeaaa5ddb38e51d97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404460
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2025-01-23 07:59:07 -08:00
asiva 3ffd659296 [vm_service] Added new tests to the skip list on all hosts
The new resident frontend server tests were flaking on Windows bots causing lots of hanging processes which needed cleanup. This CL skips these tests on Windows until the cause of flakiness is found and fixed.

See issue https://github.com/dart-lang/sdk/issues/59909

TEST=ci

Change-Id: Id2fb4b4022bcd04e39c407185818888154e348b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404520
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-01-14 19:26:30 -08:00
Derek Xu 337e07fab6 [VM/Service] Use the resident frontend server for hot reload when it's available
TEST=pkg/vm_service/test/reload_sources_with_resident_compiler_test.dart
and pkg/vm_service/test/breakpoint_resolution_after_reloading_with_resident_compiler_test.dart

CoreLibraryReviewExempt: This CL does not include any core library API
changes, only VM Service implementation changes within
sdk/lib/vmservice/.
Change-Id: Ibc99cd37439ddd8aca97fa7e18a5112cbfc3b4cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401646
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-01-08 14:51:12 -08:00
Jens Johansen e8ebee8845 [CFE] Expression evaluation will use static type when given 'dynamic'
Fixes https://github.com/dart-lang/sdk/issues/57040

Change-Id: I0f954390c364a91816f66af821e12bee93d4746a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400302
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2024-12-16 00:28:58 -08:00
Jens Johansen 2b5b3163e6 [status_file] Status file linting should not check for non-existing files when given input on stdin
Given input on stdin it has no path to resolve the relative paths that
exists in a status file from. It will thus complain about almost all
lines which is not ideal.
This CL changes it so it doesn't check for it when given data on stdin.
This also means that - because there are no old errors on that account -
if there are such errors now you will be forced to fix it.
The current errors in the status files I could find have also been
fixed.

This should for instance have flaggen when I in
https://dart-review.googlesource.com/c/sdk/+/400320 updated the
pkg.status file but forgot to actually rename the underlying file
(as fixed in https://dart-review.googlesource.com/c/sdk/+/400560).
Technically I suppose it _did_ flag it, but there were also hundreds of
lines of false positives caused by the old status file been given at
stdin to check if there were existing errors - which there then was, thus not forcing me to do anything.

Logical follow-up to https://dart-review.googlesource.com/c/sdk/+/370886

TEST=ci
Change-Id: Ib3533ede88b6d99a31f8b423c00930857e0ba49f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400620
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-12-13 05:37:29 -08:00
Jens Johansen aa6ed3fff7 [vm_service] Renamed badly named tests to _test.dart
We've accumulated some tests that wasn't named as such, thus not
actually being run.

Change-Id: Ia42a99de14312af6f7b3ddfa5a107b74bf5ae663
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400320
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-12-12 23:08:49 -08:00
Jens Johansen 91ba6976db [CFE/VM] Fix expression evaluation to not introduce new parameters because of extension types
To support expression evaluation on extension types - which are a static
thing and thus doesn't exist in the VM - on the CFE side we try to find
the available variables so that, for any variables that are found to be
extension types, we can treat them as such. This was introduced in
https://dart-review.googlesource.com/c/sdk/+/339900.

The problem is that this could accidentally _introduce_ new variables,
which would introduce new arguments to the created procedure causing
weird behavior in the VM as for instance seen in
https://github.com/dart-lang/sdk/issues/56911.

This CL makes sure to only set the type for already known variables (as
passed by the VM), thus not introducing new variables and fixing the
issues seen.

Fixes https://github.com/dart-lang/sdk/issues/56911

Change-Id: Ie8b8ae12438338e9c3d248d00cc5da81df5b8ece
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400120
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-12-12 23:03:32 -08:00
Derek Xu 282594f457 Skip pkg/dds/test/log_history_size_gigantic_test on Windows ARM64 bots
Fixes: https://github.com/dart-lang/sdk/issues/59597
Change-Id: Ifb84eb3c3c58377c6d6dba68543091e6b47357ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/399000
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-12-05 18:20:17 +00:00
Derek Xu 3f6928c172 [VM/Service] Correctly forward errors returned by external clients that handle 'compileExpression' requests
TEST=pkg/vm_service/test/forward_compile_expression_error_from_external_client_with_dds_test.dart
and pkg/vm_service/test/forward_compile_expression_error_from_external_client_without_dds_test.dart

CoreLibraryReviewExempt: This CL does not include any core library API
changes, only VM Service implementation changes in
sdk/lib/vmservice/running_isolates.dart.
Fixes: https://github.com/dart-lang/sdk/issues/59603
Change-Id: I2b9edf69feb6149c80afe9fc753c73e069af0479
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397580
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-11-27 17:31:07 +00:00
Johnni Winther 808fa4ca8b [cfe] Move tool/_fasta/ to tool/
Change-Id: I5b7348fb4adb4e7f4039c91d54d712c1eb131ecf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395002
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-11-18 07:49:01 +00:00
Derek Xu bfbbe5c6b6 [VM/Service] Delete all the Service ID zones created by a client when it disconnects
TEST=pkg/vm_service/test/id_zone_deletion_on_client_disconnect_with_dds_test.dart,
pkg/vm_service/test/id_zone_deletion_on_client_disconnect_without_dds_test.dart,
CI

Issue: https://github.com/dart-lang/sdk/issues/55869
CoreLibraryReviewExempt: This CL does not include any core library API
changes, only VM Service implementation changes in
sdk/lib/vmservice/client.dart and
sdk/lib/vmservice/running_isolates.dart.
Change-Id: I32a72ade89b858519c61b5124adbeafb835c3d61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381520
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-10-02 15:46:31 +00:00
Derek Xu 162a35f654 Skip pkg/vm_service/test/id_zones_test on AOT configurations
This test makes use of `debugger()`, which isn't supported on AOT.

Change-Id: I88b6e21c5b3121873c753becb86a03add0234f4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382660
Commit-Queue: Derek Xu <derekx@google.com>
Auto-Submit: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-08-29 14:49:07 +00:00
Ben Konyi 81a786168f Skip vm_service/test/wildcard_test.dart on AOT runtimes
This test makes use of `debugger()`, which isn't supported on AOT.

Change-Id: Id3fa5e4fca061100182ea1d84cf9953b1bfd125f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380800
Commit-Queue: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2024-08-15 17:17:51 +00:00
Jake Macdonald 856f841806 skip macro executor test on windows
Bug: https://github.com/dart-lang/sdk/issues/56002
Change-Id: I17be8a32c23ca4908ed89cafe0f796022d21f24b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379240
Commit-Queue: Jake Macdonald <jakemac@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2024-08-06 22:32:18 +00:00
Jens Johansen 856139bfc3 [VM] Add RecordCoverage to InstanceCall and StaticCall
Before this CL, becase of optimizations, coverage of some of these goes
away, making coverage unreliable.

I believe this fixes the issues for "regular" runs (at least it seems to
be stable on the CFE coverage tests).

If setting `--optimization-counter-threshold=-1` there'll still be
trouble though and we would have to also insert these calls in the start
of FunctionBody and the start of FieldInitializer for it to produce the
same results.

TEST=pkg/vm_service/test/coverage_instance_call_after_optimization_test.dart,pkg/vm_service/test/coverage_static_call_after_optimization_test.dart

Bug: https://github.com/dart-lang/sdk/issues/42061
Bug: https://github.com/dart-lang/sdk/issues/55959
Bug: https://github.com/dart-lang/sdk/issues/56018

Change-Id: I34947f0d4b123e52ce67b71a195782d31e4bda16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370501
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-06-17 10:47:58 +00:00
Jens Johansen c15466034e [status_files] Cleanup status files
Make tool (by default) give error when test entry specified in status
file does not exist. Make -w (by default) remove such entries.

Cleanup most status files, fixing a few entries containing `.dart` and
removing obsolete entries (i.e. entries pointing to nonexisting tests).

This should for instance have given an error in
https://dart-review.googlesource.com/c/sdk/+/370600 saying that the file
I specified didn't exist (in that I shouldn't have specified the `.dart`
part).

TEST=No tests, this is status file maintenance.

Change-Id: Ie977bf15dea2e3dad8d771fd3e99917317e975f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370886
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2024-06-12 10:21:23 +00:00
Jens Johansen 49e0c0b33e [vm_service] Skip vm_service/test/coverage_closure_call_after_optimization_test.dart in aot (2nd try)
I by mistake added ".dart" in the status file in the first go, making it
not match.

Fixes https://github.com/dart-lang/sdk/issues/55974

Change-Id: Ibc0b9163b0a14766cf9cc6b43746f0bd6bc4ad90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370800
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-06-11 06:58:24 +00:00
Jens Johansen 2645665183 [vm_service] Skip vm_service/test/coverage_closure_call_after_optimization_test.dart in aot
Change-Id: I03e8445064b54ec2f9b19b0440b691e6835fab83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370600
Commit-Queue: Slava Egorov <vegorov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-06-10 13:46:25 +00:00
Ben Konyi b2ff33a3e3 [ package:vm_service] Skip regress_55559_test on AOT configurations
The test spawns a Dart process from source using
Platform.resolvedExecutable, which won't work in AOT.

Change-Id: Ic2a220f656ba0ea04714ecf6a680ad88a0731f93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365320
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-05-02 17:20:37 +00:00
pq c99470637a remove deleted tests
Change-Id: I2b4c632a4e97e2a70153603b124cf8c8c7a6b8f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364966
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-04-30 18:26:39 +00:00
Daco Harkes dabad3bb30 [gardening] Mark test as slow
The test runs multiple test cases in sequence.

Bug: https://github.com/dart-lang/sdk/issues/54950
Change-Id: Id57771c2456ad18d14c7b6112a5cd2764336df01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352909
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-02-19 10:21:38 +00:00
Konstantin Shcheglov 8780e559ec analyzer/test/src/summary/macro_test: Slow, Pass
Change-Id: Ic295fe3c12a7c78723fdc8c308777a6ee547ca68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351681
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-09 23:47:32 +00:00
Nicholas Shahan 0dbeb2135e [test_runner] Rename host-checked to host-asserts
Cleanup this old naming scheme before adding new configs for DDC
that run with assertions enabled in the host compiler.

Change-Id: Icbdee694fac46b3a1d5bab7ee7411c8e9be8c4a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335385
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2024-02-08 22:01:09 +00:00
asiva c539f57b00 [VM/vm_service] Fix for https://github.com/dart-lang/sdk/issues/54641
- Skip stdio_newline_test in AOT mode
- Fix capture_stdio_test and dds_stdout_stderr_history tests under the
  observatory directory to account for the new line fix.

TEST=ci

Bug:54641
Change-Id: Ic5403ab30a1367e4ec9e6798545837813f8f1060
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346685
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-01-17 19:19:23 +00:00
Jens Johansen 9985bad4ea [CFE] Remove unused fasta/sdk_test.dart
Also remove 'onlyCrashes' option which was only used there.

Change-Id: Iba1486058d561284d71aabf13431f302e7c5b9b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346520
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-01-16 13:18:57 +00:00
Ben Konyi a6b6a61349 [ package:vm_service ] Mark some tests as slow
The following tests are flakily timing out and probably just need some
more execution time:

- get_cpu_samples_rpc_test
- get_perfetto_cpu_samples_rpc_test
- valid_source_locations_test

Change-Id: I3274927b23069ef3ce4e1af7bb2a9fab23967e5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341041
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2023-12-11 18:52:27 +00:00
Ben Konyi f6205e0013 [ test matrix ] Run package:vm_service tests on VM configurations
Change-Id: I69eb125f0df46bdc3be65b99985bfcdaa0d51bfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337300
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-12-08 15:58:52 +00:00
Dan Chevalier 275aa86331 Rename service_extension_router to dart_service_protocol_shared
Change-Id: I14621db0faa7d472b2cd54f2e91a727f936be271
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336089
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Dan Chevalier <danchevalier@google.com>
2023-11-14 21:34:28 +00:00
Ryan Macnak ddc30e839f [test] Skip pkg tests requiring Chrome on Linux and Windows ARM64.
Bug: https://github.com/dart-lang/sdk/issues/53933
Change-Id: I09737e90d6be4e794472eea76192d3248f78bec0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334641
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-11-07 20:35:10 +00:00
Jens Johansen ed64348f68 [kernel] Calculate scopes for expression evaluation differently
This CL introduces an alternative way to calculate scopes for
expression evaluations. Currently the previous method is kept as well.

What this does is that it:

* Finds all nodes that match the offset and uri. (Ideally there's only
  one, but that's not always the case --- it's the case for less than
  60% of cases in the test added actually).
* Calculate the scope along the way.
* Return the scopes of all the found nodes that offset.

A test that asks for ~all file offsets in the dill files in the sdk and
compares the result with the scope the binary serialization computes is
added.
A single point can't always be found (for all dills in the sdk
only ~58.93% returns a single result), but for each query the wanted
scope is among the results returned.
For the non-outline dills in the sdk, between ~87.93% and ~94.52% of
the results are either a single result or multiple results with the
same actual scope in all of them.

Note that the test asks for ~all offsets, not just "debuggable" or
"stopable" offsets (which will likely vary depending on the vm/web
backend etc) --- likely the percentage will be higher for those points
though.

When this returns multiple results one can likely be picked by the
client based on information it has about names of variables in scope
etc.

Note that the test is rather slow, on my machine with the platforms
available there it makes 3,908,181 queries in ~3.5 minutes.
(Which corresponds to roughly 18,610 per second or under 0.06 ms per
query on average though, so it doesn't seem like a concert for actually
using it.)

Change-Id: I40b5360fcd935c70629543737e89a787de36ca16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332204
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-11-06 09:38:40 +00:00
Ryan Macnak 9fa33d8acd [test] Skip pkg tests requiring Chrome on Linux and Windows ARM64.
Bug: https://github.com/dart-lang/sdk/issues/53933
Change-Id: I3d4971431964f385d40d7315146873efefe941ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333601
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-11-03 16:26:39 +00:00
Sigmund Cherem d358abfd1f [web] do not run most 'pkg' suite on web compilers
Many tests under `pkg`, like `pkg/js_ast` and `pkg/analyzer_cli` are
meant to run as unit tests in the Dart VM. These were also being run in
dart2js and causing flakiness because they took a long time to build on
our CQ.

Locally some of these tests compile in under 5s, but we see the
compile-time vary among the bots a lot. I've observed cases close to 30s
and some that reach the 1-minute timeout cutoff. Flakiness data show
that this is happening between 5-7% of the runs, especially on linux
bots.

This CL stops running these tests on the dart2js configuration by
changing which subset of the `pkg` suite is provided to dart2js. It also
adjusts the .status file to skip a few suites for convenience on local
testing only. This allows developers locally to run `test.py -n... pkg`
without worrying about filtering out skipped suites.

Addendum: after discussions on the CL we decided not to cmpletely drop
coverage of js_ast tests on JS to ensure it can be used in browser
environments in the future. To support this we made made the tests
cheaper by removing the dependency on package:test. They will now only
be run in a single configuration, which is all we need for this purpose.
We can reevaluate and remove this if we continue to see timeouts.

Change-Id: Idf0dbdd37e412ef71ba117ec979cb1e52585c431
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330704
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-10-20 19:08:17 +00:00
Ben Konyi 55eecf9777 [ package:vm_service ] Skip some DevFS tests on Windows
Fixes https://github.com/dart-lang/sdk/issues/53773

Fixed: 53773
Change-Id: Ib10c75d1a703113dd135a51382343114d7a451ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330860
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-10-17 16:47:24 +00:00
William Hesse 401073af3e [linter] Only run linter unit tests on the vm runtime
Bug: https://github.com/dart-lang/linter/issues/4411
Change-Id: Ib5d4389df4ada62b480ea907034d99c7563fc641
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322343
Reviewed-by: Jonas Termansen <sortie@google.com>
2023-08-23 13:13:47 +00:00
Daco Harkes bd1bad7afc [deps/ffi] Unbundle package:native_assets_builder
The Dart SDK CL for https://github.com/dart-lang/native/pull/69.

Bug: https://github.com/dart-lang/native/issues/67
Change-Id: I45d7ac691a6aaa41bce5be0e36403021a948bb4f
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311740
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2023-06-28 09:09:09 +00:00
William Hesse 6a37857855 [test] Mark analyzer/test/verify_docs_test as slow
Fixes: https://github.com/dart-lang/sdk/issues/52738
Change-Id: Iaba3f3cab566073c8739f274e16d24e181e7209b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310280
Auto-Submit: William Hesse <whesse@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-06-20 12:06:50 +00:00
Daco Harkes d360edf2f3 [pkg][vm] Native Assets builder
This package contains the logic for building native assets.

This package is the backend that invokes toplevel `build.dart` scripts.
For more info on these scripts see https://github.com/dart-lang/native.

This is a separate package so that dartdev and flutter_tools can reuse
the same logic without flutter_tools having to import dartdev.

Some design decisions:

* We don't yet have `build_dependencies`, so we use the ordinary
  dependency graph for ordering of native assets builds. (If there is
  a cycle we refuse to run.)
  Bug: https://github.com/dart-lang/pub/issues/3794
* Builds are cached based on all the configuration provided by the
  caller. Environment variables are ignored in caching. This CL also
  contains a unit test that invokes the build by not passing through
  environment variables. However, for Windows we need to pass through
  at least `SYSTEMROOT` for MSVC to run correctly. So we might need
  to further explore if we can/want to lock env variables down.
  Bug: https://github.com/dart-lang/native/issues/32
  Bug: https://github.com/dart-lang/native/issues/33

Run tests:
```
dart tools/generate_package_config.dart && \
tools/test.py -n unittest-asserts-release-linux pkg/native_assets_builder
```

Bug: https://github.com/dart-lang/sdk/issues/50565
Change-Id: I133052d7195373e87d20924d61e1e96e3d34ce8f
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300203
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Hossein Yousefi <yousefi@google.com>
2023-05-15 13:49:30 +00:00
Tess Strickland e506581534 [pkg] Don't run native_stack_traces test on non-VM runtimes.
Fixed: https://github.com/dart-lang/sdk/issues/52174

Change-Id: I64b8b389ed5e80484367fe9475bb898dd493a319
Cq-Include-Trybots: luci.dart.try:dart2js-minified-linux-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298620
Commit-Queue: Tess Strickland <sstrickl@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Tess Strickland <sstrickl@google.com>
2023-04-26 14:43:08 +00:00
Ryan Macnak 3d8424e9fc [test] Introduce status variable $simulator, and fix some cases missing simarm_x64.
TEST=ci
Change-Id: Ie2a8ac015b2d316527d648956c86d4c7cb319d26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292962
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-04-04 03:10:26 +00:00