com web/qa: Document "xfail" in SKIPIF sections: phpt_details .php sample_tests/xfailif.php
| From: | Christoph Michael Becker | Date: | Thu, 11 Jul 2019 08:10:26 +0000 |
| Subject: | com web/qa: Document "xfail" in SKIPIF sections: phpt_details .php sample_tests/xfailif.php | ||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-68596@lists.php.net to get a copy of this message | ||
Commit: 3df10ef9a02ed0f3634c74ce15a46078ed345774
Author: Christoph M. Becker <cmbecker69@gmx.de> Thu, 11 Jul 2019 10:10:26 +0200
Parents: 832801db6f46a34bcf15a8569d90eee3d1d0040b
Branches: master
Link: http://git.php.net/?p=web/qa.git;a=commitdiff;h=3df10ef9a02ed0f3634c74ce15a46078ed345774
Log:
Document "xfail" in SKIPIF sections
Cf. <http://git.php.net/?p=php-src.git;a=commit;h=5cee9dfe9a479c15d08f66a4baca83ed4e7ed288>.
Changed paths:
M phpt_details.php
A sample_tests/xfailif.php
Diff:
diff --git a/phpt_details..php b/phpt_details.php
index fb23d9b..9822eac 100644
--- a/phpt_details.php
+++ b/phpt_details.php
@@ -113,7 +113,9 @@ and reduces future code maintenance.</p>
<p><b>Required:</b><br/>
No.</p>
<p><b>Format:</b><br/>
-PHP code enclosed by PHP tags.</p>
+PHP code enclosed by PHP tags. If the output of this scripts starts with "skip",
+the test is skipped. If the output starts with "xfail", the test is marked as
+expected failure. The "xfail" convention is supported as of PHP 7.2.0.</p>
<p><b>Example 1 (snippet):</b><br/>
<pre>--SKIPIF--
<?php if (!extension_loaded("filter")) die("Skipped: filter extension
required."); ?></pre>
@@ -124,7 +126,12 @@ PHP code enclosed by PHP tags.</p>
<?php include('skipif.inc'); ?></pre>
</p>
<p><b>Example 2 (full):</b> <a
href="sample_tests/sample003.php">sample003.phpt</a></p>
-</dd>
+<<p><b>Example 3 (snippet):</b><br/>
+<pre>--SKIPIF--
+<?php if (getenv('SKIP_ASAN')) die('xfail Startup failure leak');
?></pre>
+</p>
+<p><b>Example 3 (full):</b> <a
href="sample_tests/xfailif.php">xfailif.phpt</a></p>
+/dd>
<dt id="conflicts_section">--CONFLICTS--</dt>
<dd>
diff --git a/sample_tests/xfailif.php b/sample_tests/xfailif.php
new file mode 100644
index 0000000..b597d8e
--- /dev/null
+++ b/sample_tests/xfailif.php
@@ -0,0 +1,18 @@
+--TEST--
+Handling of errors during linking
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+opcache.optimization_level=-1
+opcache.preload={PWD}/preload_inheritance_error_ind.inc
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+if (getenv('SKIP_ASAN')) die('xfail Startup failure leak');
+?>
+--FILE--
+<?php
+echo "Foobar\n";
+?>
+--EXPECTF--
+Fatal error: Declaration of B::foo($bar) must be compatible with A::foo() in
%spreload_inheritance_error.inc on line 8