Skip to content

Commit 8a9d45b

Browse files
committed
Backport flaky flag for phar tests
4e12189 b6ca871 062837a
1 parent 39c292b commit 8a9d45b

9 files changed

+49
-1
lines changed

ext/phar/tests/033a.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ phar
55
--INI--
66
phar.readonly=1
77
phar.require_hash=0
8+
--SKIPIF--
9+
<?php
10+
if (getenv("GITHUB_ACTIONS") && PHP_OS_FAMILY === "Darwin") {
11+
die("flaky Occasionally segfaults on macOS for unknown reasons");
12+
}
13+
?>
814
--FILE--
915
<?php
1016
$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.1.phar.php';

ext/phar/tests/phar_oo_002.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ phar
55
--INI--
66
phar.readonly=1
77
phar.require_hash=0
8+
--SKIPIF--
9+
<?php
10+
if (getenv("GITHUB_ACTIONS") && PHP_OS_FAMILY === "Darwin") {
11+
die("flaky Occasionally segfaults on macOS for unknown reasons");
12+
}
13+
?>
814
--FILE--
915
<?php
1016

ext/phar/tests/phar_oo_iswriteable.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ phar
55
--INI--
66
phar.readonly=0
77
phar.require_hash=0
8+
--SKIPIF--
9+
<?php
10+
if (getenv("GITHUB_ACTIONS") && PHP_OS_FAMILY === "Darwin") {
11+
die("flaky Occasionally segfaults on macOS for unknown reasons");
12+
}
13+
?>
814
--FILE--
915
<?php
1016
$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.1.phar.php';

ext/phar/tests/stat.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ phar
55
--INI--
66
phar.require_hash=1
77
phar.readonly=0
8+
--SKIPIF--
9+
<?php
10+
if (getenv("GITHUB_ACTIONS") && PHP_OS_FAMILY === "Darwin") {
11+
die("flaky Occasionally segfaults on macOS for unknown reasons");
12+
}
13+
?>
814
--FILE--
915
<?php
1016
umask(0);

ext/phar/tests/tar/033a.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ phar
55
--INI--
66
phar.readonly=0
77
phar.require_hash=0
8+
--SKIPIF--
9+
<?php
10+
if (getenv("GITHUB_ACTIONS") && PHP_OS_FAMILY === "Darwin") {
11+
die("flaky Occasionally segfaults on macOS for unknown reasons");
12+
}
13+
?>
814
--FILE--
915
<?php
1016

ext/phar/tests/zip/033a.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ phar
55
--INI--
66
phar.readonly=0
77
phar.require_hash=0
8+
--SKIPIF--
9+
<?php
10+
if (getenv("GITHUB_ACTIONS") && PHP_OS_FAMILY === "Darwin") {
11+
die("flaky Occasionally segfaults on macOS for unknown reasons");
12+
}
13+
?>
814
--FILE--
915
<?php
1016

ext/posix/tests/posix_getgrnam_basic.phpt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ Test posix_getgrnam() function : basic functionality
44
posix
55
--SKIPIF--
66
<?php
7-
if (!posix_getgroups()) die('skip - groups unavailable (ci)');
7+
if (!posix_getgroups()) die('skip - groups unavailable (ci)');
8+
if (getenv("GITHUB_ACTIONS") && PHP_OS_FAMILY === "Darwin") {
9+
die("flaky Occasionally segfaults on macOS for unknown reasons");
10+
}
811
?>
912
--FILE--
1013
<?php

ext/posix/tests/posix_getgroups_basic.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
Test posix_getgroups() function : basic functionality
33
--EXTENSIONS--
44
posix
5+
--SKIPIF--
6+
<?php
7+
if (getenv("GITHUB_ACTIONS") && PHP_OS_FAMILY === "Darwin") {
8+
die("flaky Occasionally segfaults on macOS for unknown reasons");
9+
}
10+
?>
511
--FILE--
612
<?php
713
echo "Basic test of POSIX getgroups\n";

run-tests.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2240,6 +2240,9 @@ function run_test(string $php, $file, array $env): string
22402240
} elseif (!strncasecmp('xfail', $output, 5)) {
22412241
// Pretend we have an XFAIL section
22422242
$test->setSection('XFAIL', ltrim(substr($output, 5)));
2243+
} elseif (!strncasecmp('flaky', $output, 5)) {
2244+
// Pretend we have a FLAKY section
2245+
$test->setSection('FLAKY', ltrim(substr($output, 5)));
22432246
} elseif ($output !== '') {
22442247
show_result("BORK", $output, $tested_file, 'reason: invalid output from SKIPIF', $temp_filenames);
22452248
$PHP_FAILED_TESTS['BORKED'][] = [

0 commit comments

Comments
 (0)