mozilla/spidernode

vm_dont_display_runtime_error and vm_dont_display_syntax_error report: length differs

Opened this issue · 1 comments

In addition to crashing (#337), vm_dont_display_runtime_error and vm_dont_display_syntax_error display the errors they aren't supposed to display. Based on my reading of the test scripts, this wouldn't actually cause the tests to fail, since the scripts don't actually check whether or not the errors get displayed. But it's still a test failure in spirit.

=== 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) ---

As with vm_display_runtime_error and vm_display_syntax_error in #337, vm_dont_display_runtime_error and vm_dont_display_syntax_error are no longer crashing but are still failing 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_dont_display_runtime_error length differs.
expect=16
actual=18
patterns:
pattern = ^beginning$
pattern = ^middle$
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_dont_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 = middle
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_dont_display_runtime_error.js:37: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_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:44:12)
at runInThisContext (vm.js:116:10)
at /Users/myk/Projects/spidernode/test/message/vm_dont_display_runtime_error.js:37: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_dont_display_runtime_error.js
[00:00|% 50|+ 0|- 1]: release vm_dont_display_syntax_error length differs.
expect=16
actual=18
patterns:
pattern = ^beginning$
pattern = ^middle$
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_dont_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 = middle
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_dont_display_syntax_error.js:37: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_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 createScript (vm.js:74:10)
at runInThisContext (vm.js:116:10)
at /Users/myk/Projects/spidernode/test/message/vm_dont_display_syntax_error.js:37: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_dont_display_syntax_error.js