Skip open_de9b3fb438 s390x to avoid OOM
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Sat, 4 Feb 2023 13:01:18 +0000 (14:01 +0100)
committerTobias Frost <tobi@debian.org>
Sat, 4 Feb 2023 13:01:18 +0000 (14:01 +0100)
Forwarded: no
X-Not-Forwarded-Reason: Unclear where/how exactly
Origin: <todo-URL-to-git or similar>
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/freecad/+bug/1918474
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=984952
Last-Update: 2021-03-15

The load of the current file in test_open_head is fine, but
open_de9b3fb438 goes into an OOM even in huge (e.g. 10GB) systemd.
This probably needs a proper fix by upstream in regard to the migration
modules that load the old code, but until then (since the rest works on s390x)
this unblocks the package self-test in Debian & Ubuntu.

Gbp-Pq: Name fix-s390x-test-fail-skip-load-old-file.patch

src/Mod/Fem/femtest/app/test_open.py

index 50a8de63f4a567a28e52989d42aa9da970101dab..27653d3962df944485fe180ab872f1e8b679e1dc 100644 (file)
@@ -25,6 +25,7 @@ __title__ = "Open files FEM App unit tests"
 __author__ = "Bernd Hahnebach"
 __url__ = "https://www.freecadweb.org"
 
+import platform
 import sys
 import tempfile
 import unittest
@@ -133,6 +134,10 @@ class TestObjectOpen(unittest.TestCase):
         if sys.version_info.major < 3:
             return
 
+        # migration modules fail on s390x (big endian) and trigger OOMs (LP: #1918474)
+        if platform.machine() == "s390x":
+            return
+
         # the number in method name is the FreeCAD commit the document was created with
         # https://github.com/FreeCAD/FreeCAD/commit/de9b3fb438
         # the document was created by running the object create unit test