diff options
author | Michaël Zasso <targos@protonmail.com> | 2017-03-21 10:16:54 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2017-03-25 09:44:10 +0100 |
commit | c459d8ea5d402c702948c860d9497b2230ff7e8a (patch) | |
tree | 56c282fc4d40e5cb613b47cf7be3ea0526ed5b6f /deps/v8/test/test262 | |
parent | e0bc5a7361b1d29c3ed034155fd779ce6f44fb13 (diff) | |
download | android-node-v8-c459d8ea5d402c702948c860d9497b2230ff7e8a.tar.gz android-node-v8-c459d8ea5d402c702948c860d9497b2230ff7e8a.tar.bz2 android-node-v8-c459d8ea5d402c702948c860d9497b2230ff7e8a.zip |
deps: update V8 to 5.7.492.69
PR-URL: https://github.com/nodejs/node/pull/11752
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Diffstat (limited to 'deps/v8/test/test262')
-rwxr-xr-x | deps/v8/test/test262/archive.py | 1 | ||||
-rw-r--r-- | deps/v8/test/test262/harness-adapt.js | 18 | ||||
-rwxr-xr-x | deps/v8/test/test262/list.py | 3 | ||||
-rw-r--r-- | deps/v8/test/test262/local-tests/test/intl402/DateTimeFormat/12.1.1_1.js | 42 | ||||
-rw-r--r-- | deps/v8/test/test262/local-tests/test/intl402/NumberFormat/11.1.1_1.js | 42 | ||||
-rwxr-xr-x | deps/v8/test/test262/prune-local-tests.sh | 15 | ||||
-rw-r--r-- | deps/v8/test/test262/test262.status | 248 | ||||
-rw-r--r-- | deps/v8/test/test262/testcfg.py | 52 | ||||
-rwxr-xr-x | deps/v8/test/test262/upstream-local-tests.sh | 22 |
9 files changed, 311 insertions, 132 deletions
diff --git a/deps/v8/test/test262/archive.py b/deps/v8/test/test262/archive.py index 894853e208..096e3c307f 100755 --- a/deps/v8/test/test262/archive.py +++ b/deps/v8/test/test262/archive.py @@ -29,6 +29,7 @@ def filter_git(tar_info): with tarfile.open('data.tar', 'w') as tar: tar.add('data', filter=filter_git) tar.add('harness', filter=filter_git) + tar.add('local-tests') # Workaround for GN. We can't specify the tarfile as output because it's # not in the product directory. Therefore we track running of this script diff --git a/deps/v8/test/test262/harness-adapt.js b/deps/v8/test/test262/harness-adapt.js index d93d7e1610..35d6f63ac6 100644 --- a/deps/v8/test/test262/harness-adapt.js +++ b/deps/v8/test/test262/harness-adapt.js @@ -90,6 +90,18 @@ function $DONE(arg){ quit(0); }; -var $ = { - evalScript(script) { return Realm.eval(Realm.current(), script); } -}; +function RealmOperators(realm) { + let $ = { + evalScript(script) { + return Realm.eval(realm, script); + }, + createRealm() { + return RealmOperators(Realm.createAllowCrossRealmAccess()); + }, + global: Realm.eval(realm, 'this') + }; + $.global.$ = $; + return $; +} + +var $ = RealmOperators(Realm.current()); diff --git a/deps/v8/test/test262/list.py b/deps/v8/test/test262/list.py index 9b36ce789c..a5c3c48f80 100755 --- a/deps/v8/test/test262/list.py +++ b/deps/v8/test/test262/list.py @@ -10,7 +10,8 @@ from itertools import chain os.chdir(os.path.dirname(os.path.abspath(__file__))) -for root, dirs, files in chain(os.walk("data"), os.walk("harness")): +for root, dirs, files in chain(os.walk("data"), os.walk("harness"), + os.walk("local-tests")): dirs[:] = [d for d in dirs if not d.endswith('.git')] for name in files: # These names are for gyp, which expects slashes on all platforms. diff --git a/deps/v8/test/test262/local-tests/test/intl402/DateTimeFormat/12.1.1_1.js b/deps/v8/test/test262/local-tests/test/intl402/DateTimeFormat/12.1.1_1.js new file mode 100644 index 0000000000..ef843d4bb4 --- /dev/null +++ b/deps/v8/test/test262/local-tests/test/intl402/DateTimeFormat/12.1.1_1.js @@ -0,0 +1,42 @@ +// Copyright 2012 Mozilla Corporation. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 12.1.1_1 +description: Tests that the this-value is ignored in DateTimeFormat. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ + +testWithIntlConstructors(function (Constructor) { + var obj, newObj; + + if (Constructor === Intl.DateTimeFormat) { + obj = new Constructor(); + newObj = Intl.DateTimeFormat.call(obj); + if (obj !== newObj) { + $ERROR("Should have modified existing object."); + } + var key = Object.getOwnPropertySymbols(newObj)[0]; + if (!(newObj[key] instanceof Intl.DateTimeFormat)) { + $ERROR("Should have installed a DateTimeFormat instance."); + } + return true; + } + + // variant 1: use constructor in a "new" expression + obj = new Constructor(); + newObj = Intl.DateTimeFormat.call(obj); + if (obj === newObj) { + $ERROR("DateTimeFormat object created with \"new\" was not ignored as this-value."); + } + + // variant 2: use constructor as a function + obj = Constructor(); + newObj = Intl.DateTimeFormat.call(obj); + if (obj === newObj) { + $ERROR("DateTimeFormat object created with constructor as function was not ignored as this-value."); + } + + return true; +}); diff --git a/deps/v8/test/test262/local-tests/test/intl402/NumberFormat/11.1.1_1.js b/deps/v8/test/test262/local-tests/test/intl402/NumberFormat/11.1.1_1.js new file mode 100644 index 0000000000..2d42609acb --- /dev/null +++ b/deps/v8/test/test262/local-tests/test/intl402/NumberFormat/11.1.1_1.js @@ -0,0 +1,42 @@ +// Copyright 2012 Mozilla Corporation. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 11.1.1_1 +description: Tests that the this-value is ignored in NumberFormat. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ + +testWithIntlConstructors(function (Constructor) { + var obj, newObj; + + if (Constructor === Intl.NumberFormat) { + obj = new Constructor(); + newObj = Intl.NumberFormat.call(obj); + if (obj !== newObj) { + $ERROR("Should have modified existing object."); + } + var key = Object.getOwnPropertySymbols(newObj)[0]; + if (!(newObj[key] instanceof Intl.NumberFormat)) { + $ERROR("Should have installed a NumberFormat instance."); + } + return true; + } + + // variant 1: use constructor in a "new" expression + obj = new Constructor(); + newObj = Intl.NumberFormat.call(obj); + if (obj === newObj) { + $ERROR("NumberFormat object created with \"new\" was not ignored as this-value."); + } + + // variant 2: use constructor as a function + obj = Constructor(); + newObj = Intl.NumberFormat.call(obj); + if (obj === newObj) { + $ERROR("NumberFormat object created with constructor as function was not ignored as this-value."); + } + + return true; +}); diff --git a/deps/v8/test/test262/prune-local-tests.sh b/deps/v8/test/test262/prune-local-tests.sh new file mode 100755 index 0000000000..a0c309bbe3 --- /dev/null +++ b/deps/v8/test/test262/prune-local-tests.sh @@ -0,0 +1,15 @@ +# Copyright 2016 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# usage: test/test262/prune-local-tests.sh +# This script removes redundant tests present in the local-tests directory +# when they are identical to upstreamed tests. It should be run as part of +# the test262 roll process. + +find -f test/test262/local-tests | while read localpath; do + datapath=${localpath/local-tests/data} + if diff $localpath $datapath >/dev/null ; then + git rm $localpath || exit 1 + fi +done diff --git a/deps/v8/test/test262/test262.status b/deps/v8/test/test262/test262.status index 17148cd0ba..4e36d22120 100644 --- a/deps/v8/test/test262/test262.status +++ b/deps/v8/test/test262/test262.status @@ -28,21 +28,8 @@ [ [ALWAYS, { - ###################### NEEDS INVESTIGATION ####################### - - # Date tests that fail in CE(S)T timezone. - # https://bugs.chromium.org/p/v8/issues/detail?id=5449 - 'built-ins/Date/prototype/setFullYear/new-value-time-clip': [PASS, FAIL], - 'built-ins/Date/prototype/setMonth/new-value-time-clip': [PASS, FAIL], - ###################### MISSING ES6 FEATURES ####################### - # The order of adding the name property is wrong - # https://code.google.com/p/v8/issues/detail?id=4199 - 'language/computed-property-names/class/static/method-number': [FAIL, FAIL_SLOPPY], - 'language/computed-property-names/class/static/method-symbol': [FAIL, FAIL_SLOPPY], - 'language/computed-property-names/class/static/method-string': [FAIL, FAIL_SLOPPY], - # https://code.google.com/p/v8/issues/detail?id=4248 'language/expressions/compound-assignment/S11.13.2_A5.*': [FAIL], 'language/expressions/compound-assignment/S11.13.2_A6.*': [FAIL], @@ -79,7 +66,6 @@ 'built-ins/Proxy/revocable/revocation-function-name': [FAIL], 'language/expressions/assignment/fn-name-lhs-cover': [FAIL], 'language/expressions/assignment/fn-name-lhs-member': [FAIL], - 'language/expressions/class/name': [FAIL], 'language/expressions/function/name': [FAIL], 'language/expressions/generators/name': [FAIL], 'intl402/NumberFormat/prototype/format/format-function-name': [FAIL], @@ -107,17 +93,17 @@ ###### END REGEXP SUBCLASSING SECTION ###### - # https://code.google.com/p/v8/issues/detail?id=4360 - 'intl402/Collator/10.1.1_1': [FAIL], - 'intl402/DateTimeFormat/12.1.1_1': [FAIL], - 'intl402/NumberFormat/11.1.1_1': [FAIL], - # https://bugs.chromium.org/p/v8/issues/detail?id=4895 + 'built-ins/TypedArrays/internals/DefineOwnProperty/detached-buffer': [FAIL], + 'built-ins/TypedArrays/internals/DefineOwnProperty/detached-buffer-realm': [FAIL], + 'built-ins/TypedArrays/internals/Get/detached-buffer': [FAIL], + 'built-ins/TypedArrays/internals/Get/detached-buffer-realm': [FAIL], + 'built-ins/TypedArrays/internals/GetOwnProperty/detached-buffer': [FAIL], + 'built-ins/TypedArrays/internals/GetOwnProperty/detached-buffer-realm': [FAIL], 'built-ins/TypedArrays/internals/HasProperty/detached-buffer': [FAIL], + 'built-ins/TypedArrays/internals/HasProperty/detached-buffer-realm': [FAIL], 'built-ins/TypedArrays/internals/Set/detached-buffer': [FAIL], - 'built-ins/TypedArrays/internals/GetOwnProperty/detached-buffer': [FAIL], - 'built-ins/TypedArrays/internals/Get/detached-buffer': [FAIL], - 'built-ins/TypedArrays/internals/DefineOwnProperty/detached-buffer': [FAIL], + 'built-ins/TypedArrays/internals/Set/detached-buffer-realm': [FAIL], # Some TypedArray methods throw due to the same bug, from Get 'built-ins/TypedArray/prototype/every/callbackfn-detachbuffer': [FAIL], 'built-ins/TypedArray/prototype/filter/callbackfn-detachbuffer': [FAIL], @@ -202,17 +188,6 @@ # https://bugs.chromium.org/p/v8/issues/detail?id=4034 'built-ins/ThrowTypeError/unique-per-realm-function-proto': [FAIL], - # https://bugs.chromium.org/p/v8/issues/detail?id=5535 - 'built-ins/ThrowTypeError/unique-per-realm-non-simple': [FAIL], - 'built-ins/ThrowTypeError/unique-per-realm-unmapped-args': [FAIL], - 'language/arguments-object/10.6-13-b-1-s': [FAIL], - 'language/arguments-object/10.6-13-b-2-s': [FAIL], - 'language/arguments-object/10.6-13-b-3-s': [FAIL], - 'language/arguments-object/10.6-14-1-s': [FAIL], - 'language/arguments-object/10.6-14-b-1-s': [FAIL], - 'language/arguments-object/10.6-14-b-4-s': [FAIL], - 'language/statements/class/strict-mode/arguments-caller': [FAIL], - # https://bugs.chromium.org/p/v8/issues/detail?id=4231 'language/eval-code/direct/var-env-lower-lex-catch-non-strict': [FAIL], @@ -302,9 +277,6 @@ 'built-ins/Function/prototype/toString/setter-object': [FAIL], 'built-ins/Function/prototype/toString/unicode': [FAIL], - # https://github.com/tc39/test262/issues/743 - 'intl402/Intl/getCanonicalLocales/main': [FAIL], - # https://bugs.chromium.org/p/v8/issues/detail?id=5115 'language/statements/class/subclass/class-definition-null-proto-missing-return-override': [FAIL], 'language/statements/class/subclass/class-definition-null-proto-this': [FAIL], @@ -325,23 +297,6 @@ 'annexB/built-ins/Object/prototype/__lookupGetter__/this-non-obj': [FAIL], 'annexB/built-ins/Object/prototype/__lookupSetter__/this-non-obj': [FAIL], - # https://bugs.chromium.org/p/v8/issues/detail?id=4973 - 'language/literals/numeric/non-octal-decimal-integer-strict': [FAIL], - - # https://bugs.chromium.org/p/v8/issues/detail?id=5130 - 'annexB/built-ins/Object/prototype/__lookupGetter__/lookup-own-data': [FAIL], - 'annexB/built-ins/Object/prototype/__lookupGetter__/lookup-own-get-err': [FAIL], - 'annexB/built-ins/Object/prototype/__lookupGetter__/lookup-own-proto-err': [FAIL], - 'annexB/built-ins/Object/prototype/__lookupGetter__/lookup-proto-data': [FAIL], - 'annexB/built-ins/Object/prototype/__lookupGetter__/lookup-proto-get-err': [FAIL], - 'annexB/built-ins/Object/prototype/__lookupGetter__/lookup-proto-proto-err': [FAIL], - 'annexB/built-ins/Object/prototype/__lookupSetter__/lookup-own-data': [FAIL], - 'annexB/built-ins/Object/prototype/__lookupSetter__/lookup-own-get-err': [FAIL], - 'annexB/built-ins/Object/prototype/__lookupSetter__/lookup-own-proto-err': [FAIL], - 'annexB/built-ins/Object/prototype/__lookupSetter__/lookup-proto-data': [FAIL], - 'annexB/built-ins/Object/prototype/__lookupSetter__/lookup-proto-get-err': [FAIL], - 'annexB/built-ins/Object/prototype/__lookupSetter__/lookup-proto-proto-err': [FAIL], - # https://bugs.chromium.org/p/v8/issues/detail?id=4451 'annexB/language/eval-code/direct/global-block-decl-eval-global-exsting-global-init': [FAIL], 'annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-exsting-global-init': [FAIL], @@ -370,12 +325,6 @@ 'annexB/language/eval-code/direct/func-switch-case-eval-func-block-scoping': [FAIL], 'annexB/language/eval-code/direct/func-switch-dflt-eval-func-block-scoping': [FAIL], - # https://bugs.chromium.org/p/v8/issues/detail?id=5137 - 'annexB/built-ins/RegExp/prototype/compile/flags-undefined': [FAIL], - 'annexB/built-ins/RegExp/prototype/compile/pattern-regexp-distinct': [FAIL], - 'annexB/built-ins/RegExp/prototype/compile/pattern-regexp-same': [FAIL], - 'annexB/built-ins/RegExp/prototype/compile/pattern-undefined': [FAIL], - # https://bugs.chromium.org/p/v8/issues/detail?id=5139 'annexB/built-ins/Date/prototype/setYear/time-clip': [FAIL], 'annexB/built-ins/Date/prototype/setYear/year-number-relative': [FAIL], @@ -393,16 +342,56 @@ 'built-ins/Number/S9.3.1_A2_U180E': [FAIL], # https://bugs.chromium.org/p/v8/issues/detail?id=5051 - 'language/expressions/call/trailing-comma': [FAIL], - 'language/statements/class/definition/params-trailing-comma': [FAIL], - 'language/statements/class/definition/params-trailing-comma-arguments': [FAIL], - - # https://bugs.chromium.org/p/v8/issues/detail?id=5326 - 'language/expressions/super/call-new-target-undef': [FAIL], - 'language/eval-code/direct/super-call-fn': [FAIL], - 'language/expressions/super/prop-dot-fn-no-super-bndng': [FAIL], - 'language/expressions/super/prop-expr-fn-no-super-bndng': [FAIL], - 'language/expressions/super/prop-expr-fn-eval-before-has-super': [FAIL], + 'language/expressions/arrow-function/params-trailing-comma': ['--harmony-trailing-commas'], + 'language/expressions/arrow-function/params-trailing-comma-length': ['--harmony-trailing-commas'], + 'language/expressions/call/trailing-comma': ['--harmony-trailing-commas'], + 'language/expressions/function/params-trailing-comma': ['--harmony-trailing-commas'], + 'language/expressions/function/params-trailing-comma-arguments': ['--harmony-trailing-commas'], + 'language/expressions/function/params-trailing-comma-length': ['--harmony-trailing-commas'], + 'language/expressions/generators/params-trailing-comma': ['--harmony-trailing-commas'], + 'language/expressions/generators/params-trailing-comma-arguments': ['--harmony-trailing-commas'], + 'language/expressions/generators/params-trailing-comma-length': ['--harmony-trailing-commas'], + 'language/expressions/object/method-definition/params-trailing-comma': ['--harmony-trailing-commas'], + 'language/expressions/object/method-definition/params-trailing-comma-arguments': ['--harmony-trailing-commas'], + 'language/expressions/object/method-definition/params-trailing-comma-length': ['--harmony-trailing-commas'], + 'language/statements/class/definition/params-trailing-comma': ['--harmony-trailing-commas'], + 'language/statements/class/definition/params-trailing-comma-arguments': ['--harmony-trailing-commas'], + 'language/statements/class/definition/params-trailing-comma-length': ['--harmony-trailing-commas'], + 'language/statements/function/params-trailing-comma': ['--harmony-trailing-commas'], + 'language/statements/function/params-trailing-comma-arguments': ['--harmony-trailing-commas'], + 'language/statements/function/params-trailing-comma-length': ['--harmony-trailing-commas'], + 'language/statements/generators/params-trailing-comma': ['--harmony-trailing-commas'], + 'language/statements/generators/params-trailing-comma-length': ['--harmony-trailing-commas'], + + # https://bugs.chromium.org/p/v8/issues/detail?id=4698 + 'language/expressions/call/tco-call-args': ['--harmony-tailcalls'], + 'language/expressions/call/tco-member-args': ['--harmony-tailcalls'], + 'language/expressions/comma/tco-final': ['--harmony-tailcalls'], + 'language/expressions/conditional/tco-cond': ['--harmony-tailcalls'], + 'language/expressions/conditional/tco-pos': ['--harmony-tailcalls'], + 'language/expressions/logical-and/tco-right': ['--harmony-tailcalls'], + 'language/expressions/logical-or/tco-right': ['--harmony-tailcalls'], + 'language/expressions/tagged-template/tco-call': ['--harmony-tailcalls'], + 'language/expressions/tagged-template/tco-member': ['--harmony-tailcalls'], + 'language/expressions/tco-pos': ['--harmony-tailcalls'], + 'language/statements/block/tco-stmt': ['--harmony-tailcalls'], + 'language/statements/block/tco-stmt-list': ['--harmony-tailcalls'], + 'language/statements/do-while/tco-body': ['--harmony-tailcalls'], + 'language/statements/for/tco-const-body': ['--harmony-tailcalls'], + 'language/statements/for/tco-let-body': ['--harmony-tailcalls'], + 'language/statements/for/tco-lhs-body': ['--harmony-tailcalls'], + 'language/statements/for/tco-var-body': ['--harmony-tailcalls'], + 'language/statements/if/tco-else-body': ['--harmony-tailcalls'], + 'language/statements/if/tco-if-body': ['--harmony-tailcalls'], + 'language/statements/labeled/tco': ['--harmony-tailcalls'], + 'language/statements/return/tco': ['--harmony-tailcalls'], + 'language/statements/switch/tco-case-body': ['--harmony-tailcalls'], + 'language/statements/switch/tco-case-body-dflt': ['--harmony-tailcalls'], + 'language/statements/switch/tco-dftl-body': ['--harmony-tailcalls'], + 'language/statements/try/tco-catch': ['--harmony-tailcalls'], + 'language/statements/try/tco-catch-finally': ['--harmony-tailcalls'], + 'language/statements/try/tco-finally': ['--harmony-tailcalls'], + 'language/statements/while/tco-body': ['--harmony-tailcalls'], # https://bugs.chromium.org/p/v8/issues/detail?id=5064 'language/expressions/arrow-function/params-dflt-duplicates': [FAIL], @@ -418,13 +407,6 @@ 'built-ins/TypedArrays/internals/Set/key-is-out-of-bounds': [FAIL], 'built-ins/TypedArrays/internals/Set/tonumber-value-throws': [FAIL], - # https://bugs.chromium.org/p/v8/issues/detail?id=5328 - 'built-ins/TypedArrays/internals/DefineOwnProperty/key-is-numericindex-desc-not-writable': [FAIL], - 'built-ins/TypedArrays/internals/DefineOwnProperty/key-is-not-integer': [FAIL], - 'built-ins/TypedArrays/internals/DefineOwnProperty/key-is-minus-zero': [FAIL], - 'built-ins/TypedArrays/internals/DefineOwnProperty/key-is-lower-than-zero': [FAIL], - 'built-ins/TypedArrays/internals/DefineOwnProperty/key-is-greater-than-last-index': [FAIL], - # https://bugs.chromium.org/p/v8/issues/detail?id=5329 'built-ins/RegExp/prototype/source/value-line-terminator': [FAIL], @@ -438,34 +420,87 @@ 'annexB/language/eval-code/direct/func-switch-case-eval-func-no-skip-try': [FAIL], 'annexB/language/eval-code/direct/func-switch-dflt-eval-func-no-skip-try': [FAIL], - # https://bugs.chromium.org/p/v8/issues/detail?id=5336 - 'language/expressions/super/call-proto-not-ctor': [FAIL], - # https://bugs.chromium.org/p/v8/issues/detail?id=5546 'language/expressions/tagged-template/invalid-escape-sequences': [FAIL], # https://bugs.chromium.org/p/v8/issues/detail?id=5537 'built-ins/global/*': [SKIP], - ######################## NEEDS INVESTIGATION ########################### + # PreParser doesn't produce early errors + # https://bugs.chromium.org/p/v8/issues/detail?id=2728 + 'language/expressions/async-arrow-function/early-errors-arrow-formals-body-duplicate': [FAIL], + 'language/expressions/async-function/early-errors-expression-formals-body-duplicate': [FAIL], + 'language/expressions/object/method-definition/generator-param-redecl-const': [FAIL], + 'language/expressions/object/method-definition/generator-param-redecl-let': [FAIL], + 'language/expressions/object/method-definition/name-param-redecl': [FAIL], + 'language/statements/async-function/early-errors-declaration-formals-body-duplicate': [FAIL], + + # Module-related tests + # v8:5485 + 'language/module-code/comment-multi-line-html*': [FAIL], + 'language/module-code/comment-single-line-html*': [FAIL], + + # v8:5486 + 'language/module-code/instn-iee-star-cycle': [FAIL], + 'language/module-code/instn-named-star-cycle': [FAIL], + 'language/module-code/instn-star-star-cycle': [FAIL], + + # v8:5487 + 'language/module-code/namespace/internals/get-own-property-str-found-uninit': [FAIL], + + # v8:5401 + 'language/module-code/namespace/internals/set': [FAIL], + 'language/module-code/namespace/internals/define-own-property': [FAIL], + + # Symbol.iterator on namespace objects was removed, tests need to be updated. + 'language/module-code/namespace/Symbol.iterator/*': [SKIP], + 'language/module-code/namespace/internals/get-own-property-sym': [SKIP], + 'language/module-code/namespace/internals/get-sym-found': [SKIP], + 'language/module-code/namespace/internals/has-property-sym-found': [SKIP], + 'language/module-code/namespace/internals/own-property-keys-binding-types': [SKIP], + 'language/module-code/namespace/internals/own-property-keys-sort': [SKIP], + + # Symbol.toString on namespace objects was made non-configurable, tests need + # to be updated. + 'language/module-code/namespace/Symbol.toStringTag': [SKIP], + + # Possible spec bug, see comment in https://github.com/tc39/ecma262/pull/747. + 'language/module-code/namespace/internals/delete-non-exported': [SKIP], + + # https://code.google.com/p/v8/issues/detail?id=4476 + 'built-ins/String/prototype/toLowerCase/special_casing_conditional': ['--icu-case-mapping'], + 'built-ins/String/prototype/toLowerCase/supplementary_plane': ['--icu-case-mapping'], + 'built-ins/String/prototype/toUpperCase/supplementary_plane': ['--icu-case-mapping'], + 'built-ins/String/prototype/toLocaleLowerCase/Final_Sigma_U180E': ['--icu-case-mapping'], + 'built-ins/String/prototype/toLowerCase/Final_Sigma_U180E': ['--icu-case-mapping'], + + # https://code.google.com/p/v8/issues/detail?id=4477 + 'built-ins/String/prototype/toLocaleUpperCase/supplementary_plane': ['--icu-case-mapping'], + 'built-ins/String/prototype/toLocaleLowerCase/supplementary_plane': ['--icu-case-mapping'], + 'built-ins/String/prototype/toLocaleLowerCase/special_casing_conditional': ['--icu-case-mapping'], + 'intl402/String/prototype/toLocaleLowerCase/special_casing_Azeri': ['--icu-case-mapping'], + 'intl402/String/prototype/toLocaleLowerCase/special_casing_Lithuanian': ['--icu-case-mapping'], + 'intl402/String/prototype/toLocaleLowerCase/special_casing_Turkish': ['--icu-case-mapping'], + 'intl402/String/prototype/toLocaleUpperCase/special_casing_Azeri': ['--icu-case-mapping'], + 'intl402/String/prototype/toLocaleUpperCase/special_casing_Lithuanian': ['--icu-case-mapping'], + 'intl402/String/prototype/toLocaleUpperCase/special_casing_Turkish': ['--icu-case-mapping'], + +######################## NEEDS INVESTIGATION ########################### # These test failures are specific to the intl402 suite and need investigation # to be either marked as bugs with issues filed for them or as deliberate # incompatibilities if the test cases turn out to be broken or ambiguous. # Some of these are related to v8:4361 in being visible side effects from Intl. 'intl402/6.2.3': [FAIL], - 'intl402/Collator/10.1.2.1_4': [FAIL], 'intl402/Collator/10.1.2_a': [PASS, FAIL], 'intl402/Collator/10.2.3_b': [PASS, FAIL], 'intl402/Collator/prototype/10.3_a': [FAIL], 'intl402/DateTimeFormat/12.1.2': [PASS, FAIL], - 'intl402/DateTimeFormat/12.1.2.1_4': [FAIL], 'intl402/DateTimeFormat/12.2.3_b': [FAIL], 'intl402/DateTimeFormat/prototype/12.3_a': [FAIL], 'intl402/Number/prototype/toLocaleString/13.2.1_5': [PASS, FAIL], 'intl402/NumberFormat/11.1.1_20_c': [FAIL], 'intl402/NumberFormat/11.1.2': [PASS, FAIL], - 'intl402/NumberFormat/11.1.2.1_4': [FAIL], 'intl402/NumberFormat/11.2.3_b': [FAIL], 'intl402/NumberFormat/prototype/11.3_a': [FAIL], 'intl402/String/prototype/localeCompare/13.1.1_7': [PASS, FAIL], @@ -507,6 +542,21 @@ # Test262 Bug: https://bugs.ecmascript.org/show_bug.cgi?id=596 'built-ins/Array/prototype/sort/bug_596_1': [PASS, FAIL_OK], + # https://github.com/tc39/test262/pull/688#pullrequestreview-14025354 + 'built-ins/Function/internals/Construct/derived-this-uninitialized-realm': [FAIL], + + # https://github.com/tc39/test262/pull/688/files#r93657665 + 'built-ins/TypedArrays/typedarray-arg-other-ctor-buffer-ctor-custom-species-proto-from-ctor-realm': [FAIL], + 'built-ins/TypedArrays/typedarray-arg-same-ctor-buffer-ctor-species-custom-proto-from-ctor-realm': [FAIL], + + # https://github.com/tc39/test262/commit/c779cba592fcb39051fd1d467e472ea71aa2b1d6#commitcomment-20276482 + 'language/statements/class/strict-mode/arguments-caller': [FAIL], + + # Date tests that fail in CE(S)T timezone. + # https://bugs.chromium.org/p/v8/issues/detail?id=5449 + 'built-ins/Date/prototype/setFullYear/new-value-time-clip': [PASS, FAIL], + 'built-ins/Date/prototype/setMonth/new-value-time-clip': [PASS, FAIL], + ############################ SKIPPED TESTS ############################# # These tests take a looong time to run. @@ -592,34 +642,8 @@ '*': [SKIP], }], # variant == asm_wasm - -# Module-related tests -# https://bugs.chromium.org/p/v8/issues/detail?id=1569 - -['variant != ignition and variant != ignition_staging and variant != ignition_turbofan', { - 'language/eval-code/direct/export': [SKIP], - 'language/eval-code/direct/import': [SKIP], - 'language/eval-code/indirect/export': [SKIP], - 'language/eval-code/indirect/import': [SKIP], - 'language/module-code/*': [SKIP], -}], # variant != ignition and variant != ignition_staging and variant != ignition_turbofan - -['variant == ignition or variant == ignition_staging or variant == ignition_turbofan', { - # v8:5485 - 'language/module-code/comment-multi-line-html*': [FAIL], - 'language/module-code/comment-single-line-html*': [FAIL], - - # v8:5486 - 'language/module-code/instn-iee-star-cycle': [FAIL], - 'language/module-code/instn-named-star-cycle': [FAIL], - 'language/module-code/instn-star-star-cycle': [FAIL], - - # v8:5487 - 'language/module-code/namespace/internals/get-own-property-str-found-uninit': [FAIL], - - # v8:5401 - 'language/module-code/namespace/internals/set': [FAIL], - 'language/module-code/namespace/internals/define-own-property': [FAIL], -}], # variant == ignition or variant == ignition_staging or variant == ignition_turbofan +['variant == wasm_traps', { + '*': [SKIP], +}], # variant == wasm_traps ] diff --git a/deps/v8/test/test262/testcfg.py b/deps/v8/test/test262/testcfg.py index 6319feb13c..e54b58993a 100644 --- a/deps/v8/test/test262/testcfg.py +++ b/deps/v8/test/test262/testcfg.py @@ -27,6 +27,7 @@ import imp +import itertools import os import re import sys @@ -47,6 +48,10 @@ TEST_262_NATIVE_FILES = ["detachArrayBuffer.js"] TEST_262_SUITE_PATH = ["data", "test"] TEST_262_HARNESS_PATH = ["data", "harness"] TEST_262_TOOLS_PATH = ["harness", "src"] +TEST_262_LOCAL_TESTS_PATH = ["local-tests", "test"] + +TEST_262_RELPATH_REGEXP = re.compile( + r'.*[\\/]test[\\/]test262[\\/][^\\/]+[\\/]test[\\/](.*)\.js') sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), *TEST_262_TOOLS_PATH)) @@ -101,6 +106,8 @@ class Test262VariantGenerator(testsuite.VariantGenerator): class Test262TestSuite(testsuite.TestSuite): + # Match the (...) in '/path/to/v8/test/test262/subdir/test/(...).js' + # In practice, subdir is data or local-tests def __init__(self, name, root): super(Test262TestSuite, self).__init__(name, root) @@ -109,11 +116,14 @@ class Test262TestSuite(testsuite.TestSuite): self.harness = [os.path.join(self.harnesspath, f) for f in TEST_262_HARNESS_FILES] self.harness += [os.path.join(self.root, "harness-adapt.js")] + self.localtestroot = os.path.join(self.root, *TEST_262_LOCAL_TESTS_PATH) self.ParseTestRecord = None def ListTests(self, context): tests = [] - for dirname, dirs, files in os.walk(self.testroot): + testnames = set() + for dirname, dirs, files in itertools.chain(os.walk(self.testroot), + os.walk(self.localtestroot)): for dotted in [x for x in dirs if x.startswith(".")]: dirs.remove(dotted) if context.noi18n and "intl402" in dirs: @@ -121,25 +131,27 @@ class Test262TestSuite(testsuite.TestSuite): dirs.sort() files.sort() for filename in files: - if filename.endswith(".js") and not filename.endswith("_FIXTURE.js"): - fullpath = os.path.join(dirname, filename) - relpath = fullpath[len(self.testroot) + 1 : -3] - testname = relpath.replace(os.path.sep, "/") - case = testcase.TestCase(self, testname) - tests.append(case) - return tests + if not filename.endswith(".js"): + continue + if filename.endswith("_FIXTURE.js"): + continue + fullpath = os.path.join(dirname, filename) + relpath = re.match(TEST_262_RELPATH_REGEXP, fullpath).group(1) + testnames.add(relpath.replace(os.path.sep, "/")) + return [testcase.TestCase(self, testname) for testname in testnames] def GetFlagsForTestCase(self, testcase, context): return (testcase.flags + context.mode_flags + self.harness + - self.GetIncludesForTest(testcase) + ["--harmony"] + + self.GetIncludesForTest(testcase) + (["--module"] if "module" in self.GetTestRecord(testcase) else []) + - [os.path.join(self.testroot, testcase.path + ".js")] + + [self.GetPathForTest(testcase)] + (["--throws"] if "negative" in self.GetTestRecord(testcase) else []) + (["--allow-natives-syntax"] if "detachArrayBuffer.js" in self.GetTestRecord(testcase).get("includes", []) - else [])) + else []) + + ([flag for flag in testcase.outcomes if flag.startswith("--")])) def _VariantGeneratorFactory(self): return Test262VariantGenerator @@ -179,9 +191,14 @@ class Test262TestSuite(testsuite.TestSuite): includes = [] return includes + def GetPathForTest(self, testcase): + filename = os.path.join(self.localtestroot, testcase.path + ".js") + if not os.path.exists(filename): + filename = os.path.join(self.testroot, testcase.path + ".js") + return filename + def GetSourceForTest(self, testcase): - filename = os.path.join(self.testroot, testcase.path + ".js") - with open(filename) as f: + with open(self.GetPathForTest(testcase)) as f: return f.read() def _ParseException(self, str): @@ -194,8 +211,9 @@ class Test262TestSuite(testsuite.TestSuite): test_record = self.GetTestRecord(testcase) if output.exit_code != 0: return True - if "negative" in test_record: - if self._ParseException(output.stdout) != test_record["negative"]: + if "negative" in test_record and \ + "type" in test_record["negative"] and \ + self._ParseException(output.stdout) != test_record["negative"]["type"]: return True return "FAILED!" in output.stdout @@ -204,7 +222,9 @@ class Test262TestSuite(testsuite.TestSuite): if (statusfile.FAIL_SLOPPY in testcase.outcomes and "--use-strict" not in testcase.flags): return outcome != statusfile.FAIL - return not outcome in (testcase.outcomes or [statusfile.PASS]) + return not outcome in ([outcome for outcome in testcase.outcomes + if not outcome.startswith('--')] + or [statusfile.PASS]) def PrepareSources(self): # The archive is created only on swarming. Local checkouts have the diff --git a/deps/v8/test/test262/upstream-local-tests.sh b/deps/v8/test/test262/upstream-local-tests.sh new file mode 100755 index 0000000000..8a40d185d1 --- /dev/null +++ b/deps/v8/test/test262/upstream-local-tests.sh @@ -0,0 +1,22 @@ +# Copyright 2016 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# usage: test/test262/upstream-local-tests.sh +# This script takes the files which were modified in the test262 local-test +# directory (test/test262/local-tests) in the top patch of the v8 tree and +# creates a new patch in the local test262 checkout (test/test262/data). +# This patch could then hopefully be used for upstreaming tests. +# The script should be run from the top level directory of the V8 checkout. + +git show | grep '+++ b/test/test262/local-tests' | while read test; do + path=${test:6} + datapath=${path/local-tests/data} + echo cp $path $datapath + cp $path $datapath + cd test/test262/data + git add ${datapath:18} || exit 1 + cd ../../../ +done +cd test/test262/data +git commit || exit 1 |