Skip to content
This repository has been archived by the owner on Jun 19, 2019. It is now read-only.

vm_display_runtime_error and vm_display_syntax_error report: length differs #337

Open
mykmelez opened this issue Dec 15, 2016 · 2 comments

Comments

@mykmelez
Copy link
Contributor

It also throws Error: boo!, but that's intentional. The problem with the test script is not that it throws that error, it's that it crashes after doing so instead of exiting normally.

=== release vm_display_runtime_error ===
Path: message/vm_display_runtime_error
beginning
JS error at test.vm:1: Error: boo!

test.vm:1

Error: boo!
at test.vm:1:7
at Script.prototype.runInThisContext (vm.js:25:12)
at exports.runInThisContext (vm.js:77:10)
at /Users/myk/Projects/spidernode/test/message/vm_display_runtime_error.js:7:1
at Module.prototype._compile (module.js:560:16)
at Module._extensions[".js"] (module.js:569:3)
at Module.prototype.load (module.js:477:3)
at tryModuleLoad (module.js:436:5)
at Module._load (module.js:428:3)
at Module.runMain (module.js:594:3)
at run (bootstrap_node.js:382:7)
at startup (bootstrap_node.js:137:9)
at bootstrap_node.js:497:3
Assertion failure: !joinable(), at /Users/myk/Projects/spidernode/deps/spidershim/spidermonkey/js/src/threading/Thread.h:122
Command: out/Release/node /Users/myk/Projects/spidernode/test/message/vm_display_runtime_error.js
--- CRASHED (Signal: 11) ---

@mykmelez mykmelez added this to the pass Node tests milestone Dec 15, 2016
@mykmelez
Copy link
Contributor Author

vm_display_syntax_error, vm_dont_display_runtime_error, and vm_dont_display_syntax_error also have this issue.

=== release vm_display_syntax_error ===
Path: message/vm_display_syntax_error
beginning
foo.vm:1
var 4;

SyntaxError: missing variable name
at exports.runInThisContext (vm.js:76:16)
at /Users/myk/Projects/spidernode/test/message/vm_display_syntax_error.js:8:3
at Module.prototype._compile (module.js:560:16)
at Module._extensions[".js"] (module.js:569:3)
at Module.prototype.load (module.js:477:3)
at tryModuleLoad (module.js:436:5)
at Module._load (module.js:428:3)
at Module.runMain (module.js:594:3)
at run (bootstrap_node.js:382:7)
at startup (bootstrap_node.js:137:9)
at bootstrap_node.js:497:3
JS error at test.vm:1: SyntaxError: missing variable name
test.vm:1
var 5;

SyntaxError: missing variable name
at exports.runInThisContext (vm.js:76:16)
at /Users/myk/Projects/spidernode/test/message/vm_display_syntax_error.js:13:1
at Module.prototype._compile (module.js:560:16)
at Module._extensions[".js"] (module.js:569:3)
at Module.prototype.load (module.js:477:3)
at tryModuleLoad (module.js:436:5)
at Module._load (module.js:428:3)
at Module.runMain (module.js:594:3)
at run (bootstrap_node.js:382:7)
at startup (bootstrap_node.js:137:9)
at bootstrap_node.js:497:3
Assertion failure: !joinable(), at /Users/myk/Projects/spidernode/deps/spidershim/spidermonkey/js/src/threading/Thread.h:122
Command: out/Release/node /Users/myk/Projects/spidernode/test/message/vm_display_syntax_error.js
--- CRASHED (Signal: 11) ---
=== release vm_dont_display_runtime_error ===
Path: message/vm_dont_display_runtime_error
beginning
middle
JS error at test.vm:1: Error: boo!

test.vm:1

Error: boo!
at test.vm:1:7
at Script.prototype.runInThisContext (vm.js:25:12)
at exports.runInThisContext (vm.js:77:10)
at /Users/myk/Projects/spidernode/test/message/vm_dont_display_runtime_error.js:16:1
at Module.prototype._compile (module.js:560:16)
at Module._extensions[".js"] (module.js:569:3)
at Module.prototype.load (module.js:477:3)
at tryModuleLoad (module.js:436:5)
at Module._load (module.js:428:3)
at Module.runMain (module.js:594:3)
at run (bootstrap_node.js:382:7)
at startup (bootstrap_node.js:137:9)
at bootstrap_node.js:497:3
Assertion failure: !joinable(), at /Users/myk/Projects/spidernode/deps/spidershim/spidermonkey/js/src/threading/Thread.h:122
Command: out/Release/node /Users/myk/Projects/spidernode/test/message/vm_dont_display_runtime_error.js
--- CRASHED (Signal: 11) ---
=== release vm_dont_display_syntax_error ===
Path: message/vm_dont_display_syntax_error
beginning
middle
JS error at test.vm:1: SyntaxError: missing variable name

test.vm:1
var 5;

SyntaxError: missing variable name
at exports.runInThisContext (vm.js:76:16)
at /Users/myk/Projects/spidernode/test/message/vm_dont_display_syntax_error.js:16:1
at Module.prototype._compile (module.js:560:16)
at Module._extensions[".js"] (module.js:569:3)
at Module.prototype.load (module.js:477:3)
at tryModuleLoad (module.js:436:5)
at Module._load (module.js:428:3)
at Module.runMain (module.js:594:3)
at run (bootstrap_node.js:382:7)
at startup (bootstrap_node.js:137:9)
at bootstrap_node.js:497:3
Assertion failure: !joinable(), at /Users/myk/Projects/spidernode/deps/spidershim/spidermonkey/js/src/threading/Thread.h:122
Command: out/Release/node /Users/myk/Projects/spidernode/test/message/vm_dont_display_syntax_error.js
--- CRASHED (Signal: 11) ---

@mykmelez mykmelez changed the title vm_display_runtime_error crashes vm_display_runtime_error, vm_display_syntax_error, vm_dont_display_runtime_error, and vm_dont_display_syntax_error crash Dec 15, 2016
@mykmelez mykmelez changed the title vm_display_runtime_error, vm_display_syntax_error, vm_dont_display_runtime_error, and vm_dont_display_syntax_error crash vm_display_runtime_error and vm_display_syntax_error report: length differs Apr 7, 2017
@mykmelez
Copy link
Contributor Author

mykmelez commented Apr 7, 2017

The tests no longer crash, but they still fail, apparently because the error reports (with stack) don't match the regex patterns that the tests are using to see if the output is what they expect:

[00:00|% 0|+ 0|- 0]: release vm_display_runtime_error length differs.
expect=15
actual=17
patterns:
pattern = ^beginning$
pattern = ^test.vm:1$
pattern = ^throw\ new\ Error("boo!")$
pattern = ^^$
pattern = ^Error:\ boo!$
pattern = ^\ \ \ \ at\ test.vm:1:7$
pattern = ^\ \ \ \ at\ ContextifyScript.Script.runInThisContext\ (vm.js:.)$
pattern = ^\ \ \ \ at\ Object.runInThisContext\ (vm.js:.
)$
pattern = ^\ \ \ \ at\ Object.<anonymous>\ (.test.message.vm_display_runtime_error.js:.)$
pattern = ^\ \ \ \ at\ Module._compile\ (module.js:.
)$
pattern = ^\ \ \ \ at\ Object.Module._extensions..js\ (module.js:.
)$
pattern = ^\ \ \ \ at\ Module.load\ (module.js:.)$
pattern = ^\ \ \ \ at\ tryModuleLoad\ (module.js:.
:.)$
pattern = ^\ \ \ \ at\ Function.Module._load\ (module.js:.
)$
pattern = ^\ \ \ \ at\ Module.runMain\ (module.js:.*)$
outlines:
outline = beginning
outline = JS error at test.vm:1: Error: boo!
outline = test.vm:1
outline = Error: boo!
outline = at test.vm:1:7
outline = at Script.prototype.runInThisContext (vm.js:44:12)
outline = at runInThisContext (vm.js:116:10)
outline = at /Users/myk/Projects/spidernode/test/message/vm_display_runtime_error.js:28:1
outline = at Module.prototype._compile (module.js:585:16)
outline = at Module._extensions[".js"] (module.js:595:3)
outline = at Module.prototype.load (module.js:503:3)
outline = at tryModuleLoad (module.js:466:5)
outline = at Module._load (module.js:458:3)
outline = at Module.runMain (module.js:620:3)
outline = at run (bootstrap_node.js:437:7)
outline = at startup (bootstrap_node.js:147:9)
outline = at bootstrap_node.js:552:3
=== release vm_display_runtime_error ===
Path: message/vm_display_runtime_error
beginning
JS error at test.vm:1: Error: boo!

test.vm:1

Error: boo!
at test.vm:1:7
at Script.prototype.runInThisContext (vm.js:44:12)
at runInThisContext (vm.js:116:10)
at /Users/myk/Projects/spidernode/test/message/vm_display_runtime_error.js:28:1
at Module.prototype._compile (module.js:585:16)
at Module._extensions[".js"] (module.js:595:3)
at Module.prototype.load (module.js:503:3)
at tryModuleLoad (module.js:466:5)
at Module._load (module.js:458:3)
at Module.runMain (module.js:620:3)
at run (bootstrap_node.js:437:7)
at startup (bootstrap_node.js:147:9)
at bootstrap_node.js:552:3
Command: out/Release/node /Users/myk/Projects/spidernode/test/message/vm_display_runtime_error.js
[00:00|% 50|+ 0|- 1]: release vm_display_syntax_error length differs.
expect=29
actual=32
patterns:
pattern = ^beginning$
pattern = ^foo.vm:1$
pattern = ^var\ 4;$
pattern = ^\ \ \ \ ^$
pattern = ^SyntaxError:\ Unexpected\ number$
pattern = ^\ \ \ \ at\ createScript\ (vm.js:.)$
pattern = ^\ \ \ \ at\ Object.runInThisContext\ (vm.js:.
)$
pattern = ^\ \ \ \ at\ Object.<anonymous>\ (.test.message.vm_display_syntax_error.js:.)$
pattern = ^\ \ \ \ at\ Module._compile\ (module.js:.
)$
pattern = ^\ \ \ \ at\ Object.Module._extensions..js\ (module.js:.
)$
pattern = ^\ \ \ \ at\ Module.load\ (module.js:.)$
pattern = ^\ \ \ \ at\ tryModuleLoad\ (module.js:.
:.)$
pattern = ^\ \ \ \ at\ Function.Module._load\ (module.js:.
)$
pattern = ^\ \ \ \ at\ Module.runMain\ (module.js:.)$
pattern = ^\ \ \ \ at\ run\ (bootstrap_node.js:.
)$
pattern = ^test.vm:1$
pattern = ^var\ 5;$
pattern = ^\ \ \ \ ^$
pattern = ^SyntaxError:\ Unexpected\ number$
pattern = ^\ \ \ \ at\ createScript\ (vm.js:.)$
pattern = ^\ \ \ \ at\ Object.runInThisContext\ (vm.js:.
)$
pattern = ^\ \ \ \ at\ Object.<anonymous>\ (.test.message.vm_display_syntax_error.js:.)$
pattern = ^\ \ \ \ at\ Module._compile\ (module.js:.
)$
pattern = ^\ \ \ \ at\ Object.Module._extensions..js\ (module.js:.
)$
pattern = ^\ \ \ \ at\ Module.load\ (module.js:.)$
pattern = ^\ \ \ \ at\ tryModuleLoad\ (module.js:.
:.)$
pattern = ^\ \ \ \ at\ Function.Module._load\ (module.js:.
)$
pattern = ^\ \ \ \ at\ Module.runMain\ (module.js:.)$
pattern = ^\ \ \ \ at\ run\ (bootstrap_node.js:.
)$
outlines:
outline = beginning
outline = foo.vm:1
outline = var 4;
outline = SyntaxError: missing variable name
outline = at createScript (vm.js:74:10)
outline = at runInThisContext (vm.js:116:10)
outline = at /Users/myk/Projects/spidernode/test/message/vm_display_syntax_error.js:29:3
outline = at Module.prototype._compile (module.js:585:16)
outline = at Module._extensions[".js"] (module.js:595:3)
outline = at Module.prototype.load (module.js:503:3)
outline = at tryModuleLoad (module.js:466:5)
outline = at Module._load (module.js:458:3)
outline = at Module.runMain (module.js:620:3)
outline = at run (bootstrap_node.js:437:7)
outline = at startup (bootstrap_node.js:147:9)
outline = at bootstrap_node.js:552:3
outline = JS error at test.vm:1: SyntaxError: missing variable name
outline = test.vm:1
outline = var 5;
outline = SyntaxError: missing variable name
outline = at createScript (vm.js:74:10)
outline = at runInThisContext (vm.js:116:10)
outline = at /Users/myk/Projects/spidernode/test/message/vm_display_syntax_error.js:34:1
outline = at Module.prototype._compile (module.js:585:16)
outline = at Module._extensions[".js"] (module.js:595:3)
outline = at Module.prototype.load (module.js:503:3)
outline = at tryModuleLoad (module.js:466:5)
outline = at Module._load (module.js:458:3)
outline = at Module.runMain (module.js:620:3)
outline = at run (bootstrap_node.js:437:7)
outline = at startup (bootstrap_node.js:147:9)
outline = at bootstrap_node.js:552:3
=== release vm_display_syntax_error ===
Path: message/vm_display_syntax_error
beginning
foo.vm:1
var 4;

SyntaxError: missing variable name
at createScript (vm.js:74:10)
at runInThisContext (vm.js:116:10)
at /Users/myk/Projects/spidernode/test/message/vm_display_syntax_error.js:29:3
at Module.prototype._compile (module.js:585:16)
at Module._extensions[".js"] (module.js:595:3)
at Module.prototype.load (module.js:503:3)
at tryModuleLoad (module.js:466:5)
at Module._load (module.js:458:3)
at Module.runMain (module.js:620:3)
at run (bootstrap_node.js:437:7)
at startup (bootstrap_node.js:147:9)
at bootstrap_node.js:552:3
JS error at test.vm:1: SyntaxError: missing variable name
test.vm:1
var 5;

SyntaxError: missing variable name
at createScript (vm.js:74:10)
at runInThisContext (vm.js:116:10)
at /Users/myk/Projects/spidernode/test/message/vm_display_syntax_error.js:34:1
at Module.prototype._compile (module.js:585:16)
at Module._extensions[".js"] (module.js:595:3)
at Module.prototype.load (module.js:503:3)
at tryModuleLoad (module.js:466:5)
at Module._load (module.js:458:3)
at Module.runMain (module.js:620:3)
at run (bootstrap_node.js:437:7)
at startup (bootstrap_node.js:147:9)
at bootstrap_node.js:552:3
Command: out/Release/node /Users/myk/Projects/spidernode/test/message/vm_display_syntax_error.js

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant