Some 0.4.0 test failures on Fedora #85
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
By Georg Sauthoff on 2020-09-20T10:38:44.913Z
So I've bumped the Fedora package to 0.4.0. AFAICS, the test suite switched to pytest although a test shell script is still included.
However, I execute the tests now like this:
Some tests fail because of the 'endianess' vs. 'endianness' key difference in ImageMagick - I think this was previously fixed in
test.sh
. FWIW, ImageMagick on Fedora >= 31 uses 'endiannes'. I quick fixed this with:Another problem is the location of the
sRGB.icc
some tests use now. On Fedora it's located elsewhere. Thus, I quick fixed (?) it with:Unfortunately, after there are still 3 failing tests (9 errors) - on x86_64:
By josch on 2020-09-20T13:32:01.569Z
Yes, that's an oversight and has been fixed in
c4fb1d886f
Yes, there is some difference in the
-verbose
output depending on the version which was fixed. Since I didn't want to have these kind of problems in the future, I switched from parsing-verbose
which is meant to be human readable to the json output, which is meant to be machine readable and is "guaranteed not to change other than the possibility of additional attributes": https://github.com/ImageMagick/ImageMagick6/issues/90#issuecomment-668281074Unfortunately, there was another bug in the json output which was quickly fixed: https://github.com/ImageMagick/ImageMagick6/issues/90#issuecomment-682266441
So the correct fix, is to query the json version and then choose to retrieve either endianess or endianness -- I still have to make a commit for that.
The temporary fix for Debian is: https://sources.debian.org/src/img2pdf/0.4.0-1/debian/patches/endianess-endianness.patch/
Yes, the tests should not rely on the icc profiles shipped by the OS. This is solved by creating our own ICC profiles in
11907242a5
.At least the failures are now easier to read than they were before with the shell script. :)
The problem with
icc.png
is probably, that the sRGB.icc shipped by fedora has a different checksum than the one shipped in Debian and thus the resulting in a different checksum. The problem is fixed by11907242a5
as well, because no external icc profile is needed anymore.The next failure is the difference between depth and baseDepth which in Debian I fixed like this:
https://sources.debian.org/src/img2pdf/0.4.0-1/debian/patches/imdepth.patch/
The last failure is a wrong ghostscript rendering of the ccitt encoded pdf. I have no clue about that one. Maybe it's a ghostscript problem? Then it'll probably pop up in Debian soon as well.
By Georg Sauthoff on 2020-09-21T10:12:50.954Z
Ok, I've added your
imdepth.patch
and I'm skipping test_png_icc and test_tiff_ccitt_nometa2 for this release.With this release I'm also adding
pikepdf
as hard dependency. I understand thatpdfrw
is deprecated and thatpikepdf
is the future.Previously, the fedora package didn't depend on
pdfrw
- which is also ok, because img2pdf also has built-in support for PDF writing.However, AFAICS, you are basically recommending
pikepdf
over the internal PDF engine because it offers additional features, such as better compression. Is this a fair summary?By josch on 2020-09-21T14:51:22.232Z
Yes, that's part of the reason. The additional features are stuff like being able to produce linearized pdfs (fast web view) or the better compression you mentioned. The internal PDF engine will never have these features. The test suite makes sure that both, the pikepdf as well as the internal engine produce pdf files that render equally. My reason to keep the internal engine nevertheless are:
For distributions like Fedora or Debian, there is no reason not to add a hard dependency on pikepdf, because the library is readily available in the respective repos.
Apparently, the accounts weren't migrated when switching from gitlab to gitea. I had to re-register my account here.
Hm, this didn't end up in release 0.4.1? I'm still seeing the
/usr/share/color/icc/sRGB.icc
location errors in the current main branch.Thus, the related unit test cases still fail in 0.4.1:
https://kojipkgs.fedoraproject.org//work/tasks/6227/71286227/build.log
The 'endianess' vs. 'endianness' issue is still an issue on Fedora Rawhide.
Your check
doesn't work there because version uses a completely different scheme:
So, as before, I propose to just test for both key names and don't bother with any version checking. I consider the probability that the dictionary ends up including
endianess
andendianness
, at some point, as extremely low.And I would put the check in a helper function (see my previous comment) in case things change again then just one code location need to be patched.
On Fedora 33 I have a bunch of test case failures for depth assertions which look similar to the old ones, e.g.:
So, again, the version check probably goes in the wrong direction.
The
src/img2pdf_test.py::test_tiff_ccitt_nometa2
still fail on Fedora 33, e.g.:^^ There seem to be issues with spam on Muffin Gitea?
I think that this issue can be closed. I don't see these issues in later versions on Fedora, anymore.