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

service tests need to be migrated to dart2 configuration #31587

Closed
mraleph opened this issue Dec 8, 2017 · 5 comments
Closed

service tests need to be migrated to dart2 configuration #31587

mraleph opened this issue Dec 8, 2017 · 5 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.
Milestone

Comments

@mraleph
Copy link
Member

mraleph commented Dec 8, 2017

When I try running service tests with --strong a lot of them are failing. I have updated the status files.

@mraleph mraleph added this to the 2.0-alpha milestone Dec 8, 2017
@mraleph
Copy link
Member Author

mraleph commented Dec 8, 2017

/cc @a-siva @zanderso

whesse pushed a commit that referenced this issue Dec 11, 2017
…ation.

Switch it to use pkg/vm/tool/dart2 which is the source of truth for what
Dart 2 VM configuration means. Don't pass any additional flags from
tools/test.py itself.

Align pkg/vm/tool/dart2 with what tools/test.py was passing to VM on _2 suites.

Make default invocation `tools/test.py -c dartk --strong -m release,debug`
green by updating status files and skipping suites that are not Dart 2.0
compliant. I have filed issues #31588 for isolate suite and #31587 for
service suite.

Change-Id: I882b28f6a011eabf69c349ff0792b275434e39ff
Reviewed-on: https://dart-review.googlesource.com/27820
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
whesse pushed a commit that referenced this issue Dec 12, 2017
…ation.

Switch it to use pkg/vm/tool/dart2 which is the source of truth for what
Dart 2 VM configuration means. Don't pass any additional flags from
tools/test.py itself.

Align pkg/vm/tool/dart2 with what tools/test.py was passing to VM on _2 suites.

Make default invocation `tools/test.py -c dartk --strong -m release,debug`
green by updating status files and skipping suites that are not Dart 2.0
compliant. I have filed issues #31588 for isolate suite and #31587 for
service suite.

Reland of https://dart-review.googlesource.com/27820

Change-Id: I49400fae716f75425e70bf1e561b3375ba39157e
Reviewed-on: https://dart-review.googlesource.com/28565
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
whesse pushed a commit that referenced this issue Dec 18, 2017
Bug: #31587
Change-Id: I032be8e25aa8d6a851f0bf00ec12b1a3578308c6
Reviewed-on: https://dart-review.googlesource.com/30080
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
whesse pushed a commit that referenced this issue Dec 19, 2017
This reverts commit c6f1ce2.

Reason for revert: standalone_2/io/socket_exception_test failing

Original change's description:
> Misc "strong" mode fixes for dart:io.
> 
> Bug: #31587
> Change-Id: I032be8e25aa8d6a851f0bf00ec12b1a3578308c6
> Reviewed-on: https://dart-review.googlesource.com/30080
> Reviewed-by: Zach Anderson <zra@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

TBR=rmacnak@google.com,zra@google.com,asiva@google.com

Change-Id: I9af0570577009b54e3a43f083008d65c4c3f9ba3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: #31587
Reviewed-on: https://dart-review.googlesource.com/30420
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
whesse pushed a commit that referenced this issue Dec 19, 2017
Bug: #31587
Change-Id: I9fc7d83aab68ee2b30d71f8a3a75b74fa4dde55e
Reviewed-on: https://dart-review.googlesource.com/30390
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
whesse pushed a commit that referenced this issue Dec 19, 2017
Remove changes to Socket.flush and Socket.done.

Split socket_test and socket_exceptions_test so we can minimize suppressions.

Bug: #31587
Bug: #31685
Bug: #27453
Change-Id: I3c44223480554f57d66be048c0361f6d0c699be2
Reviewed-on: https://dart-review.googlesource.com/30389
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
whesse pushed a commit that referenced this issue Dec 20, 2017
Bug: #31587
Change-Id: Ie2605f5043b9f5d2f9156928e3cd39f74e726853
Reviewed-on: https://dart-review.googlesource.com/30681
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
@floitschG floitschG added the area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. label Dec 22, 2017
whesse pushed a commit that referenced this issue Jan 9, 2018
Bug: #31587
Change-Id: I812fd4cd8e74875ce7ada9886035137af2fef73a
Reviewed-on: https://dart-review.googlesource.com/33100
Reviewed-by: Siva Annamalai <asiva@google.com>
whesse pushed a commit that referenced this issue Jan 9, 2018
This reverts commit 6ccd7b8.

Reason for revert: analyzer failures

Original change's description:
> Partial static mode changes for vm-service and tests (part 3).
> 
> Bug: #31587
> Change-Id: I812fd4cd8e74875ce7ada9886035137af2fef73a
> Reviewed-on: https://dart-review.googlesource.com/33100
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=rmacnak@google.com,asiva@google.com

Change-Id: Ic368fc23f58e02cafbaf6ae81dbcbffc3dcced13
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: #31587
Reviewed-on: https://dart-review.googlesource.com/33240
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
whesse pushed a commit that referenced this issue Jan 10, 2018
Fix dynamic mode static warnings.

Bug: #31587
Change-Id: I966349f5409f911efacd11f08ffd469373bcd434
Reviewed-on: https://dart-review.googlesource.com/33540
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
whesse pushed a commit that referenced this issue Jan 10, 2018
… (part 3).""

This reverts commit c9f6e86.

Reason for revert: Change brakes Observatory:

```
$ out/ReleaseX64/dart --observe hello.dart
Observatory listening on http://127.0.0.1:8181/
Hello, world!
vm-service: isolate(348927110)  'hello.dart:main()' has no debugger attached and is paused at exit.  Connect to Observatory at http://127.0.0.1:8181/ to debug.
```

Going to the website I get
```
Unexpected exception:

NoSuchMethodError: method not found: 'castTo'
Receiver: ""
Arguments: [Instance of 'it']

StackTrace:

main.dart.js 2017:3     Object.f
main.dart.js 2203:30    Object.qn
main.dart.js 21316:11   b3.aQ
main.dart.js 20634:6    b3.c2
main.dart.js 20643:8    TZ.$1
main.dart.js 36992:29   UB.$0
main.dart.js 36982:9    Ux.nq
main.dart.js 36990:30   UC.$1
main.dart.js 36992:29   UB.$0
main.dart.js 36982:9    Ux.nq
===== asynchronous gap ===========================
main.dart.js 4840:12    Zh.e4
main.dart.js 3930:17    L.lK
main.dart.js 3932:28    L.ad
main.dart.js 20621:12   b3.dart.ba.lE
main.dart.js 20621:112  b3.dart.ba.lE
main.dart.js 20603:22   b3.cD
===== asynchronous gap ===========================
main.dart.js 4840:12    Zh.e4
main.dart.js 3930:17    L.lK
main.dart.js 3932:28    L.ad
main.dart.js 20621:12   ms.dart.ba.lE
main.dart.js 20621:112  ms.dart.ba.lE
main.dart.js 15829:10   Y4.bs
```

and Observatory is completely broken.

From #31397 it seems that Observatory uses an "old" sdk, i.e. we cannot use new stuff as castTo.

Original change's description:
> Reapply "Partial static mode changes for vm-service and tests (part 3)."
>
> Fix dynamic mode static warnings.
>
> Bug: #31587
> Change-Id: I966349f5409f911efacd11f08ffd469373bcd434
> Reviewed-on: https://dart-review.googlesource.com/33540
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=rmacnak@google.com,asiva@google.com

Change-Id: I775544cb5ab212cc836bc63181bdce31d19380b8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: #31587
Reviewed-on: https://dart-review.googlesource.com/33800
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
whesse pushed a commit that referenced this issue Jan 11, 2018
Remove use of castTo, which is not yet available in the prebuilt SDK used to build Observatory.

Bug: #31587
Change-Id: Ia118710a2c4dca1851935d284e1a78a9c6517256
Reviewed-on: https://dart-review.googlesource.com/34022
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
@jensjoha
Copy link
Contributor

Most of the remaining issues seems to be caused by #31876 - i.e. Something is just a List where it's expected to be a List<something>. For instance this fixes most remaining RuntimeErrors:

diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
index 1b9159bfd0..5cdbb0089d 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -3582,7 +3582,14 @@ class Script extends HeapObject implements M.Script {
     loadTime = new DateTime.fromMillisecondsSinceEpoch(loadTimeMillis);
     lineOffset = map['lineOffset'];
     columnOffset = map['columnOffset'];
-    _parseTokenPosTable(map['tokenPosTable']);
+    List tokenPosTable = map['tokenPosTable'];
+    _parseTokenPosTable(
+      new List<List<int>>.from(
+        tokenPosTable.map(
+          (sublist) => new List<int>.from(sublist),
+        ),
+      ),
+    );
     source = map['source'];
     _processSource(map['source']);
     library = map['library'];

leaving only the CompileTimeErrors and

causal_async_star_stack_contents_test: RuntimeError
code_test: RuntimeError
debugger_location_second_test: RuntimeError
dev_fs_spawn_test: RuntimeError

(at least 2 of which are seemingly caused by basically the same issue:

  • causal_async_star_stack_contents_test: Unexpected exception in service tests: type 'List' is not a subtype of type 'List'
  • code_test: Unexpected exception in service tests: type 'List' is not a subtype of type 'List' where
  • debugger_location_second_test: type '_Future' is not a subtype of type 'Future' where
  • dev_fs_spawn_test: Unexpected exception in service tests: ServerRpcException(_spawnUri: invalid 'args' parameter: [one, two, three])

)

@rmacnak-google
Copy link
Contributor

I have it down to mostly crashes in the testee process in the kernel reader.

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

@rmacnak-google
Copy link
Contributor

Nevermind, I've read my mail out of order.

whesse pushed a commit that referenced this issue Jan 12, 2018
Bug: #31587
Bug: #31696
Change-Id: I2b37ad97da0520db08f43981fdbc48b094942a0e
Reviewed-on: https://dart-review.googlesource.com/34306
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
@a-siva a-siva modified the milestones: 2.0-alpha1, 2.0-alpha2 Jan 31, 2018
@a-siva
Copy link
Contributor

a-siva commented Feb 21, 2018

@rmacnak-google landed a number of changes to make the tests strong mode clean, we have only one issue pending which is being tracked in #31696
Closing this issue.

@a-siva a-siva closed this as completed Feb 21, 2018
@JekCharlsonYu JekCharlsonYu modified the milestones: 2.0-alpha2, I/O Beta 2 Feb 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

6 participants