From c0943a50ad4c6556ec7d0ed21142ca1d176c1b30 Mon Sep 17 00:00:00 2001 From: Sathya Gunasekaran Date: Tue, 23 Jul 2019 14:36:57 +0100 Subject: [PATCH] [test262] Expose gc() to test262 harness test262 tests use this to trigger a gc and test WeakRefs Bug: v8:8179 Change-Id: I84ca88f0bf11734ea65d7f6c2a5e5e2d13dccb7d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1714871 Reviewed-by: Ulan Degenbaev Reviewed-by: Mathias Bynens Commit-Queue: Sathya Gunasekaran Cr-Commit-Position: refs/heads/master@{#62874} --- test/test262/harness-adapt.js | 5 ++++- test/test262/test262.status | 27 +++++++++++---------------- test/test262/testcfg.py | 1 + 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/test/test262/harness-adapt.js b/test/test262/harness-adapt.js index 3d3ad7e8a0..55d1b445b0 100644 --- a/test/test262/harness-adapt.js +++ b/test/test262/harness-adapt.js @@ -98,7 +98,10 @@ function RealmOperators(realm) { createRealm() { return RealmOperators(Realm.createAllowCrossRealmAccess()); }, - global: Realm.eval(realm, 'this') + global: Realm.eval(realm, 'this'), + gc() { + v8GC(); + } }; $262.global.$262 = $262; return $262; diff --git a/test/test262/test262.status b/test/test262/test262.status index f63a11498f..86974aff75 100644 --- a/test/test262/test262.status +++ b/test/test262/test262.status @@ -535,29 +535,24 @@ 'language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-recursive': [FAIL], # https://bugs.chromium.org/p/v8/issues/detail?id=8179 - 'built-ins/FinalizationGroup/gc-has-one-chance-to-call-cleanupCallback': [FAIL], - 'built-ins/FinalizationGroup/prototype/register/return-undefined-register-itself': [FAIL], 'built-ins/FinalizationGroup/FinalizationGroupCleanupIteratorPrototype/next-job-not-active-throws': [FAIL], - 'built-ins/FinalizationGroup/FinalizationGroupCleanupIteratorPrototype/next-length': [FAIL], - 'built-ins/FinalizationGroup/FinalizationGroupCleanupIteratorPrototype/next-missing-internal-throws': [FAIL], - 'built-ins/FinalizationGroup/FinalizationGroupCleanupIteratorPrototype/next-name': [FAIL], - 'built-ins/FinalizationGroup/FinalizationGroupCleanupIteratorPrototype/next-not-object-throws': [FAIL], - 'built-ins/FinalizationGroup/FinalizationGroupCleanupIteratorPrototype/next-prop-desc': [FAIL], - 'built-ins/FinalizationGroup/FinalizationGroupCleanupIteratorPrototype/proto': [FAIL], 'built-ins/FinalizationGroup/FinalizationGroupCleanupIteratorPrototype/Symbol.toStringTag': [FAIL], - 'built-ins/FinalizationGroup/prototype/cleanupSome/callback-iterator-proto': [FAIL], - 'built-ins/FinalizationGroup/prototype/cleanupSome/cleanupcallback-iterator-proto': [FAIL], - 'built-ins/FinalizationGroup/prototype/cleanupSome/cleanup-prevented-with-reference': [FAIL], - 'built-ins/FinalizationGroup/prototype/cleanupSome/cleanup-prevented-with-unregister': [FAIL], - 'built-ins/FinalizationGroup/prototype/cleanupSome/gc-cleanup-not-prevented-with-wr-deref': [FAIL], - 'built-ins/FinalizationGroup/prototype/cleanupSome/iterator-dynamic': [FAIL], - 'built-ins/FinalizationGroup/prototype/cleanupSome/iterator-holdings-multiple-values': [FAIL], 'built-ins/FinalizationGroup/prototype/cleanupSome/poisoned-callback-throws': [FAIL], 'built-ins/FinalizationGroup/prototype/cleanupSome/poisoned-cleanup-callback-throws': [FAIL], - 'built-ins/FinalizationGroup/prototype/cleanupSome/return-undefined-with-gc': [FAIL], 'built-ins/FinalizationGroup/prototype/register/holdings-same-as-target': [FAIL], 'built-ins/FinalizationGroup/prototype/register/unregisterToken-same-as-holdings-and-target': [FAIL], + 'built-ins/FinalizationGroup/prototype/cleanupSome/cleanup-prevented-with-reference': [FAIL], + 'built-ins/FinalizationGroup/prototype/register/return-undefined-register-itself': [FAIL], + + # https://github.com/tc39/test262/issues/2256 + 'built-ins/FinalizationGroup/prototype/cleanupSome/cleanup-prevented-with-unregister': [FAIL], + + # https://github.com/tc39/test262/issues/2239 'built-ins/WeakRef/prototype/deref/gc-cleanup-not-prevented-with-wr-deref': [FAIL], + 'built-ins/FinalizationGroup/prototype/cleanupSome/gc-cleanup-not-prevented-with-wr-deref': [FAIL], + + # https://github.com/tc39/test262/issues/2255 + 'built-ins/FinalizationGroup/prototype/cleanupSome/iterator-holdings-multiple-values': [FAIL], ######################## NEEDS INVESTIGATION ########################### diff --git a/test/test262/testcfg.py b/test/test262/testcfg.py index 8fbfc59300..ff866a832f 100644 --- a/test/test262/testcfg.py +++ b/test/test262/testcfg.py @@ -58,6 +58,7 @@ FEATURE_FLAGS = { 'Promise.allSettled': '--harmony-promise-all-settled', 'FinalizationGroup': '--harmony-weak-refs', 'WeakRef': '--harmony-weak-refs', + 'host-gc-required': '--expose-gc-as=v8GC', } SKIPPED_FEATURES = set(['class-methods-private',