This commit is contained in:
Daniil Gentili 2023-10-24 10:23:08 +02:00
parent e6f1f34e1a
commit 0530dcac3b
5 changed files with 27 additions and 10 deletions

View File

@ -30,7 +30,7 @@ RUN true \
systemtap-sdt-dev libssl-dev \ systemtap-sdt-dev libssl-dev \
libpcre2-dev libargon2-dev libedit-dev libsodium-dev llvm-16 libonig-dev libpcre2-dev libargon2-dev libedit-dev libsodium-dev llvm-16 libonig-dev
RUN git clone https://github.com/php/php-src -b master --depth 1 && cd php-src \ RUN git clone https://github.com/php/php-src -b PHP-8.3 --depth 1 && cd php-src \
\ \
&& ./buildconf \ && ./buildconf \
&& ./configure --prefix=/usr \ && ./configure --prefix=/usr \

View File

@ -19,13 +19,21 @@ cp $wrap .
echo "About to run the standalone test" echo "About to run the standalone test"
docker run -v $PWD:/app --rm --privileged -it asan_tests /usr/bin/php /app/wrap.php /app/infection.php EXIT_CODE=0
docker run -v $PWD:/app --rm --privileged -it asan_tests /usr/bin/php /app/wrap.php /app/infection.php || EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
echo "Failed, exit code $EXIT_CODE"
exit $EXIT_CODE
fi
echo "About to run the testsuite" echo "About to run the testsuite"
docker run -v $PWD:/app --rm --privileged -it asan_tests /usr/bin/php /app/wrap.php vendor/bin/phpunit || EXIT_CODE=$? EXIT_CODE=0
docker run -v $PWD:/app --rm --privileged -it asan_tests /usr/bin/php --repeat 2 -f /app/wrap.php vendor/bin/phpunit || EXIT_CODE=$?
if [ $EXIT_CODE -gt 128 ]; then if [ $EXIT_CODE -gt 128 ]; then
echo "Failed, exit code $EXIT_CODE"
exit $EXIT_CODE exit $EXIT_CODE
fi fi

View File

@ -78,3 +78,5 @@ for ($x = 0; $x < 10000; $x++) {
test_it_can_create_a_config($a); test_it_can_create_a_config($a);
} }
} }
echo "OK, done!";

View File

@ -4,21 +4,28 @@ register_shutdown_function(function () {
$status = opcache_get_status(false); $status = opcache_get_status(false);
var_dump($status); var_dump($status);
$ok = true;
if ($status["memory_usage"]["free_memory"] < 10*1024*1024) { if ($status["memory_usage"]["free_memory"] < 10*1024*1024) {
echo "Not enough free opcache memory!".PHP_EOL; echo "Not enough free opcache memory!".PHP_EOL;
$ok = false;
} }
if ($status["interned_strings_usage"]["free_memory"] < 1*1024*1024) { if ($status["interned_strings_usage"]["free_memory"] < 1*1024*1024) {
echo "Not enough free interned strings memory!".PHP_EOL; echo "Not enough free interned strings memory!".PHP_EOL;
$ok = false;
} }
if ($status["jit"]["buffer_free"] < 10*1024*1024) { if ($status["jit"]["buffer_free"] < 10*1024*1024) {
echo "Not enough free JIT memory!".PHP_EOL; echo "Not enough free JIT memory!".PHP_EOL;
$ok = false;
} }
if (!$status["jit"]["on"]) { if (!$status["jit"]["on"]) {
echo "JIT is not enabled!".PHP_EOL; echo "JIT is not enabled!".PHP_EOL;
$ok = false;
} }
unset($status); unset($status);
gc_collect_cycles(); gc_collect_cycles();
if (!$ok) die(139);
}); });
$argc--; $argc--;

View File

@ -15,9 +15,9 @@ opcache.max_accelerated_files=1000000
opcache.interned_strings_buffer=64 opcache.interned_strings_buffer=64
opcache.jit_prof_threshold=0.000000001 opcache.jit_prof_threshold=0.000000001
opcache.jit_max_root_traces= 30000000 opcache.jit_max_root_traces= 10000000
opcache.jit_max_side_traces= 30000000 opcache.jit_max_side_traces= 10000000
opcache.jit_max_exit_counters=30000000 opcache.jit_max_exit_counters=10000000
opcache.jit_hot_loop=1 opcache.jit_hot_loop=1
opcache.jit_hot_func=1 opcache.jit_hot_func=1
opcache.jit_hot_return=1 opcache.jit_hot_return=1