Skip to content

Fix tests on 32-bit Windows OS #8448

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 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
18 changes: 0 additions & 18 deletions ext/gd/tests/bug77269.phpt

This file was deleted.

1 change: 1 addition & 0 deletions ext/gd/tests/bug77272.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ memory_limit=-1
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this test succeed on 32bit Linux?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2**28 is still within the 32-bit integer range, I need to investigate further

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is correct, but there are additional allocations, and I think that the scaling uses a truecolor image which requires 4 byte for each pixel. So we're at 2^30 (plus), what usually doesn't work on Windows (usually max. 2 GiB per process), while Linux may allow more.

if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.5', '<=')) die('skip upstream fix not yet released');
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
?>
Expand Down
4 changes: 2 additions & 2 deletions ext/sysvshm/tests/bug72858.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Bug #72858 shm_attach null dereference
--SKIPIF--
<?php
if (!extension_loaded("sysvshm")){ print 'skip'; }
if (4 < PHP_INT_SIZE) { print "skip 32-bit only"; }
if (substr(PHP_OS, 0, 3) != "WIN") { print "skip windows only"; }
?>
--FILE--
Expand All @@ -14,5 +13,6 @@ $v2=0xffffffff / 4 + 0x1337;
shm_attach($v1,$v2);

?>
==DONE==
--EXPECTF--
Warning: shm_attach(): Failed for key 0x64: Not enough space in %s on line %d
==DONE==
3 changes: 0 additions & 3 deletions sapi/phpdbg/tests/watch_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
Test simple recursive watchpoint
--SKIPIF--
<?php
if (PHP_INT_SIZE == 4) {
Copy link
Contributor Author

@mvorisek mvorisek Apr 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably fixed, tests pass:

Test simple recursive watchpoint [D:\a\php-src\php-src\sapi\phpdbg\tests\watch_001.phpt] (warn: XFAIL section but test passes)
Test simple array watchpoint with replace [D:\a\php-src\php-src\sapi\phpdbg\tests\watch_002.phpt] (warn: XFAIL section but test passes)
Test simple watchpoint with replace [D:\a\php-src\php-src\sapi\phpdbg\tests\watch_003.phpt] (warn: XFAIL section but test passes)
Test detection of inline string manipulations on zval watch [D:\a\php-src\php-src\sapi\phpdbg\tests\watch_004.phpt] (warn: XFAIL section but test passes)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issues may be solved, but I'd only remove that skipif clause for "master".

Copy link
Contributor Author

@mvorisek mvorisek Apr 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it passes for PHP-8.0, why do not fix this good behaviour for PHP-8.0 too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may pass, but would it pass in all enviroments? I mean the skip reason is "There may be flaws in the implementation of watchpoints that cause failures". This may not have been resolved generally. Maybe @krakjoe can comment on this?

die("xfail There may be flaws in the implementation of watchpoints that cause failures");
}
if (getenv('SKIP_ASAN')) {
die("skip intentionally causes segfaults");
}
Expand Down
3 changes: 0 additions & 3 deletions sapi/phpdbg/tests/watch_002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
Test simple array watchpoint with replace
--SKIPIF--
<?php
if (PHP_INT_SIZE == 4) {
die("xfail There may be flaws in the implementation of watchpoints that cause failures");
}
if (getenv('SKIP_ASAN')) {
die("skip intentionally causes segfaults");
}
Expand Down
3 changes: 0 additions & 3 deletions sapi/phpdbg/tests/watch_003.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
Test simple watchpoint with replace
--SKIPIF--
<?php
if (PHP_INT_SIZE == 4) {
die("xfail There may be flaws in the implementation of watchpoints that cause failures");
}
if (getenv('SKIP_ASAN')) {
die("skip intentionally causes segfaults");
}
Expand Down
3 changes: 0 additions & 3 deletions sapi/phpdbg/tests/watch_004.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
Test detection of inline string manipulations on zval watch
--SKIPIF--
<?php
if (PHP_INT_SIZE == 4) {
die("xfail There may be flaws in the implementation of watchpoints that cause failures");
}
if (getenv('SKIP_ASAN')) {
die("skip intentionally causes segfaults");
}
Expand Down