openqa-4.6-15.20190603git8a35385.fc31 fails to build in F31 because two tests fail: BUILDSTDERR: 2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.00215972 s, 971 MB/s BUILDSTDERR: # Failed test 'Verify chunks fail' BUILDSTDERR: # at ./t/31-client_file.t line 170. BUILDSTDERR: # got: 'Can't verify written data from chunk BUILDSTDERR: # ' BUILDSTDERR: # expected: 'Can't verify written data from chunk' BUILDSTDERR: # Looks like you failed 1 test of 8. BUILDSTDERR: # Failed test 'verify_chunks' BUILDSTDERR: # at ./t/31-client_file.t line 176. [...] Test Summary Report ------------------- ./t/31-client_file.t (Wstat: 256 Tests: 6 Failed: 1) Failed test: 5 Non-zero exit status: 1 ./t/api/08-jobtemplates.t (Wstat: 256 Tests: 76 Failed: 1) Failed test: 61 Non-zero exit status: 1 A difference between passing and failing build root is at <https://apps.fedoraproject.org/koschei/build/6682130>. The ./t/31-client_file.t failure is triggered by upgrading perl-Mojolicious from 8.18-1.fc31 to 8.20-1.fc31.
Interesting, so the test now outputs an additional newline.
OK, I have this figured out now. Note this subtest happens to have two parts which use more or less the same check, quite close together: is( OpenQA::Files->verify_chunks($t_dir => $copied_file)->message(), 'Can\'t verify written data from chunk', 'Cannot verify chunks passes' ); ... is( OpenQA::Files->verify_chunks($t_dir => $copied_file), 'Can\'t verify written data from chunk', 'Verify chunks fail' ); but notice the *first* one does `->message()` on the result of the function, but the *second* does not. It seems as if the first is still passing, but the second is failing - we have a failure for "Verify chunks fail", not for "Cannot verify chunks passes". So, I went to look at the source: https://github.com/mojolicious/mojo/blob/master/lib/Mojo/Exception.pm . This bit: use overload bool => sub {1}, '""' => sub { shift->to_string }, fallback => 1; means that if you evaluate an Exception in string context, what you get is the result of its to_string method; if we look at to_string as it stands in current Mojo git master, it does this: my $str = $self->message; $str .= "\n" unless $str =~ /\n$/; which sure looks like it sticks a newline on the end if there isn't one there already. So, did that change recently? Why yes it did, in this commit: https://github.com/mojolicious/mojo/commit/a7019a0b53c04077b8535deb0383db6c61f31690 That removed a rather important line! Before that commit, the same bit in to_string looked like this: my $str = $self->message; return $str unless $self->verbose; $str .= "\n" unless $str =~ /\n$/; so, yeah. That change in 8.19 means we get a newline at the end when we evaluate the Exception instance in string context where previously we didn't. But using the `message` instead of evaluating the Exception instance works fine. So, I'd say we should probably change two things here: change the second line in the test to use `message` like the first line does, as that's going to be a more robust approach in general, and raise an issue on Mojo to point out this possibly unintended consequence of all the changes to Exception in 8.19. I'll do both of those.
https://github.com/mojolicious/mojo/issues/1385 https://github.com/os-autoinst/openQA/pull/2193 I'll update the Rawhide openQA package with the PR included.
OK, fixed now (had to fix a bunch of other stuff too).