This post is part 3 of the "From the diary of AArch64 porter" series:
- From the diary of AArch64 porter — autoconf
- From the diary of AArch64 porter — rpm packaging
- From the diary of AArch64 porter — testsuites
- From the diary of AArch64 porter — POSIX.1 functionality
- From the diary of AArch64 porter — PAGE_SIZE
- From the diary of AArch64 porter — vfp precision
- From the diary of AArch64 porter — system calls
- From the diary of AArch64 porter — parallel builds
- From the diary of AArch64 porter — firefighting
- From the diary of AArch64 porter — drive-by coding
- From the diary of AArch64 porter — manylinux2014
- From the diary of AArch64 porter — handling big patches
- From the diary of AArch64 porter — Arm CPU features table
More and more software come with testsuites. But not every distribution runs them for each package (nevermind is it Debian, Fedora or Ubuntu). Why it matters? Let me give example from yesterday: HDF 4.2.10.
There is a bug reported against libhdf with information that it built fine for Ubuntu. As I had issues with hdf in Fedora I decided to look and found even simpler patch than one I wrote. Tried it and got package built. But that’s all…
Running testsuite is easy: “make check”. But result was awesome:
!!! 31294 Error(s) were detected !!!
It does not look good, right? So yesterday I spent some time on searching for architecture related check and found main reason for so big amount of errors — unknown systems are treated as big endian… Simple switch there and from 31294 it dropped to just 278 ones.
Took me a while to find all 27 places where miscellaneous variations of “#if defined(aarch64)” were needed and finally got to point where “make check” simply worked as it should.
So if you port software do not assume it is fine once it builds. Run testsuite to be sure that it runs properly.