-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_unar_tool test failure #104
Comments
What is the version of unar you are running? And what OS are you on? |
Arch Linux. unarchive 1.10.8 |
I can confirm this test failure. People are also reporting this error on the aur page of python-rarfile (not that the aur package is to blame per se: I'm failing the test even by running pytest from this repo code directly). |
The version is known to be reported wrongly, see MacPaw/XADMaster#169 |
I'm seeing similar CI failures in Debian:
Those started showing up only recently, so I've been going through the CI logs (publicly available here) in an attempt to pinpoint what change or dependency triggered these failures but haven't managed to find the culprit. Ubuntu was affected too and meanwhile added a patch that simply disables the failing tests in their 4.2-2ubuntu1 package revision. |
@bgermann Unfortunately the crc error still happens with the unar debian package at revision 1.10.8+ds1-8, see this CI run. The failure looks identical to the one previously seen with revision 1.10.8+ds1-7 that did not include your updated patch. I'm still in the dark about what changed when the issues started showing up in the debian CI runs for rarfile (sometime late January - early February 2025). |
Actually, forget about the big endian CRC issue. Your test fails on amd64, so that cannot be the reason. |
Comparing the package versions between the last good and the first bad one, the only thing that comes to mind is the gnustep multiarch transition. |
Neither on Arch nor on Debian can I reproduce this manually. As the test runs fine in a non-autopkgtest environment, the reason has to be in the environment. The CRC is calculated by binascii.crc32 so the unar CRC code cannot be the reason. My first guess by looking at the code would be USE_EXTRACT_HACK which writes to a temporary file. When that goes wrong and the error is not caught, the file might end up garbled and is then picked up to calculate the CRC. |
Put that first guess to the test but no luck... patching rarfile.py to have USE_EXTRACT_HACK = 0 (line ~126) results in the same crc-related test failures, plus two extra test failures with unrar-free only (in test/test_reading.py::test_reading_rar3_sfx and test/test_reading.py::test_reading_rar5_crc_sfx - both rarfile.BadRarFile). Full autopkgtest logs: Result with USE_EXTRACT_HACK set to zero The gnustep changes you mentioned look like a perfect match time-wise, but not exactly easy to test. I'm tempted to just skip the affected tests in the rarfile package, same as they did in ubuntu. |
The data that is CRCed is prepended by "dpkg-architecture: warning: cannot determine CC system type, falling back to default (native compilation)". |
So the Debian portion of this bug is actually a Debian-only bug. This does not explain the wrong CRC on Arch, which is indeed different from the one in Debian. Hint: In the autopkgtest, you can work around the bug by |
Python 3.12
The text was updated successfully, but these errors were encountered: