Last-Update: 2023-07-16
Forwarded: not-needed
AdditionOverflowInLoaderExifJpeg expects an overflow to happen on 32bit
architectures; due to the way LoaderExifJpeg & StringValueBase work and the
test data is fabricated, the overflow happens only architectures with signed
char.
Tweak AdditionOverflowInLoaderExifJpeg to account for this, by not expecting an
overflow in case the architecture has unsigned char (e.g. ARM and POWER).
For more discussion and notes, see: https://github.com/Exiv2/exiv2/issues/933
Gbp-Pq: Name tests-overflow-skip-unsigned-char-23bit.diff
# -*- coding: utf-8 -*-
+import platform
+
import system_tests
class AdditionOverflowInLoaderExifJpeg(metaclass=system_tests.CaseMeta):
Warning: Directory Image, entry 0x0201: Strip 0 is outside of the data area; ignored.
Warning: Directory Image, entry 0x0201: Strip 7 is outside of the data area; ignored.
""" +
- ("" if system_tests.BT.Config.is_64bit else "Uncaught exception: Overflow in addition\n")
+ ("" if system_tests.BT.Config.is_64bit or any(i for i in ["arm", "ppc"] if i in platform.uname().machine) else "Uncaught exception: Overflow in addition\n")
]
- retval = [0 if system_tests.BT.Config.is_64bit else 1]
+ retval = [0 if system_tests.BT.Config.is_64bit or any(i for i in ["arm", "ppc"] if i in platform.uname().machine) else 1]