[Git][reproducible-builds/diffoscope][master] Correctly catch segfauling cd-iccdump binary.

Chris Lamb (@lamby) gitlab at salsa.debian.org
Mon Jan 9 09:05:31 UTC 2023



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
2d95ae41 by Chris Lamb at 2023-01-09T09:05:08+00:00
Correctly catch segfauling cd-iccdump binary.

- - - - -


1 changed file:

- tests/comparators/test_icc.py


Changes:

=====================================
tests/comparators/test_icc.py
=====================================
@@ -18,6 +18,7 @@
 # along with diffoscope.  If not, see <https://www.gnu.org/licenses/>.
 
 import pytest
+import signal
 import subprocess
 
 from diffoscope.config import Config
@@ -55,12 +56,11 @@ def cd_iccdump_version():
             ("cd-iccdump", data("test1.icc"))
         ).decode("utf-8")
     except subprocess.CalledProcessError as exc:
-        if exc.returncode != 0:
-            raise
-        pytest.skip(
-            "Skipping all ICC tests as cd-iccdump killed with signal",
-            allow_module_level=True,
-        )
+        if exc.returncode == -signal.SIGSEGV:
+            pytest.skip(
+                "Skipping all ICC tests as cd-iccdump killed with signal",
+                allow_module_level=True,
+            )
 
     for x in val.splitlines():
         if x.startswith("  Profile ID") and len(x) == 47:



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/2d95ae41efada9d7f99bcd01d96b130b2401f22c

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/2d95ae41efada9d7f99bcd01d96b130b2401f22c
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20230109/eb653712/attachment.htm>


More information about the rb-commits mailing list