|
33 | 33 | <a href="#file_section">--FILE--</a> | <a href="#fileeof_section">--FILEEOF--</a> | <a href="#file_external_section">--FILE_EXTERNAL--</a> | <a href="#redirecttest_section">--REDIRECTTEST--</a><br/>
|
34 | 34 | [<a href="#cgi_section">--CGI--</a>]<br/>
|
35 | 35 | [<a href="#xfail_section">--XFAIL--</a>]<br/>
|
| 36 | +[<a href="#flaky_section">--FLAKY--</a>]<br/> |
36 | 37 | [<a href="#expectheaders_section">--EXPECTHEADERS</a>--]<br/>
|
37 | 38 | <a href="#expect_section">--EXPECT--</a> | <a href="#expectf_section">--EXPECTF--</a> | <a href="#expectregex_section">--EXPECTREGEX--</a>
|
38 | 39 | | <a href="#expect_external_section">--EXPECT_EXTERNAL--</a> | <a href="#expectf_external_section">--EXPECTF_EXTERNAL--</a> | <a href="#expectregex_external_section">--EXPECTREGEX_EXTERNAL--</a>
|
|
116 | 117 | <p><b>Format:</b><br/>
|
117 | 118 | PHP code enclosed by PHP tags. If the output of this scripts starts with "skip",
|
118 | 119 | the test is skipped. If the output starts with "xfail", the test is marked as
|
119 |
| -expected failure. The "xfail" convention is supported as of PHP 7.2.0.</p> |
| 120 | +<a href="#xfail_section">expected failure</a>. If the output starts with "flaky", |
| 121 | +the test is marked as <a href="#flaky_section">flaky test</a>. |
| 122 | +The "xfail" convention is supported as of PHP 7.2.0. |
| 123 | +The "flaky" convention is supported as of PHP 8.2.25 and PHP 8.3.13, respectively.</p> |
120 | 124 | <p><b>Example 1 (snippet):</b><br/>
|
121 | 125 | <pre>--SKIPIF--
|
122 | 126 | <?php if (!extension_loaded("filter")) die("Skipped: filter extension required."); ?></pre>
|
|
132 | 136 | <?php if (getenv('SKIP_ASAN')) die('xfail Startup failure leak'); ?></pre>
|
133 | 137 | </p>
|
134 | 138 | <p><b>Example 3 (full):</b> <a href="sample_tests/xfailif.php">xfailif.phpt</a></p>
|
| 139 | +<p><b>Example 4 (snippet):</b><br/> |
| 140 | +<pre>--SKIPIF-- |
| 141 | +<?php |
| 142 | +if (getenv("GITHUB_ACTIONS") && PHP_OS_FAMILY === "Darwin") { |
| 143 | + die("flaky Occasionally segfaults on macOS for unknown reasons"); |
| 144 | +} |
| 145 | +>></pre> |
| 146 | +</p> |
| 147 | +<p><b>Example 4 (full):</b> <a href="sample_tests/flakyif.php">flakyif.phpt</a></p> |
135 | 148 | </dd>
|
136 | 149 |
|
137 | 150 | <dt id="conflicts_section">--CONFLICTS--</dt>
|
|
666 | 679 | <p><b>Example 1 (full):</b> <a href="sample_tests/sample017.php">sample017.phpt</a></p>
|
667 | 680 | </dd>
|
668 | 681 |
|
| 682 | +<dt id="flaky_section">--FLAKY--</dt> |
| 683 | +<dd> |
| 684 | +<p><b>Description:</b><br/> |
| 685 | +This section identifies this test as one that occassionally fails. If the test |
| 686 | +actually fails, it will be retried one more time, and that result will be reported. |
| 687 | +The section should include a brief description of why the test is flaky. Reasons for |
| 688 | +this include tests that rely on relatively precise timing, or |
| 689 | +temporary disc states. Available as of PHP 8.1.22 and 8.2.9, respectively.</p> |
| 690 | +<p>Please do NOT include a --FLAKY-- section without providing a text description for |
| 691 | +the reason it is being used.</p> |
| 692 | +<p><b>Required:</b><br/> |
| 693 | +No.</p> |
| 694 | +<p><b>Test Script Support:</b><br/> |
| 695 | +run-tests.php</p> |
| 696 | +<p><b>Format:</b><br/> |
| 697 | +A short plain text description of why this test is flaky.</p> |
| 698 | +<p><b>Example 1 (snippet):</b><br/> |
| 699 | +<pre>--FLAKY-- |
| 700 | +This test frequently fails in CI</pre></p> |
| 701 | +<p><b>Example 1 (full):</b> <a href="sample_tests/flaky.php">flaky.phpt</a></p> |
| 702 | +</dd> |
| 703 | + |
669 | 704 | <dt id="expectheaders_section">--EXPECTHEADERS--</dt>
|
670 | 705 | <dd>
|
671 | 706 | <p><b>Description:</b><br/>
|
|
0 commit comments