[Debian-med-packaging] Bug#1041813: orthanc: test failing on s390x (skipped)

Étienne Mollier emollier at debian.org
Sun Jul 23 20:56:06 BST 2023


Source: orthanc
Version: 1.12.1+dfsg-1
Severity: important
Tags: upstream

The orthanc test suite fails after the build on s390x:

	./OrthancFramework/UnitTestsSources/ImageTests.cpp:124: Failure
	Expected equality of these values:
	  "1cca552b6bd152b6fdab35c4a9f02c2a"
	  md5
	    Which is: "92186150927d2f2c883ea72155597056"
	[  FAILED  ] PngWriter.Color16Pattern (4 ms)
	[…]
	[----------] Global test environment tear-down
	[==========] 270 tests from 63 test suites ran. (2030 ms total)
	[  PASSED  ] 269 tests.
	[  FAILED  ] 1 test, listed below:
	[  FAILED  ] PngWriter.Color16Pattern
	
	 1 FAILED TEST

This test is currently skipped in version 1.12.1+dfsg-2, but I
proceeded pretty bluntly, so at least the skip should be big
endian specific, or better the root cause should be fixed.

From my current investigations, the resulting png image from the
PngWriter.Color16Pattern shows two problems:

 1. it can't be opened by image viewers, but it is indeed
    recognized as a PNG by file(1) and examining it with an
    hexadecimal editor doesn't raise any obvious issues (apart
    that they are different);

 2. analyzing the images pixel per pixel using sng(1) highlights
    the image itself is byte swapped compared to the image
    produced on little endian system; this is very visible when
    using side by side comparison on the sng files:

	$ diff --side-by-side --width=80 Color16Pattern_amd64.sng Color16Pattern_s390x.sng | head -n20
	#SNG: from Color16Pattern_amd64.png   |	#SNG: from Color16Pattern_s390x.png
	IHDR {					IHDR {
	    width: 17; height: 61; bitdepth: 	    width: 17; height: 61; bitdepth: 
	    using color alpha;			    using color alpha;
	}					}
	IMAGE {					IMAGE {
	    pixels hex				    pixels hex
	00ff000000000000 00ff000000000000 00f <
	ff00000000000000 ff00000000000000 ff0	ff00000000000000 ff00000000000000 ff0
	000000ff00000000 000000ff00000000 000 |	00ff000000000000 00ff000000000000 00f
	0000ff0000000000 0000ff0000000000 000	0000ff0000000000 0000ff0000000000 000
	0000000000ff0000 0000000000ff0000 000 |	000000ff00000000 000000ff00000000 000
	00000000ff000000 00000000ff000000 000	00000000ff000000 00000000ff000000 000
	00000000000000ff 00000000000000ff 000 |	0000000000ff0000 0000000000ff0000 000
	000000000000ff00 000000000000ff00 000	000000000000ff00 000000000000ff00 000
	00ff000000000000 00ff000000000000 00f |	00000000000000ff 00000000000000ff 000
	ff00000000000000 ff00000000000000 ff0	ff00000000000000 ff00000000000000 ff0
	000000ff00000000 000000ff00000000 000 |	00ff000000000000 00ff000000000000 00f
	0000ff0000000000 0000ff0000000000 000	0000ff0000000000 0000ff0000000000 000
	0000000000ff0000 0000000000ff0000 000 |	000000ff00000000 000000ff00000000 000

(Thanks diffoscope(1) for introducing me to the use of sng by
the way!)

With some luck, the mitigation may be as simple as applying a
swab(3) on the pixel array produced by the test, but that still
wouldn't explain why the image was completely unreadable by
image readers (it may or may not work, I still have to check).
It is also possible my approach is wrong and the problem
genuinly lies in the png converter in Orthanc.

The bug should at least remain open until the test item is back
for little endian architectures.

-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.3.0-2-amd64 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- 
  .''`.  Étienne Mollier <emollier at debian.org>
 : :' :  gpg: 8f91 b227 c7d6 f2b1 948c  8236 793c f67e 8f0d 11da
 `. `'   sent from /dev/pts/8, please excuse my verbosity
   `-    on air: Erik Norlander - Surreal (Feat. Lana Lane)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-med-packaging/attachments/20230723/a4ab63e0/attachment.sig>


More information about the Debian-med-packaging mailing list