Skip to content

tests: Introduce platform checks #7325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Zend/tests/array_unpack/already_occupied.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
Appending to an array via unpack may fail
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip 64bit only"); ?>
--PLATFORM--
bits: 64
--FILE--
<?php

Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/binary-32bit.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
testing binary literals
--SKIPIF--
<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
--PLATFORM--
bits: 32
--FILE--
<?php
var_dump(0b1);
Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/binary.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
testing binary literals
--INI--
precision=32
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
--PLATFORM--
bits: 64
--FILE--
<?php
var_dump(0b1);
Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/bug46701.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
Bug #46701 (Creating associative array with long values in the key fails on 32bit linux)
--SKIPIF--
<?php if (PHP_INT_SIZE != 4) die('skip this test is for 32bit platforms only'); ?>
--PLATFORM--
bits: 32
--FILE--
<?php

Expand Down
6 changes: 2 additions & 4 deletions Zend/tests/bug54547.phpt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
--TEST--
Bug #54547: wrong equality of string numbers near LONG_MAX with 64-bit longs
--SKIPIF--
<?php
if (PHP_INT_MAX !== 9223372036854775807)
die("skip for 64-bit long systems only");
--PLATFORM--
bits: 64
--FILE--
<?php
var_dump("9223372036854775807" == "9223372036854775808");
Expand Down
6 changes: 2 additions & 4 deletions Zend/tests/bug55509.phpt
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
--TEST--
Bug #55509 (segfault on x86_64 using more than 2G memory)
--PLATFORM--
bits: 64
--SKIPIF--
<?php
if (PHP_INT_SIZE == 4) {
die('skip Not for 32-bits OS');
}

$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
if ($zend_mm_enabled === "0") {
die("skip Zend MM disabled");
Expand Down
6 changes: 2 additions & 4 deletions Zend/tests/bug62097.phpt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
--TEST--
Bug #62097: fix for bug #54547 is wrong for 32-bit machines
--SKIPIF--
<?php
if (PHP_INT_MAX !== 2147483647)
die('skip for system with 32-bit wide longs only');
--PLATFORM--
bits: 32
--FILE--
<?php
var_dump("02147483647" == "2147483647",
Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/bug69892.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
Bug #69892: Different arrays compare identical due to integer key truncation
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only"); ?>
--PLATFORM--
bits: 64
--FILE--
<?php
var_dump([0 => 0] === [0x100000000 => 0]);
Expand Down
6 changes: 2 additions & 4 deletions Zend/tests/bug70173.phpt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
--TEST--
Bug #70173 (ZVAL_COPY_VALUE_EX broken for 32bit Solaris Sparc)
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platforms only");
?>
--PLATFORM--
bits: 32
--FILE--
<?php
$var = 2900000000;
Expand Down
5 changes: 3 additions & 2 deletions Zend/tests/bug74093.phpt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
--TEST--
Bug #74093 (Maximum execution time of n+2 seconds exceed not written in error_log)
--PLATFORM--
os: !Windows
zts: false
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
if (PHP_ZTS) die("skip only for no-zts build");
if (substr(PHP_OS, 0, 3) == 'WIN') die("skip not for Windows");
?>
--INI--
memory_limit=1G
Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/bug77660.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
Bug #77660 (Segmentation fault on break 2147483648)
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
--PLATFORM--
bits: 64
--FILE--
<?php
for(;;) break 2147483648;
Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/compare_001.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
comparing different variables for equality
--SKIPIF--
<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
--PLATFORM--
bits: 32
--FILE--
<?php

Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/compare_001_64bit.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
comparing different variables for equality
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
--PLATFORM--
bits: 64
--FILE--
<?php

Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/compare_002.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
comparing different variables for identity
--SKIPIF--
<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
--PLATFORM--
bits: 32
--FILE--
<?php

Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/compare_002_64bit.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
comparing different variables for identity
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
--PLATFORM--
bits: 64
--FILE--
<?php

Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/compare_003.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
comparing different variables (greater than)
--SKIPIF--
<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
--PLATFORM--
bits: 32
--FILE--
<?php

Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/compare_003_64bit.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
comparing different variables (greater than)
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
--PLATFORM--
bits: 64
--FILE--
<?php

Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/compare_004.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
comparing different variables (less than)
--SKIPIF--
<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
--PLATFORM--
bits: 32
--FILE--
<?php

Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/compare_004_64bit.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
comparing different variables (less than)
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
--PLATFORM--
bits: 64
--FILE--
<?php

Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/compare_005.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
comparing different variables (greater or equal than)
--SKIPIF--
<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
--PLATFORM--
bits: 32
--FILE--
<?php

Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/compare_005_64bit.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
comparing different variables (greater or equal than)
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
--PLATFORM--
bits: 64
--FILE--
<?php

Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/compare_006.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
comparing different variables (smaller or equal than)
--SKIPIF--
<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
--PLATFORM--
bits: 32
--FILE--
<?php

Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/compare_006_64bit.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
comparing different variables (smaller or equal than)
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
--PLATFORM--
bits: 64
--FILE--
<?php

Expand Down
4 changes: 3 additions & 1 deletion Zend/tests/concat_003.phpt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
--TEST--
Concatenating many small strings should not slowdown allocations
--PLATFORM--
# debug version is slow
debug: false
--SKIPIF--
<?php
if (PHP_DEBUG) { die ("skip debug version is slow"); }
if (getenv('SKIP_PERF_SENSITIVE')) die("skip performance sensitive test");
?>
--FILE--
Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/decrement_001.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
decrementing different variables
--SKIPIF--
<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
--PLATFORM--
bits: 32
--INI--
precision=14
--FILE--
Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/decrement_001_64bit.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
decrementing different variables
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
--PLATFORM--
bits: 64
--INI--
precision=14
--FILE--
Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/double_to_string.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
double to string conversion tests
--INI--
precision=14
--SKIPIF--
<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
--PLATFORM--
bits: 32
--FILE--
<?php

Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/double_to_string_64bit.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
double to string conversion tests (64bit)
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
--PLATFORM--
bits: 64
--INI--
precision=14
--FILE--
Expand Down
7 changes: 2 additions & 5 deletions Zend/tests/dval_to_lval_32.phpt
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
--TEST--
zend_dval_to_lval preserves low bits (32 bit long)
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4)
die("skip for machines with 32-bit longs");
?>
--PLATFORM--
bits: 32
--FILE--
<?php
/* test doubles around -4e21 */
Expand Down
7 changes: 2 additions & 5 deletions Zend/tests/dval_to_lval_64.phpt
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
--TEST--
zend_dval_to_lval preserves low bits (64 bit long)
--SKIPIF--
<?php
if (PHP_INT_SIZE != 8)
die("skip for machines with 64-bit longs");
?>
--PLATFORM--
bits: 64
--FILE--
<?php
/* test doubles around -4e21 */
Expand Down
6 changes: 2 additions & 4 deletions Zend/tests/float_to_int/explicit_casts_should_not_warn.phpt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
--TEST--
Explicit (int) cast must not warn
--SKIPIF--
<?php
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
?>
--PLATFORM--
bits: 64
--FILE--
<?php

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
--TEST--
Explicit (int) cast must not warn 32bit variation
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
?>
--PLATFORM--
bits: 32
--FILE--
<?php

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
--TEST--
Implicit float to int conversions when float too large should warn, string offset variant
--SKIPIF--
<?php
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
?>
--PLATFORM--
bits: 64
--FILE--
<?php

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
--TEST--
Implicit float to int conversions when float too large should warn, string offset variant, 32bit variant
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
?>
--PLATFORM--
bits: 32
--FILE--
<?php

Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/hex_overflow_32bit.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
testing integer overflow (32bit)
--INI--
serialize_precision=14
--SKIPIF--
<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
--PLATFORM--
bits: 32
--FILE--
<?php

Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/increment_001.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
incrementing different variables
--SKIPIF--
<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
--PLATFORM--
bits: 32
--INI--
precision=14
--FILE--
Expand Down
Loading