summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-06-10 17:26:59 +0200
committerRemi Collet <fedora@famillecollet.com>2015-06-10 17:26:59 +0200
commitf0f1c86b6cddc42f3add4cbe9d8bb4a73df3b87e (patch)
tree1ef451db8d02990f377e4f5191c5cc4d3ff5049b
parent822e6b924bf3de13d596d6f8d4a8d7f5e76fbd68 (diff)
php 5.4: add some patch to improve test results
-rw-r--r--failed.txt5
-rw-r--r--php-5.4.30-noNO.patch43
-rw-r--r--php-5.4.42-datetests-2.patch54
-rw-r--r--php-5.4.42-oldpcre.patch39
-rw-r--r--php54.spec14
5 files changed, 105 insertions, 50 deletions
diff --git a/failed.txt b/failed.txt
index 98261cc..e419a7c 100644
--- a/failed.txt
+++ b/failed.txt
@@ -9,10 +9,7 @@ $ grep -r 'Tests failed' /var/lib/mock/*/build.log
/var/lib/mock/el6x/build.log:Tests failed : 1 ( 0.0%) ( 0.0%)
Bug #32001 (xml_parse*() goes into infinite loop when autodetection in effect), using UTF-* [ext/xml/tests/bug32001.phpt]
-/var/lib/mock/el7x/build.log:Tests failed : 3 ( 0.0%) ( 0.0%)
- Bug #37911 (preg_replace_callback ignores named groups) [ext/pcre/tests/bug37911.phpt]
- preg_grep() 2nd test [ext/pcre/tests/grep2.phpt]
- preg_match() flags 3 [ext/pcre/tests/match_flags3.phpt]
+/var/lib/mock/el7x/build.log:Tests failed : 0 ( 0.0%) ( 0.0%)
/var/lib/mock/el5i/build.log:Tests failed : 5 ( 0.0%) ( 0.1%)
Bug #41523 (strtotime('0000-00-00 00:00:00') is parsed as 1999-11-30) (32 bit) [ext/date/tests/bug41523.phpt]
diff --git a/php-5.4.30-noNO.patch b/php-5.4.30-noNO.patch
deleted file mode 100644
index 52f54ab..0000000
--- a/php-5.4.30-noNO.patch
+++ /dev/null
@@ -1,43 +0,0 @@
---- ext/standard/tests/strings/setlocale_variation2.phpt.orig 2014-06-11 16:10:00.259326468 +0200
-+++ ext/standard/tests/strings/setlocale_variation2.phpt 2014-06-11 16:16:14.396138997 +0200
-@@ -52,6 +52,7 @@
- //try different locale names
- $failure_locale = array();
- $success_count = 0;
-+$expected = 0;
-
- echo "-- Test setlocale() with all available locale in the system --\n";
- // gather all locales installed in the system(stored $all_system_locales),
-@@ -61,6 +62,10 @@
- if(setlocale(LC_ALL,$value )){
- $success_count++;
- }
-+ else if ($value == 'no_NO.ISO-8859-1') {
-+ // ignore this one, see rhbz #971416
-+ $expected++;
-+ }
- else{
- //failure values are put in to an array $failure_locale
- $failure_locale[] = $value;
-@@ -69,11 +74,11 @@
-
- echo "No of locales found on the machine = ".count($all_system_locales)."\n";
- echo "No of setlocale() success = ".$success_count."\n";
--echo "Expected no of failures = 0\n";
-+echo "Expected no of failures = $expected\n";
- echo "Test ";
- // check if there were any failure of setlocale() function earlier, if any
- // failure then dump the list of failing locales
--if($success_count != count($all_system_locales)){
-+if(($success_count + $expected) != count($all_system_locales)){
- echo "FAILED\n";
- echo "Names of locale() for which setlocale() failed ...\n";
- var_dump($failure_locale);
-@@ -89,6 +94,6 @@
- -- Test setlocale() with all available locale in the system --
- No of locales found on the machine = %d
- No of setlocale() success = %d
--Expected no of failures = 0
-+Expected no of failures = %d
- Test PASSED
- Done
diff --git a/php-5.4.42-datetests-2.patch b/php-5.4.42-datetests-2.patch
new file mode 100644
index 0000000..fcddbc7
--- /dev/null
+++ b/php-5.4.42-datetests-2.patch
@@ -0,0 +1,54 @@
+Backport various fix from 5.6
+
+From 7cbd8f8b8a662c1e74cb1c97dac6f606f8f477c9 Mon Sep 17 00:00:00 2001
+From: krakjoe <joe.watkins@live.co.uk>
+Date: Thu, 21 Aug 2014 10:03:48 +0100
+Subject: [PATCH] remove bogus locale use from test
+
+---
+ ext/standard/tests/strings/setlocale_variation2.phpt | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/ext/standard/tests/strings/setlocale_variation2.phpt b/ext/standard/tests/strings/setlocale_variation2.phpt
+index 038ba58..10ae22f 100644
+--- a/ext/standard/tests/strings/setlocale_variation2.phpt
++++ b/ext/standard/tests/strings/setlocale_variation2.phpt
+@@ -18,8 +18,11 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
+ /* setlocale() to set all available locales in the system and check the success count */
+ echo "*** Testing setlocale() : usage variations ***\n";
+
+-function good_locale($locale) {
+- return $locale !== 'tt_RU@iqtelif.UTF-8';
++function good_locale($locale) {
++ /**
++ * Note: no_NO is a bogus locale and should not be used, see https://bugzilla.redhat.com/show_bug.cgi?id=532487
++ **/
++ return $locale !== 'tt_RU@iqtelif.UTF-8' && substr($locale, 0, 5) !== "no_NO";
+ }
+
+ /* Prototype : array list_system_locales( void )
+From 3e6f17673338034724c8b637c214b53a51a9db14 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@php.net>
+Date: Wed, 1 Oct 2014 10:14:14 +0200
+Subject: [PATCH] only no_NO.ISO-8859-1 have to be ignored
+
+---
+ ext/standard/tests/strings/setlocale_variation2.phpt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ext/standard/tests/strings/setlocale_variation2.phpt b/ext/standard/tests/strings/setlocale_variation2.phpt
+index 10ae22f..5ebdfe8 100644
+--- a/ext/standard/tests/strings/setlocale_variation2.phpt
++++ b/ext/standard/tests/strings/setlocale_variation2.phpt
+@@ -20,9 +20,9 @@ echo "*** Testing setlocale() : usage variations ***\n";
+
+ function good_locale($locale) {
+ /**
+- * Note: no_NO is a bogus locale and should not be used, see https://bugzilla.redhat.com/show_bug.cgi?id=532487
++ * Note: no_NO is a bogus locale and should not be used, see https://bugzilla.redhat.com/971416
+ **/
+- return $locale !== 'tt_RU@iqtelif.UTF-8' && substr($locale, 0, 5) !== "no_NO";
++ return $locale !== 'tt_RU@iqtelif.UTF-8' && $locale !== 'no_NO.ISO-8859-1';
+ }
+
+ /* Prototype : array list_system_locales( void )
diff --git a/php-5.4.42-oldpcre.patch b/php-5.4.42-oldpcre.patch
new file mode 100644
index 0000000..df6edb2
--- /dev/null
+++ b/php-5.4.42-oldpcre.patch
@@ -0,0 +1,39 @@
+diff -up ./ext/pcre/tests/bug37911.phpt.pcre834 ./ext/pcre/tests/bug37911.phpt
+--- ./ext/pcre/tests/bug37911.phpt.pcre834 2014-03-26 14:10:18.285452752 +0100
++++ ./ext/pcre/tests/bug37911.phpt 2014-03-26 14:10:40.028526763 +0100
+@@ -37,5 +37,5 @@ array(3) {
+ string(4) "blub"
+ }
+
+-Warning: preg_replace_callback(): Compilation failed: group name must start with a non-digit at offset %d in %sbug37911.php on line %d
++Warning: preg_replace_callback(): Numeric named subpatterns are not allowed in %sbug37911.php on line %d
+ NULL
+diff -up ./ext/pcre/tests/grep2.phpt.pcre834 ./ext/pcre/tests/grep2.phpt
+--- ./ext/pcre/tests/grep2.phpt.pcre834 2014-03-26 14:08:26.583072531 +0100
++++ ./ext/pcre/tests/grep2.phpt 2014-03-26 14:09:09.345218089 +0100
+@@ -40,12 +40,6 @@ array(1) {
+ string(1) "1"
+ }
+ bool(true)
+-array(3) {
+- [5]=>
+- string(1) "a"
+- ["xyz"]=>
+- string(2) "q6"
+- [6]=>
+- string(3) "h20"
++array(0) {
+ }
+-bool(false)
++bool(true)
+diff -up ./ext/pcre/tests/match_flags3.phpt.pcre834 ./ext/pcre/tests/match_flags3.phpt
+--- ./ext/pcre/tests/match_flags3.phpt.pcre834 2014-03-26 14:06:48.792739665 +0100
++++ ./ext/pcre/tests/match_flags3.phpt 2014-03-26 14:07:31.820886128 +0100
+@@ -42,5 +42,5 @@ array(1) {
+ }
+ }
+
+-Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset %d in %smatch_flags3.php on line %d
++Warning: preg_match(): Numeric named subpatterns are not allowed in %smatch_flags3.php on line %d
+ bool(false)
+diff -up ./ext/standard/tests/strings/setlocale_variation2.phpt.pcre834 ./ext/standard/tests/strings/setlocale_variation2.phpt
diff --git a/php54.spec b/php54.spec
index 2f73832..ddaea13 100644
--- a/php54.spec
+++ b/php54.spec
@@ -140,8 +140,10 @@ Patch102: php-5.4.39-bug50444.patch
# Security fixes
# Fixes for tests
-# see https://bugzilla.redhat.com/971416
-Patch302: php-5.4.30-noNO.patch
+# no_NO issue
+Patch301: php-5.4.42-datetests-2.patch
+# Revert changes for pcre < 8.34
+Patch302: php-5.4.42-oldpcre.patch
# RC Patch
Patch91: php-5.3.7-oci8conf.patch
@@ -838,7 +840,13 @@ rm -f ext/json/utf8_to_utf16.*
# security patches
# Fixes for tests
-%patch302 -p0 -b .971416
+%patch301 -p1 -b .datetests2
+%if 0%{?fedora} >= 14 || 0%{?rhel} >= 7
+%if 0%{?fedora} < 21
+# Only apply when system libpcre < 8.34
+%patch302 -p1 -b .pcre834
+%endif
+%endif
# Prevent %%doc confusion over LICENSE files
cp Zend/LICENSE Zend/ZEND_LICENSE