<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 25, 2020 at 12:38 PM Christian Ehrhardt <<a href="mailto:christian.ehrhardt@canonical.com">christian.ehrhardt@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 25, 2020 at 3:54 AM Bryce Harrington <<a href="mailto:bryce.harrington@canonical.com" target="_blank">bryce.harrington@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Christian, would you mind looking into this one?<br></blockquote><div><br></div><div>Sure, taking a look ... </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On Tue, Mar 24, 2020 at 07:14:02PM -0700, Bryce Harrington wrote:<br>
> > > php-league-commonmark<br>
> > >   - League\CommonMark\Tests\Functional\BinTest::testStdin<br>
> > >     Failed asserting that 1 matches expected 0.<br>
> > >   - 1.3.1-1 could be sync'd from debian<br>
> > >   - syncpackage -V 1.3.1-1 -d unstable -r focal-proposed php-league-commonmark<br>
> > >   - Sync Done<br>
> > >   - Yet php-defaults still showing as built against<br>
> > >     php-league-commonmark 1.3.0-1...?<br>
> > >   - Guessing needs a retrigger?<br>
> > <br>
> > 1.3.1-1 is still failing the same way.  The test result needs to be<br>
> > analyzed and a patch figured out.  This might be HW specific to s390.<br>
> <br>
> Still needs figured out<br>
<br>
This appears to be something peculiar to s390x, which I'm guessing you<br>
know a way to run checks on?<br>
<br>
>From the test it looks like it's simply doing:<br>
<br>
$ bin/commonmark ./tests/functional/data/atx_heading.md<br></blockquote><div><br></div><div>In an unbuilt tree this fails for sure:</div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">root@f-php:~/php-league-commonmark-1.3.1# bin/commonmark ./tests/functional/data/atx_heading.md
</span><br>PHP Fatal error:  Uncaught Error: Class 'League\CommonMark\CommonMarkConverter' not found in /root/php-league-commonmark-1.3.1/bin/commonmark:84
<br>Stack trace:
<br>#0 {main}
<br>  thrown in /root/php-league-commonmark-1.3.1/bin/commonmark on line 84
<br>Fatal error: Uncaught Error: Class 'League\CommonMark\CommonMarkConverter' not found in /root/php-league-commonmark-1.3.1/bin/commonmark:84
<br>Stack trace:
<br>#0 {main}
<br>  thrown in /root/php-league-commonmark-1.3.1/bin/commonmark on line 84<br>
<br></span></div><div><span style="font-family:monospace">If I build it on s390x it runs the tests as well and they all work.</span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">WARNINGS!</span><span style="color:rgb(0,0,0)">
</span><br><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">Tests: 2773, Assertions: 3341, Warnings: 92.</span></span> </div><div><br></div></div></div></blockquote><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)"><br></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">This is the test that fails on LP, other than the warning it succeds:</span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)"><br></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">1) League\CommonMark\Tests\Functional\BinTest::testNoArgsOrStdin
</span><br>Using assertContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringContainsString() or assertStringContainsStringIgnorin<br>gCase() instead.<br></span></div><div><br></div><div>For now what do you think of this:</div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">--- tests/functional/BinTest.php.orig   2020-03-25 12:05:51.794955208 +0000
</span><br>+++ tests/functional/BinTest.php        2020-03-25 12:13:26.184955208 +0000
<br>@@ -103,6 +103,10 @@
<br>         $cmd = new Command(sprintf('cat %s | %s ', $this->getPathToData('atx_heading.md'), $this->getPathToCommonmark()));
<br>         $cmd->execute();
<br>  <br>+        if (php_uname('m') == "s390x") {
<br>+            $this->markTestSkipped(sprintf('Test skipped: STDIN test flaky and non reprodicible on s390x\n - out: "%s" - err: "%s"', $cmd->getOutput(), $cmd->getError()));
<br>+        }
<br>+
<br>         $this->assertEquals(0, $cmd->getExitCode());
<br>         $expectedContents = trim(file_get_contents($this->getPathToData('atx_heading.html')));
<br>         $this->assertEquals($expectedContents, $cmd->getOutput());<br>
<br></span></div><div><span style="font-family:monospace">That will keep the remaining tests but skip this odd one on s390x only.</span></div><div><span style="font-family:monospace">And as a bonus we might get in the skip message what is failing in the LP environment?</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">Example:</span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">1) League\CommonMark\Tests\Functional\BinTest::testStdin
</span><br>Test skipped: STDIN test flaky and non reprodicible on s390x\n - out: "<h1>H1</h1>
<br><h2>H2</h2>
<br><h3>H3</h3>
<br><h4>H4</h4>
<br><h5>H5</h5>
<br><h6>H6</h6>
<br><h1>H1</h1>
<br><h2>H2</h2>
<br><h3>H3</h3>
<br><h4>H4</h4>
<br><h5>H5</h5>
<br><h6>H6</h6>" - err: ""<br></span></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div></div><div>The warnings are mostly deprecation warnings.</div><div>Running the same in the build dir or as autopkgtest returns the same result (working)</div><div><br></div><div>Running commonmark itself also works just fine.</div><div>TL;DR: not reproducible outside of launchpad test env :-/</div><div><br></div><div>I might later on check if different package levels (I ran all proposed) might change anything.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<h1>H1</h1><br>
<h2>H2</h2><br>
<h3>H3</h3><br>
<h4>H4</h4><br>
<h5>H5</h5><br>
<h6>H6</h6><br>
<h1>H1</h1><br>
<h2>H2</h2><br>
<h3>H3</h3><br>
<h4>H4</h4><br>
<h5>H5</h5><br>
<h6>H6</h6><br>
<br>
For some unclear reason, on s390x this is resulting in an exitcode of<br>
1.  Can you check and see if you can reproduce that, and if so look at<br>
what might be going on?<br>
<br>
Thanks,<br>
Bryce<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr">Christian Ehrhardt<br>Staff Engineer, Ubuntu Server<br>Canonical Ltd</div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Christian Ehrhardt<br>Staff Engineer, Ubuntu Server<br>Canonical Ltd</div></div>