Skip to content

Commit 93ebc45

Browse files
committed
fix tests
1 parent 6636997 commit 93ebc45

3 files changed

Lines changed: 15 additions & 0 deletions

ext/opcache/tests/static_cache_preload_001.phpt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ var_dump(StaticCachePreloadGlobalState::$values);
1919
var_dump(StaticCachePreloadGlobalState::next());
2020
var_dump(StaticCachePreloadMethodState::value());
2121

22+
OPcache\volatile_clear();
23+
opcache_reset();
24+
2225
?>
2326
--EXPECT--
2427
array(1) {

ext/opcache/tests/static_cache_volatile_cache_allocator_002.phpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ opcache.static_cache.volatile_size_mb=8
99
--FILE--
1010
<?php
1111

12+
OPcache\volatile_clear();
13+
1214
$payloadA = str_repeat('A', 2000000);
1315
$payloadB = str_repeat('B', 2000000);
1416
$payloadC = str_repeat('C', 2000000);
@@ -24,6 +26,8 @@ OPcache\volatile_delete('second');
2426
var_dump(OPcache\volatile_store('merged', $payloadD));
2527
var_dump(strlen(OPcache\volatile_fetch('merged')));
2628

29+
OPcache\volatile_clear();
30+
2731
?>
2832
--EXPECT--
2933
bool(true)

ext/opcache/tests/static_cache_volatile_static_internal_object_method_mutation_fork_001.phpt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ function static_cache_internal_object_wait_for_file(string $path): void
6868
}
6969
}
7070

71+
function static_cache_internal_object_reset(): void
72+
{
73+
OPcache\volatile_clear();
74+
opcache_reset();
75+
}
76+
7177
function static_cache_internal_object_fork_case(string $state): void
7278
{
7379
$prefix = sys_get_temp_dir() . '/opcache_volatile_static_internal_object_method_mutation_fork_' . getmypid() . '_' . $state;
@@ -152,6 +158,8 @@ foreach (['date', 'array', 'fixed'] as $state) {
152158
static_cache_internal_object_fork_case($state);
153159
}
154160

161+
static_cache_internal_object_reset();
162+
155163
?>
156164
--EXPECT--
157165
date=2026-01-02

0 commit comments

Comments
 (0)