Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 883939 - dev-python/python-xmp-toolkit-2.0.1-r2 - FAIL: test_formats (test.test_exempi.TestExempi)
Summary: dev-python/python-xmp-toolkit-2.0.1-r2 - FAIL: test_formats (test.test_exempi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: Normal normal (vote)
Assignee: Andrey Grozin
URL:
Whiteboard:
Keywords: PullRequest, TESTFAILURE
Depends on:
Blocks:
 
Reported: 2022-12-01 22:30 UTC by ernsteiswuerfel
Modified: 2023-02-27 13:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (ppc, 2.0.1-r2) (python-xmp-toolkit-2.0.1-r2:20221201-161106.log,31.30 KB, text/plain)
2022-12-01 22:30 UTC, ernsteiswuerfel
Details
emerge --info (file_883939.txt,6.45 KB, text/plain)
2022-12-01 22:31 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2022-12-01 22:30:17 UTC
Created attachment 838867 [details]
build.log (ppc, 2.0.1-r2)

[...]
======================================================================
FAIL: test_formats (test.test_exempi.TestExempi)
Verify that check_file_format function works as expected.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/python-xmp-toolkit-2.0.1-r2/work/python-xmp-toolkit-2.0.1/test/test_exempi.py", line 439, in test_formats
    self.assertEqual(actual_format, expected_format)
AssertionError: 538976288 != 1195984416

----------------------------------------------------------------------
Ran 73 tests in 1.547s

FAILED (failures=1, errors=4, skipped=4)
 * ERROR: dev-python/python-xmp-toolkit-2.0.1-r2::gentoo failed (test phase):
 *   Tests failed with python3.9
Comment 1 ernsteiswuerfel archtester 2022-12-01 22:31:00 UTC
Created attachment 838869 [details]
emerge --info
Comment 2 cJ 2023-02-21 19:23:20 UTC
This bug was due to an upgrade in exempi which removed support for GIF87a.
The sample file that is used by the unit tests is a GIF87a.

While working on pypy support for sympy & dependencies I hit this bug.

The upstream repository was archived yesterday 2023-02-20.

I merged patches fixing the tests (this issue was noticed by someone else, who filed a PR substituting the python-xmp-toolkit GIF87a with a GIF89a from exempi's tests) in
 https://github.com/exmakhina/python-xmp-toolkit

I'm trying to get in contact with the original maintainers.
I can submit a patch for Gentoo.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-02-22 04:56:23 UTC
What's the patch?  Is it skipping/removing the test or something else?
Comment 4 cJ 2023-02-22 20:48:15 UTC
- The GIF87a is replaced; there's no upstream issue for this but a pull request fixing it existed already:
  https://github.com/python-xmp-toolkit/python-xmp-toolkit/pull/84

- Error code handling (uses a ctypes callback return type, which works normally with c_int but exempi returns c_char which may cause different results) which corrects the infinite loop I was seeing the first time I ran the tests

See
https://github.com/python-xmp-toolkit/python-xmp-toolkit/compare/master...exmakhina:python-xmp-toolkit:master
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-02-23 05:51:48 UTC
Hmm, I suppose you could grab that patch via SRC_URI, I think eapply can handle git binary patches nowadays.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-02-23 08:17:53 UTC
(In reply to Michał Górny from comment #5)
> Hmm, I suppose you could grab that patch via SRC_URI, I think eapply can
> handle git binary patches nowadays.

Apparently binary patches won't work, so let's just deselect that test and patch any other important issues (through FILESDIR then, I guess).
Comment 7 cJ 2023-02-27 09:53:29 UTC
So the easiest would be to have an upstream update, and I tried to contact the maintainers harder.
Just in case I also filed a PEP 541 request.
I'm tracking this effort here: https://github.com/exmakhina/python-xmp-toolkit/issues/1

If there's a rush (it may take a few weeks to get things fixed), I could tag a dot release in my fork, but I don't feel great about this since it's only been a week since upstream repo archival / contact attempt.
Comment 8 cJ 2023-02-27 09:56:30 UTC
Of course deselecting the failing test(s) in a patch works as a Gentoo-specific band-aid for now.
Comment 9 Larry the Git Cow gentoo-dev 2023-02-27 13:48:24 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26859d60f5731734157b21fad361e99ebbc93e94

commit 26859d60f5731734157b21fad361e99ebbc93e94
Author:     Jérôme Carretero <cJ-gentoo@zougloub.eu>
AuthorDate: 2023-02-27 10:14:59 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2023-02-27 13:48:20 +0000

    dev-python/python-xmp-toolkit: update patch to please testing
    
    Update patch to include 2 more changes.
    
    Closes: https://bugs.gentoo.org/883939
    Signed-off-by: Jérôme Carretero <cJ-gentoo@zougloub.eu>
    Closes: https://github.com/gentoo/gentoo/pull/29826
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 .../files/python-xmp-toolkit-2.0.1-test.patch      | 68 ++++++++++++++++++++--
 1 file changed, 64 insertions(+), 4 deletions(-)