Commit ae9d62ea authored by Feng Yu's avatar Feng Yu Committed by V8 LUCI CQ

Reland "[test] Migrate cctest/test-weakmaps to unittests/"

This is a reland of commit d83346be

Original change's description:
> [test] Migrate cctest/test-weakmaps to unittests/
>
> Bug: v8:12781
> Change-Id: Ief6bd7ee0ff2876e19970b2fb6af4f3208ec7f4e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3815486
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82699}

Bug: v8:12781
Change-Id: I9f74c32b924433dea67f62e26a336ef7263282e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3856096
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82717}
parent 2dd434f4
......@@ -215,7 +215,6 @@ v8_source_set("cctest_sources") {
"test-usecounters.cc",
"test-utils.cc",
"test-verifiers.cc",
"test-weakmaps.cc",
"torque/test-torque.cc",
"trace-extension.cc",
"trace-extension.h",
......@@ -270,7 +269,8 @@ v8_source_set("cctest_sources") {
"test-macro-assembler-mips64.cc",
]
} else if (v8_current_cpu == "x64") {
sources += [ ### gcmole(arch:x64) ###
sources += [
### gcmole(arch:x64) ###
"test-log-stack-tracer.cc",
]
if (is_win) {
......
......@@ -51,9 +51,6 @@
# works as intended.
'test-api/DisallowJavascriptExecutionScope': [FAIL],
# We do not yet shrink weak maps after they have been emptied by the GC
'test-weakmaps/Shrinking': [FAIL],
# Boot up memory use is bloated in debug mode.
'test-mark-compact/BootUpMemoryUse': [PASS, ['mode == debug', FAIL]],
......@@ -1101,8 +1098,6 @@
'test-weak-references/WeakArrayListBasic': [SKIP],
'test-weak-references/WeakArraysBasic': [SKIP],
'test-weak-references/WeakReferencesBasic': [SKIP],
'test-weakmaps/WeakMapsWithChainedEntries': [SKIP],
'test-weakmaps/Weakness': [SKIP],
# Timeout (too many GCs)
'test-heap/Regress8014': [SKIP],
'test-accessors/HandleScopePop': [SKIP],
......
......@@ -477,6 +477,7 @@ v8_source_set("unittests_sources") {
"objects/symbols-unittest.cc",
"objects/value-serializer-unittest.cc",
"objects/weakarraylist-unittest.cc",
"objects/weakmaps-unittest.cc",
"objects/weaksets-unittest.cc",
"parser/ast-value-unittest.cc",
"parser/decls-unittest.cc",
......
......@@ -97,6 +97,15 @@ class WithHeapInternals : public TMixin, HeapInternalsBase {
page->MarkNeverAllocateForTesting();
}
}
void GcAndSweep(i::AllocationSpace space) {
heap()->CollectGarbage(space, GarbageCollectionReason::kTesting);
if (heap()->mark_compact_collector()->sweeping_in_progress()) {
SafepointScope scope(heap());
heap()->mark_compact_collector()->EnsureSweepingCompleted(
MarkCompactCollector::SweepingForcedFinalizationMode::kV8Only);
}
}
};
using TestWithHeapInternals = //
......
......@@ -5,20 +5,24 @@
[
[ALWAYS, {
'IntlTest.StringLocaleCompareFastPath': [['mode != release', SKIP], SLOW, NO_VARIANTS],
# BUG(5193). The cpu profiler tests are notoriously flaky.
'SamplerTest.LibSamplerCollectSample': [SKIP],
# This tests only the type system, no point in running several variants.
'TypesTest.*': [PASS, NO_VARIANTS],
# https://crbug.com/v8/8919
'PlatformTest.StackAlignment': [PASS, ['not is_clang', SKIP]],
# These tests are supposed to fail in a slow DCHECK, skip them otherwise.
'LocalHandlesTest.DereferenceLocalHandleFailsWhenDisallowed': [SKIP, ['mode == debug', FAIL]],
'PersistentHandlesTest.DereferencePersistentHandleFailsWhenDisallowed': [SKIP, ['mode == debug', FAIL]],
'IntlTest.StringLocaleCompareFastPath': [['mode != release', SKIP], SLOW, NO_VARIANTS],
# https://crbug.com/v8/8919
'PlatformTest.StackAlignment': [PASS, ['not is_clang', SKIP]],
# We do not yet shrink weak maps after they have been emptied by the GC
'WeakMapsTest.Shrinking': [FAIL],
'WeakSetsTest.WeakSet_Shrinking': [FAIL],
}], # ALWAYS
......@@ -207,6 +211,8 @@
'UnifiedHeapDetachedTest.AllocationBeforeConfigureHeap': [SKIP],
'UnifiedHeapTest.FindingV8ToBlinkReference': [SKIP],
'ManagedTest.GCCausesDestruction': [SKIP],
'WeakMapsTest.WeakMapsWithChainedEntries': [SKIP],
'WeakMapsTest.Weakness': [SKIP],
'WeakSetsTest.WeakSet_Weakness': [SKIP],
'WebSnapshotTest.SFIDeduplicationAfterBytecodeFlushing': [SKIP],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment