Commit Graph

2501 Commits

Author SHA1 Message Date
Martin Kustermann e50a59d2f2 [gardening] Add stdout/stderr from subprocess if subprocess failed and makes test fail
Locally this test doesn't seem to fail though it did so on a nightly builder.
If the test fails again we'll have more information on what goes wrong.

TEST=Adding more information to test.

Change-Id: Id5ca71d42322c813ba3cfd56e9dfe335160e2e7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196497
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-04-23 10:23:31 +00:00
Xiao Yu d968304570 Reland "Revert commits part of #40548 which still has some design debates and breaks valid local network http traffic"
This is a reland of d84f359786

Original change's description:
> Revert commits part of #40548 which still has some design debates and breaks valid local network http traffic
>
> Bug: https://github.com/flutter/flutter/issues/72723
> Change-Id: Ib5f809fccf1fad69add441fd40c463da8dc8be36
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192953
> Auto-Submit: Xiao Yu <xster@google.com>
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>

Bug: https://github.com/flutter/flutter/issues/72723
Change-Id: I466d888b3f324a996f0bef0463e7ab3df3179c56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195485
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Xiao Yu <xster@google.com>
2021-04-16 20:25:36 +00:00
Xiao Yu f560d90059 Revert "Revert commits part of #40548 which still has some design debates and breaks valid local network http traffic"
This reverts commit d84f359786.

Reason for revert: removed some private looking but actually vm-entrypoints used by Flutter engine https://buganizer.corp.google.com/issues/185462669

Original change's description:
> Revert commits part of #40548 which still has some design debates and breaks valid local network http traffic
>
> Bug: https://github.com/flutter/flutter/issues/72723
> Change-Id: Ib5f809fccf1fad69add441fd40c463da8dc8be36
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192953
> Auto-Submit: Xiao Yu <xster@google.com>
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>

TBR=lrn@google.com,vegorov@google.com,xster@google.com

Change-Id: Ie746805ab7ef214bc4ba6f3582eb1d32672360ee
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/flutter/flutter/issues/72723
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195484
Reviewed-by: Xiao Yu <xster@google.com>
Commit-Queue: Xiao Yu <xster@google.com>
2021-04-15 15:29:28 +00:00
Xiao Yu d84f359786 Revert commits part of #40548 which still has some design debates and breaks valid local network http traffic
Bug: https://github.com/flutter/flutter/issues/72723
Change-Id: Ib5f809fccf1fad69add441fd40c463da8dc8be36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192953
Auto-Submit: Xiao Yu <xster@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-04-15 09:25:17 +00:00
asiva f642761c54 [Runtime/Tests] - Do not output large amount of test data to stdout
- typed_data_isolate_test was printing received data to stdout which
causes trucation issues when running in the test script, changed test to
verify the received data and not print to stdout.

TEST=modifying a test.

Change-Id: I99357960e80fcdd2d65676c6bef326799f1d4d98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194884
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-04-12 04:51:05 +00:00
Alexander Aprelev bddded13aa [io/lookup] Ensure public type InternetAddress is used in lookup methods.
Use of private _InternetAddress class in method declarations results
in errors when user attempts to for example provide timeout handler.

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

Change-Id: Ied83479d7ce6319d0a82985c667ad29ef58cf6de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193720
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-03-31 19:43:42 +00:00
Ben Konyi c4bfca9b6a [ dart:io / package:vm_service ] Add HTTP request profiling service
extensions

This change adds HTTP request profiling support to the dart:io service
extensions and removes HTTP request/response body logging to the
timeline due to memory constraints.

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

TEST=pkg/vm_service/test/get_http_profile_test.dart

Change-Id: I85642296c3d6595197f3365022477c7685c452bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189881
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
2021-03-24 23:01:03 +00:00
Alexander Aprelev f5432d7164 [io/http] Relax http parsing constraints around CRLF.
https://tools.ietf.org/html/rfc2616\#section-19.3 advises to
allow CR*LF wherever CRLF line terminator is expected.

Issue https://github.com/dart-lang/sdk/issues/43916

TEST=http_client_parser_crlf_tolerant_test, http_100_continue_test

Change-Id: I8c6d263bdb950b2f3992b69921eff0ee75704c10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192120
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-03-20 03:11:28 +00:00
Martin Kustermann 5c78cc8e9a [vm] Update standalone/io/large_file_read_small_file_test for windows ia32
Seemingly Windows ia32 doesn't allow large file reads sometimes, so
we'll shrink the 10 MB buffer used in a test to 1 MB and use 10 times
as many buffers.

Issue b/178993708
Issue https://github.com/dart-lang/sdk/issues/44846

TEST=standalone{,_2}/io/large_file_read_small_file_test

Change-Id: Ie3b52517c6a8561c1ba4ec1039441bf1ad899569
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183695
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-02-26 15:47:47 +00:00
Martin Kustermann e74b2391ed [gardening] Fix test to pass along VM arguments to subprocess
If the test runs in AOT mode the executable is
`dart_precompiled_runtime` and the script is the AOT snapshot.

If the AOT snapshot was compiled with `--enable-assert` then the
subprocess has to be launched with the same flag.

TEST=Fixes current test failure in dartkp-weak-asserts-mac-release-simarm64 mode.

Change-Id: I69a17f9a355f8729e9047f98c920a5c7c2480293
Fixed: 3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187920
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-02-26 13:49:47 +00:00
Ryan Macnak 5a385890b9 [test] Apply simarm64 status file entries to simarm64c.
Remove references to the removed simarmv6 architecture.

TEST=ci
Change-Id: I10e9fc8291c3e5b6b9a4bd71ca05de95e53f22c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187500
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-02-25 21:18:02 +00:00
Alexander Aprelev 86de80224d [vm/io/ssl] Add OtherResources to the https_connection_closed_during_handshake_test so it works on precomp bots.
Fixes https://github.com/dart-lang/sdk/issues/45056

Change-Id: I4e373693aa483007abbf14df419b2a3edad76282
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185901
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-02-20 00:15:05 +00:00
Alexander Aprelev c051bdb43a [vm/io/ssl] Update test so it forces exception when server disconnect during handshake.
This is follow-up to https://dart.googlesource.com/sdk/+/c1677553d1ef529ecdbc1caba877ae2ab5e35bd4.

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

Change-Id: I9d66ae003897131ecb911fd68a8b30496f90ec24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185720
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-02-19 17:33:24 +00:00
Alexander Aprelev c1677553d1 [build] Update boringssl to 1607f54fed72c6589d560254626909a64124f091
Bug: https://github.com/dart-lang/sdk/issues/41061
Change-Id: I6a02cd3ba42030bf88646e89664515c04234fdb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185487
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-02-18 23:57:20 +00:00
Lasse R.H. Nielsen 9cbed61204 Fix type bug in dart:io HTTP client code.
This would have been caught if the static type had not
been made `Future<dynamic>`.

Fixes #44895

BUG= http://dartbug.com/44895
TEST= standalone/io/regress_44895

Change-Id: I237c552fdb42943b395352a7232b34ab5488ac6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184261
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-02-10 18:00:11 +00:00
Clement Skau 2236883ff2 [SDK] Removes non-exiting tests from .status
TEST=Tested all configurations.

Change-Id: Iec00d7e6ea56221ffebcf044de22647907f598f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182500
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2021-02-04 06:46:13 +00:00
Martin Kustermann c3def74ffe [vm/io] Shrink buffers using realloc() if actual used data is small
Issue b/178993708

TEST=standalone{,_2}/io/large_file_read_small_file_test

Change-Id: I3c6f09f4f79f6dd1150db2918cefed3587e34012
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182268
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2021-02-02 20:04:22 +00:00
asiva 35b31654ed [VM / Tests] Fix tests to use '-verbosity=warning'
Fix tests to use '--verbosity=warning' so they don't produce
extraneous output.

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

TEST=Updating tests

Change-Id: I5a02dca2efabd392ba690a4b13aa0dc4ba25dedb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181360
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-01-27 19:06:39 +00:00
Alexander Aprelev 6b3abe0a98 [vm/concurrency] Add --experimental_enable_isolate_groups_jit flag, make --enable_isolate_groups AOT only.
Issue b/177800357.

TEST=existing test suite
Change-Id: Id6b113932ab7014b8fa6c105845c5c490b60f5e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181320
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2021-01-27 17:11:29 +00:00
Alexander Aprelev eccff3bc4d [io/http] Fix http_parser_header_add_test so it doesn't depend on external web server.
This is follow-up to https://dart.googlesource.com/sdk/+/60bea3003de2ea030a1970924d5af7b4a53f3a72.

Issue: https://github.com/dart-lang/sdk/issues/44756

Change-Id: I3c76fe0d15e4aba26540a95c63ccba8480dc8315
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180722
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-01-23 06:07:21 +00:00
Alexander Aprelev 60bea3003d Reland "[tests] rewrite and format several tests on http"
This reverts commit af4330d382, relands original e35120cfd14ed09302596e9fa20d8e845e8e2668(in patchset 1) with fixes for the tests(in subsequent patchsets).

Change-Id: I025022d242a75ad94b3616ff78aef28b7b5f372b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180603
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-01-22 23:49:17 +00:00
Alexander Aprelev ee37fff58c [io/http] Have http parser reply with error if Content-Length and Transfer-Encoding are both specified on http request.
Issue b/150476984

Change-Id: Iafc7154c84682678e4d7e3d614b74942b0d259b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180485
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-01-22 18:32:43 +00:00
jonahwilliams d4d3e3698c [dart:io] ensure Process.start throws with a stack trace
Change-Id: I8b5d585b10752a873632b3a7b9447214e2d38954
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179640
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Jonah Williams <jonahwilliams@google.com>
2021-01-16 01:36:02 +00:00
Nate Bosch 58e7e7eb26 Prepare for breaking change in package:http
The `url` argument is changing from `Object`, accepting either `String`
or `Uri` at runtime, to `Uri` for better static help.
https://github.com/dart-lang/http/pull/507

- Switch to using `Uri` for requests. Where sensible push this type into
  the signature of the surrounding method.
- Make some updated method private where they were unnecessarily public
  which makes it harder to have confidence when looking for usages.
  Rename a method with an unnecessary `get` name.

Change-Id: Ibf075741d6b9d292349b15f1dc84004981729aca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179368
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2021-01-15 16:35:01 +00:00
Lasse R.H. Nielsen ef8cc2c1cf Remove LateInitializationError.
As per planned breaking change to let platforms decide how they and what throw for late initiaization errors,
we no longer need a public `LateInitializationError` class. It's confusing to have one if some platforms throw
something else instead.

Removes the public abstract class. The dart:_internal implementation class `LateError` no longer implements it.
This is the only implementation of the public interface, and the class which platforms either throw directly,
or through front-end lowering of the feature.

Remove mentions in tests. All tests now just expect `Error`, some platform specific tests might test the message.

TEST=rewrote tests referring to LateInitializationError.

Change-Id: I54344a67f89ce101ed770412db134e12354cdcc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174928
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-01-12 20:21:33 +00:00
Alexander Aprelev a173599f4c [io/lookup] On iOS run both ipv6- and ipv4-lookup concurrently.
On iOS name resolution can take unexpectedly long because it waits for both ipv4 and ipv6 results and in some cases ipv6 lookup can take long. This CL runs explicit ipv4 and ipv6 concurrently and picks up first successfully resolved name it can connect to.

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

TEST=standalone/io/http_force_concurrent_ipv6_lookup_test

Change-Id: Ie9b7ca0493d945e2eeb8de1dec7bbacdeb902785
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177560
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-01-11 17:07:26 +00:00
Ryan Macnak b957f09c6b [infra] Expand TSAN coverage.
Bug: https://github.com/dart-lang/sdk/issues/39611
Change-Id: I060403da4b5daff91b60805bad1e83865e021133
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139496
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-12-09 19:31:50 +00:00
Lasse R.H. Nielsen b62ad8247f Switch order of socket tests to avoid timing issue.
Also fix one more place where ??= was appropriate.

Bug: https://github.com/dart-lang/sdk/issues/44414
Change-Id: I323bd0b82a1070a7e1341bee3a917564af45cafa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175360
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2020-12-09 16:19:00 +00:00
Alexander Aprelev e2e1c63fcd [io/ssl/mac] Move boringssl ssl data structures manipulation out of certificate evaluator.
Boringssl data structures are not neccessary thread-safe, so should not be handled on certificate evaluator that runs asynchronously. That leaves only (potentially long-running) SecTrust call to be done by certificate evaluator.

Fixes https://github.com/flutter/flutter/issues/70800.

TEST=io/https_connection_closed_during_handshake_test.dart

Change-Id: I6f77f1efc9ec83c50e6bcc551c0f63d6465c763e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174340
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-12-02 02:29:57 +00:00
Martin Kustermann 4084271488 [vm] Fix tests/standalone_2/io/shared_socket_test - avoid relying on tcp port 1234 always to be free
The tests/standalone_2/io/shared_socket_test test was assuming it can
always bind to port 1234. This is generally not the case. Due to using
two different `// VMOptions=` this test is made into two tests which run
close to each other, often making one of them fail.

Change-Id: I047396bc3f53626c429c1e5464bd071ae6a01a30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174621
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-12-01 19:54:18 +00:00
Clement Skau 2d36c85ff8 [vm] Removes support for --causal-async-stacks
All existing embedders have been opted into --lazy-async-stacks, the
VM also uses it as it's default in all configurations.

After this CL, any user of --causal-async-stacks will get an error
message when trying to use it.
=> In any such case, please simply remove the flag.

TEST=Exhaustive CQ.

Bug: https://github.com/dart-lang/sdk/issues/37668
Change-Id: Ia440afcf2dba464aa8b8cf381b93bbac8eb9f8dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172564
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-12-01 07:27:14 +00:00
Martin Kustermann 587b4612aa [vm] Update status file, marking more tests as Pass, Slow
Follow up to

   https://dart-review.googlesource.com/c/sdk/+/173970

TEST=No changes, only updating status files.

Change-Id: I0c53cd68f1e404be0fb699eee84eeb5813bcafb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174130
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-11-26 19:16:04 +00:00
Ben Konyi 2752e9686b Skip standalone{_2}/check_for_aot_snapshot_jit_test on non-JIT test
configurations

This test tries to AOT compile a sample test program and run it in a JIT
VM to ensure a useful error message is output. This test doesn't make
sense in non-JIT test environments and should be skipped.

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

Fixed: 44227
Change-Id: I17abbf8512944ac77bb9cad1c486ae77aac26c7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172401
Reviewed-by: Régis Crelier <regis@google.com>
2020-11-16 22:20:59 +00:00
Martin Kustermann 22f1b7b88e [gardening] Add two more needed resources for standalone/io/test_extension_fail_test.dart
Also fix another test that was missing // OtherResources= annotations

When reproducing the failures, one has to remember to `rm -rf out/Release/generated_*`

Closes https://github.com/dart-lang/sdk/issues/44204

Change-Id: If838a5fcdf56bcb094ba2ca211163c3b5007a3c3
Fixed: 24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171943
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2020-11-14 10:30:27 +00:00
Martin Kustermann 838fe41428 [gardening] Add missing helper files to make test pass in appjit mode
In app-jit mode the Platform.script is in a different place. The test
needs files next to it in order to run.

Change-Id: Icc05287c6cba37fcdc9f8cd54edefb3657a0084c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171887
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-11-13 12:04:29 +00:00
Ryan Macnak c8dea19836 [vm, gc] Reserve some memory to use during handling of OutOfMemoryErrors.
This reserved space can only be allocated from after an allocation has failed from OutOfMemory, and once some portion of this space is used, refilling it is the first allocation performed after GC.

Also avoid greatly slowing down from ineffective scavenges as the memory limit is reached.

Bug: https://github.com/dart-lang/sdk/issues/43543
Bug: https://github.com/dart-lang/sdk/issues/43642
Bug: b/169880355
Change-Id: Ic7132cb34d7a7d13c67661f057f00dd74306251c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165862
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-10-30 23:07:22 +00:00
Leaf Petersen a6faf8f2f9 [Language] Enable null safety in Dart 2.12.
Closes https://github.com/dart-lang/sdk/issues/22

Change-Id: I662dd17fda0ff62a871314896fbf1dbe220f41de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166790
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2020-10-29 18:25:56 +00:00
Alexander Markov fc317794dd [test] Fix standalone/io/windows_environment_test for NNBD
This test launches Dart sub-process and should pass VM options like
--enable-experiment=non-nullable and --sound-null-safety, otherwise
sub-process will try to run migrated Dart code without appropriate
flags.

Also, fix NNBD compile-time error in
tests/standalone/io/windows_environment_script.dart

Change-Id: I5bc0bf4ba32a3933c236c1a2f04cea3d7a1fa31a
Fixed: 1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167722
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-10-15 18:32:40 +00:00
Alexander Markov 4a6e2ae6e2 [Test] Skip standalone/entrypoints_verification_test on simarm_x64
This test uses native extension (shared library) which is not included
into cross-word builds.

Change-Id: I777f28f55dde96556590b8ef3a5673be6caa253d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167504
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-10-14 16:51:07 +00:00
Alexander Aprelev 340f78eab3 [vm/io] Add a test for nonblocking ssl certification evaluation.
This is follow-up to a6dafabb88.

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

Change-Id: I4da732ab08235a1f549d45c7fa5fb87db672e2aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166701
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-10-12 15:06:52 +00:00
Alexander Markov e9aa232066 Remove remaining tests for bytecode mode
Change-Id: I9690bd8a9bdcf16963424c64c1b80628e50fa28a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166922
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-10-09 22:30:19 +00:00
Ryan Macnak e078d4f00a [vm] Avoid allocations when reporting unhandled exceptions.
Bug: https://github.com/dart-lang/sdk/issues/43642
Bug: b/169880355
Change-Id: I260b9d47f2b65d3cb4a48b966557d139978947e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165740
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-10-05 20:42:02 +00:00
Ryan Macnak 7d79d215db [vm] Use handles instead of array allocation when executing catch entry moves
Issue https://github.com/dart-lang/sdk/issues/43543

Change-Id: I61472be2507ce97721ab162a8c86f9662ec27f72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164540
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-10-02 15:59:18 +00:00
Alexander Aprelev 48e5cba6b9 Reland "Enable long path on Windows"
This reverts commit f8fbefd951 in patchset 1 with fixes to the way how temporary strings are allocated and the way how prefixed string is returned in successive patchsets.

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

Change-Id: Idb801cb117fc2d84fad4c533f5239d8499afc943
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164741
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-10-02 00:54:46 +00:00
Alexander Markov 92c6523392 [tests/nnbd] Fix standalone/http_launch_test for simarm
The test should mention .dart_tool/package_config.json in the
'OtherResources' comment so it is properly copied by the test tool.

Issue: https://github.com/dart-lang/sdk/issues/43614
Change-Id: I98420e0abb2751f518d69b21ade194d9a715266c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165406
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-10-01 18:49:10 +00:00
Filip Hracek 7e7c01e804 Follow HTTP 308 redirects
Fixes https://github.com/dart-lang/sdk/issues/43548.

Bug: 43548
Change-Id: Ifd07941f4ae3ef9c9874c1be4254a2fe3c15ae2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165404
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-10-01 14:02:40 +00:00
Ben Konyi 6bc7248049 Skip regress_41329 tests on precompiled runtimes
(these tests target the dartdev workflow which is not supported in
 the precompiled runtime).

Also updated regress_41329_relative_test to not be a duplicate of the
absolute test.

Change-Id: I1df086c8cb2b6a03fad0043bc1f63b08370fdbae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165120
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2020-09-30 16:18:34 +00:00
Tess Strickland a4a714ebf9 [vm] Consolidate the *WriteStream hierarchy.
All *WriteStream classes are now part of the same hierarchy:

class BaseWriteStream : ValueObject;

  Base class for all *WriteStreams. Provides all the methods from
  the old WriteStream except for buffer() and SetPosition()
  (relegated to NonStreamingWriteStreams). Has one pure virtual
  method Realloc that must be overridden by concrete subclasses.

class NonStreamingWriteStream : BaseWriteStream;

  Base class for all *WriteStreams where the entire stream is available
  at all times (i.e., no flushing to an external sink). Extends the
  public BaseWriteStream API with buffer() (for accessing the stream
  contents) and SetPosition() (for changing the current stream pointer
  to the given absolute position in the stream).

class MallocWriteStream : NonStreamingWriteStream;

  Uses realloc to reallocate the internal buffer.  Almost the same as
  the old WriteStream, except that it only takes an initial size.  Adds
  one public method Steal() for taking ownership of the current buffer
  contents (after which the buffer is reset to an empty state). Instead
  of passing a pointer to a buffer, the internal buffer must be accessed
  via either Steal() or buffer(), which allows access to the current
  stream contents without changing ownership or resetting the stream.
  The internal buffer is freed on stream destruction.

class ZoneWriteStream: NonStreamingWriteStream;

  Takes a zone and reallocates the internal buffer in that zone. No
  additional public methods beyond those available from
  NonStreamingWriteStream.

class StreamingWriteStream : BaseWriteStream;

  Uses realloc to reallocate the internal buffer.  Generally same as
  before, where the contents of the stream are periodically flushed
  using Dart_StreamingWriteCallback. Since it extends BaseWriteStream,
  there are now more methods available for writing data to the stream
  than just Print/VPrint/WriteBytes. Since portions of the stream may be
  flushed and thus no longer in the internal buffer, does not provide
  access to the contents of the stream or a way to reposition the
  current stream pointer. Flushes any unflushed data and frees the
  internal buffer on stream destruction.

Also refactor things so that write streams are passed to appropriate
recipients, instead of the recipients taking arguments they only used to
create a WriteStream internally. Thus, recipients now can just specify
the appropriate base class for the public API used:

* BaseWriteStream for just writing to the stream, or
* NonStreamingWriteStream if re-positioning or the stream contents are
  needed.

Change-Id: I419096ecd9331483d168b079fca55b69ef397f15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164080
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-09-23 21:05:59 +00:00
Ben Konyi 2b1105d2fe [ dart:io ] Fix socket_connect_consume_write_close_test
The socket connection was being closed prematurely as the SocketServer
was not holding onto a reference to the connected socket. This was
previously fine since the network profiling implementation held on to a
reference within dart:io.

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

Change-Id: If85e0d63beb8299a9fbe86986c3d33a9c1bbb222
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163901
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-09-22 16:36:43 +00:00
Tess Strickland 37cfae173c [pkg/native_stack_traces] Make package NNBD compatible.
Bug: https://github.com/dart-lang/sdk/issues/43304
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: Iaf451047ce74add6520bd514bafae8b0e3c5fa59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161704
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-09-22 11:33:13 +00:00