com php-src: Make more tests run on 64bit plataforms: Zend/tests/bug74603.phpt Zend/tests/oct_overflow.phpt Zen d/tests/oct_overflow_32bit.phpt
ext/exif/tests/exif _tagname_variation1.phpt ext/json/tests/pass001 .1.phpt ext/standard/tests/file/symlink_link_linkin fo_is_link_error1.phpt
ext/standard/tests/file/syml ink_link_linkinfo_is_link_error2.phpt ext/stand ard/tests/file/symlink_link_linkinfo_is_link_variatio n6.phpt
ext/standard/tests/general_func

From: Date: Mon, 30 Jul 2018 12:43:09 +0000
Subject: com php-src: Make more tests run on 64bit plataforms: Zend/tests/bug74603.phpt Zend/tests/oct_overflow.phpt Zen d/tests/oct_overflow_32bit.phpt
ext/exif/tests/exif _tagname_variation1.phpt ext/json/tests/pass001 .1.phpt ext/standard/tests/file/symlink_link_linkin fo_is_link_error1.phpt
ext/standard/tests/file/syml ink_link_linkinfo_is_link_error2.phpt ext/stand ard/tests/file/symlink_link_linkinfo_is_link_variatio n6.phpt
ext/standard/tests/general_func
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-102730@lists.php.net to get a copy of this message
Commit: 9c8b3ae43fc4cfb5818dccc5f48f4ee1ba967fa1 Author: Gabriel Caruso <carusogabriel34@gmail.com> Fri, 27 Jul 2018 00:19:13 -0300 Parents: 4a1336de7c93fd6504fcad26b0b048db4b0ca885 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9c8b3ae43fc4cfb5818dccc5f48f4ee1ba967fa1 Log: Make more tests run on 64bit plataforms Changed paths: M Zend/tests/bug74603.phpt A Zend/tests/oct_overflow.phpt D Zend/tests/oct_overflow_32bit.phpt M ext/exif/tests/exif_tagname_variation1.phpt M ext/json/tests/pass001.1..phpt M ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt M ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt M ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt M ext/standard/tests/general_functions/debug_zval_dump_b.phpt M ext/standard/tests/general_functions/print_r.phpt M ext/standard/tests/mail/ezmlm_hash_basic.phpt M ext/standard/tests/strings/crc32_basic.phpt M ext/standard/tests/strings/crc32_error.phpt M ext/standard/tests/strings/strripos_offset.phpt M ext/standard/tests/strings/strrpos_offset.phpt M tests/lang/operators/bitwiseShiftLeft_variationStr.phpt M tests/lang/operators/operator_gt_variation.phpt M tests/lang/operators/operator_lt_variation.phpt

diff --git a/Zend/tests/bug74603.phpt b/Zend/tests/bug74603.phpt index b3194ec..5a5e402 100644 --- a/Zend/tests/bug74603.phpt +++ b/Zend/tests/bug74603.phpt @@ -1,9 +1,5 @@ --TEST-- Bug #74603 (PHP INI Parsing Stack Buffer Overflow Vulnerability) ---SKIPIF-- -<?php -if (PHP_INT_MAX !== 2147483647) - die('skip for 32-bit only'); --FILE-- <?php var_dump(parse_ini_file(__DIR__ . "/bug74603.ini", true, INI_SCANNER_NORMAL)); diff --git a/Zend/tests/oct_overflow.phpt b/Zend/tests/oct_overflow.phpt new file mode 100644 index 0000000..77e4d2a --- /dev/null +++ b/Zend/tests/oct_overflow.phpt @@ -0,0 +1,29 @@ +--TEST-- +testing integer overflow (32bit) +--INI-- +precision=14 +--FILE-- +<?php + +$doubles = array( + 076545676543223, + 032325463734, + 0777777, + 07777777777777, + 033333333333333, + ); + +foreach ($doubles as $d) { + $l = (double)$d; + var_dump($l); +} + +echo "Done\n"; +?> +--EXPECTF-- +float(4308640384%d) +float(3545655%d) +float(262143) +float(549755813%d) +float(1884877076%d) +Done diff --git a/Zend/tests/oct_overflow_32bit.phpt b/Zend/tests/oct_overflow_32bit.phpt deleted file mode 100644 index 5b62778..0000000 --- a/Zend/tests/oct_overflow_32bit.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -testing integer overflow (32bit) ---INI-- -precision=14 ---SKIPIF-- -<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?> ---FILE-- -<?php - -$doubles = array( - 076545676543223, - 032325463734, - 0777777, - 07777777777777, - 033333333333333, - ); - -foreach ($doubles as $d) { - $l = (double)$d; - var_dump($l); -} - -echo "Done\n"; -?> ---EXPECTF-- -float(4308640384%d) -float(3545655%d) -float(262143) -float(549755813%d) -float(1884877076%d) -Done diff --git a/ext/exif/tests/exif_tagname_variation1.phpt b/ext/exif/tests/exif_tagname_variation1.phpt index 207b200..d6dd0ff 100644 --- a/ext/exif/tests/exif_tagname_variation1.phpt +++ b/ext/exif/tests/exif_tagname_variation1.phpt @@ -1,9 +1,7 @@ --TEST-- Test exif_tagname() function : usage variations - different types for index argument --SKIPIF-- -<?php if (!extension_loaded('exif')) print 'skip exif extension not available'; -if (PHP_INT_SIZE != 4) die('skip 32-bit only'); -?> +<?php if (!extension_loaded('exif')) print 'skip exif extension not available'; ?> --FILE-- <?php diff --git a/ext/json/tests/pass001.1.phpt b/ext/json/tests/pass001.1.phpt index aced88f..7ac87cb 100644 --- a/ext/json/tests/pass001.1.phpt +++ b/ext/json/tests/pass001.1.phpt @@ -4,8 +4,7 @@ JSON (http://www.crockford.com/JSON/JSON_checker/test/pass1.json) serialize_precision=-1 --SKIPIF-- <?php -if (!extension_loaded('json')) die('skip'); -if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); +if (!extension_loaded('json')) die('skip json extension not loaded'); ?> --FILE-- <?php diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt index 8aae9b3..7e8b5b2 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt @@ -8,9 +8,6 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { if (substr(PHP_OS, 0, 3) == 'SUN') { die('skip Not valid for Sun Solaris'); } -if (PHP_INT_SIZE != 4) { - die("skip this test is for 32bit platform only"); -} ?> --FILE-- <?php diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt index 98ce621..0386e64 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt @@ -5,9 +5,6 @@ Test symlink(), linkinfo(), link() and is_link() functions : error conditions - if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip no symlinks on Windows'); } -if (PHP_INT_SIZE != 4) { - die("skip this test is for 32bit platform only"); -} ?> --FILE-- <?php diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt index 9b9afba..e2f30cd 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt @@ -8,9 +8,6 @@ if ( substr(PHP_OS, 0, 3) == 'WIN' ) { if ( substr(PHP_OS, 0, 3) == 'MAC' ) { die('skip Not valid for MacOS'); } -if (PHP_INT_SIZE != 4) { - die("skip this test is for 32bit platform only"); -} // Skip if being run by root (files are always readable, writeable and executable) $filename = dirname(__FILE__)."/symlink_link_linkinfo_is_link6_check_root.tmp"; diff --git a/ext/standard/tests/general_functions/debug_zval_dump_b.phpt b/ext/standard/tests/general_functions/debug_zval_dump_b.phpt index ec8e0a6..5c6fe36 100644 Binary files a/ext/standard/tests/general_functions/debug_zval_dump_b.phpt and b/ext/standard/tests/general_functions/debug_zval_dump_b.phpt differ diff --git a/ext/standard/tests/general_functions/print_r.phpt b/ext/standard/tests/general_functions/print_r.phpt index e502f61..5069dd3 100644 --- a/ext/standard/tests/general_functions/print_r.phpt +++ b/ext/standard/tests/general_functions/print_r.phpt @@ -1,9 +1,5 @@ --TEST-- Test print_r() function ---SKIPIF-- -<?php -if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); -?> --INI-- precision=14 --FILE-- diff --git a/ext/standard/tests/mail/ezmlm_hash_basic.phpt b/ext/standard/tests/mail/ezmlm_hash_basic.phpt index 2f810e2..da629e9 100644 --- a/ext/standard/tests/mail/ezmlm_hash_basic.phpt +++ b/ext/standard/tests/mail/ezmlm_hash_basic.phpt @@ -1,9 +1,5 @@ --TEST-- -Test ezmlm_hash() function : basic functionality ---SKIPIF-- -<?php -if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); -?> +Test ezmlm_hash() function : basic functionality --FILE-- <?php /* Prototype : int ezmlm_hash ( string $addr ) diff --git a/ext/standard/tests/strings/crc32_basic.phpt b/ext/standard/tests/strings/crc32_basic.phpt index 3aa780d..2ddc2f9 100644 --- a/ext/standard/tests/strings/crc32_basic.phpt +++ b/ext/standard/tests/strings/crc32_basic.phpt @@ -1,11 +1,5 @@ --TEST-- -Test crc32() function : basic functionality ---SKIPIF-- -<?php -if (PHP_INT_SIZE != 4) - die("skip this test is for 32bit platform only"); -?> - +Test crc32() function : basic functionality --FILE-- <?php /* Prototype : string crc32(string $str) diff --git a/ext/standard/tests/strings/crc32_error.phpt b/ext/standard/tests/strings/crc32_error.phpt index 4537820..71798ed 100644 --- a/ext/standard/tests/strings/crc32_error.phpt +++ b/ext/standard/tests/strings/crc32_error.phpt @@ -1,11 +1,5 @@ --TEST-- -Test crc32() function : error conditions ---SKIPIF-- -<?php -if (PHP_INT_SIZE != 4) - die("skip this test is for 32bit platform only"); -?> - +Test crc32() function : error conditions --FILE-- <?php /* Prototype : string crc32(string $str) diff --git a/ext/standard/tests/strings/strripos_offset.phpt b/ext/standard/tests/strings/strripos_offset.phpt index 080f870..81e4e2b 100644 --- a/ext/standard/tests/strings/strripos_offset.phpt +++ b/ext/standard/tests/strings/strripos_offset.phpt @@ -1,7 +1,5 @@ --TEST-- strripos() offset integer overflow ---SKIPIF-- -<?php if (PHP_INT_SIZE !== 4) die("skip this test is for 32-bit only"); --FILE-- <?php diff --git a/ext/standard/tests/strings/strrpos_offset.phpt b/ext/standard/tests/strings/strrpos_offset.phpt index 72f0c5f..6ecab10 100644 --- a/ext/standard/tests/strings/strrpos_offset.phpt +++ b/ext/standard/tests/strings/strrpos_offset.phpt @@ -1,7 +1,5 @@ --TEST-- strrpos() offset integer overflow ---SKIPIF-- -<?php if (PHP_INT_SIZE !== 4) die("skip this test is for 32-bit only"); --FILE-- <?php diff --git a/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt b/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt index 0176d90..7300eca 100644 --- a/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt +++ b/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt @@ -1,9 +1,5 @@ --TEST-- Test << operator : various numbers as strings ---SKIPIF-- -<?php -if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); -?> --FILE-- <?php diff --git a/tests/lang/operators/operator_gt_variation.phpt b/tests/lang/operators/operator_gt_variation.phpt index ff15550..937ebbb 100644 --- a/tests/lang/operators/operator_gt_variation.phpt +++ b/tests/lang/operators/operator_gt_variation.phpt @@ -1,9 +1,5 @@ --TEST-- Test > operator : max int 32bit range ---SKIPIF-- -<?php -if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); -?> --FILE-- <?php diff --git a/tests/lang/operators/operator_lt_variation.phpt b/tests/lang/operators/operator_lt_variation.phpt index 4f46863..f210fe4 100644 --- a/tests/lang/operators/operator_lt_variation.phpt +++ b/tests/lang/operators/operator_lt_variation.phpt @@ -1,9 +1,5 @@ --TEST-- Test < operator : max int 32bit range ---SKIPIF-- -<?php -if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); -?> --FILE-- <?php
« previous php.cvs (#102730) next »