testprofile on i686

Linus Torvalds torvalds at linux-foundation.org
Sun Nov 28 08:50:04 PST 2021


On Sun, Nov 28, 2021 at 8:29 AM Alan Brown via subsurface
<subsurface at subsurface-divelog.org> wrote:
>
> I am trying to package version 5.0.5 for void linux. The build seems to
> pass all of the tests for x86_64, aarch64, armv7l, armv6l but fails on
> i686 on the testprofile. Does anyone know why this might be happening
> specifically for this architecture?

At a guess, it's some floating point rounding issue or similar, and a
failure of the test itself rather than the binary.

subsurface actually avoids using floating point for most things (most
data being kept as integers in well-defined formats - like "depth in
mm" etc).

But things like the deco algorithms do use floating point, so I could
see that causing issues for things like calculated profiles etc.

The other failure mode we've seen is just silly locale differences -
we've had bugs like printing out floating point numbers using ',' vs
'.' etc.

Anyway, regardless of what the cause of the failure is, what you can
do is something like this:

Rerun just that test:

    cd build/tests
    ./TestProfile

and you should now have the two output files in that directory:
exportprofile.csv and exportprofileVPMB.csv.

The tests then compare that to the expected end results that are in
the 'dives' directory in the source tree, so this *should* give an
empty diff

   diff -u ../../dives/exportprofilereferenceVPMB.csv exportprofileVPMB.csv

but clearly that part fails.

And what would be interesting to see is the difference between the
reference file and the generated file.

Don't send the whole diff to the mailing list in case it's "every line
differs in one character" kind of thing. But if you can pinpoint more
precisely what the difference is, we can figure it out, I'm sure.

I don't have a 32-bit environment any more (and it might not be about
x86-64 vs i386: as mentioned it could be something like an unusual
locale thing too, and might be specific to void for some odd reason).

              Linus


More information about the subsurface mailing list