com web/qa: Document "xfail" in SKIPIF sections: phpt_details .php sample_tests/xfailif.php

[email protected] (Christoph Michael Becker)
Newsgroups php.qa
Message-ID <[email protected]>
Commit:    3df10ef9a02ed0f3634c74ce15a46078ed345774
Author:    Christoph M. Becker <[email protected]>         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--
 &lt;?php if (!extension_loaded("filter")) die("Skipped: filter extension required."); ?&gt;</pre>
@@ -124,7 +126,12 @@ PHP code enclosed by PHP tags.</p>
 &lt;?php include('skipif.inc'); ?&gt;</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--
+&lt;?php if (getenv('SKIP_ASAN')) die('xfail Startup failure leak'); ?&gt;</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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.