mirror of
https://gitlab.univ-nantes.fr/glicid-public/guix-glicid.git
synced 2025-05-01 22:55:36 +02:00
backporting old php version for zabbix
This commit is contained in:
parent
d2fcf8566a
commit
947ddd8a1c
3 changed files with 451 additions and 0 deletions
48
glicid/packages/patches/php-bug-74093-test.patch
Normal file
48
glicid/packages/patches/php-bug-74093-test.patch
Normal file
|
@ -0,0 +1,48 @@
|
|||
From c641825c64e42627a2c9cac969b371ed532e0b57 Mon Sep 17 00:00:00 2001
|
||||
From: Ryan Sundberg <ryan@arctype.co>
|
||||
Date: Mon, 4 Oct 2021 20:12:25 -0700
|
||||
Subject: [PATCH] Zend/tests/bug74093.phpt: Fix failing test case
|
||||
|
||||
This test case fails (on non-Windows hosts, where it is enabled) due
|
||||
to mismatching output in the error log language. This fixes the
|
||||
expectation, and also rewrites the test procedure in a more stable
|
||||
fashion.
|
||||
|
||||
The objective of the test case is to run a program that exceeds
|
||||
the max_execution_time and verify that the process was aborted. The
|
||||
previous implementation tested this using a loop on array_intersect with
|
||||
large enough inputs to "probably" take enough time to trigger
|
||||
max_execution_time to abort it. With faster CPUs, over time this test
|
||||
can become flaky. Instead we simply spin a loop until enough
|
||||
wall clock time has passed to check our assertion.
|
||||
---
|
||||
Zend/tests/bug74093.phpt | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Zend/tests/bug74093.phpt b/Zend/tests/bug74093.phpt
|
||||
index 7f20285805..32eb445ddc 100644
|
||||
--- a/Zend/tests/bug74093.phpt
|
||||
+++ b/Zend/tests/bug74093.phpt
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
-Bug #74093 (Maximum execution time of n+2 seconds exceed not written in error_log)
|
||||
+Bug #74093 (Maximum execution time exceeded not written in error_log)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
|
||||
@@ -12,9 +12,9 @@ max_execution_time=1
|
||||
hard_timeout=1
|
||||
--FILE--
|
||||
<?php
|
||||
-$a1 = range(1, 1000000);
|
||||
-$a2 = range(100000, 1999999);
|
||||
-array_intersect($a1, $a2);
|
||||
+$start = time();
|
||||
+while (time() - $start < 5);
|
||||
+die("Failed to interrupt execution");
|
||||
?>
|
||||
--EXPECTF--
|
||||
-Fatal error: Maximum execution time of 1+1 seconds exceeded %s
|
||||
+Fatal error: Maximum execution time of 1 second exceeded in %s
|
||||
--
|
||||
2.31.1
|
17
glicid/packages/patches/php-curl-compat.patch
Normal file
17
glicid/packages/patches/php-curl-compat.patch
Normal file
|
@ -0,0 +1,17 @@
|
|||
Fix test result with cURL 7.83 and later.
|
||||
|
||||
Taken from upstream:
|
||||
|
||||
https://github.com/php/php-src/commit/a4179e4c92b6365d39e09cb9cd63c476848013af
|
||||
|
||||
diff --git a/ext/curl/tests/curl_basic_007.phpt b/ext/curl/tests/curl_basic_007.phpt
|
||||
index 3b53658d6a7e..3834e4674f82 100644
|
||||
--- a/ext/curl/tests/curl_basic_007.phpt
|
||||
+++ b/ext/curl/tests/curl_basic_007.phpt
|
||||
@@ -20,5 +20,5 @@ curl_close($ch);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
-string(%d) "No URL set!%w"
|
||||
+string(%d) "No URL set%A"
|
||||
int(3)
|
Loading…
Add table
Add a link
Reference in a new issue