Re: [Libguestfs] Reported issues in nbdkit_parse_probability (was: Fwd: AUR Comment for nbdkit)

2023-10-14 Thread Richard W.M. Jones
On Sat, Oct 14, 2023 at 01:49:34PM +0100, Richard W.M. Jones wrote:
> https://aur.archlinux.org/packages/nbdkit#comment-938282

> FAIL: test-public
> =
> 
> Wrong return value for inf, got 0, expected -1
> Wrong result for inf, got inf, expected 0
> Wrong return value for nan, got 0, expected -1
> Wrong return value for nan/inf, got 0, expected -1
> Wrong return value for inf/inf, got 0, expected -1
> Wrong return value for nan/nan, got 0, expected -1
> Wrong return value for -0, got 0, expected -1
> Wrong return value for 1e200/1e-200, got 0, expected -1
> Wrong result for 1e200/1e-200, got inf, expected 0
> FAIL test-public (exit status: 1)

This turned out to be caused by using -Ofast or -ffast-math, and more
specifically the -ffinite-math-only option.  This option allows the
compiler to assume that all floating point operations have finite,
non-NaN parameters, thus functions like isfinite(3) in the standard
library are simply expected not to work.

As I said on the bug report the workaround is to use
-fno-finite-math-only, but better would be not to use the options
-Ofast/-ffast-math in the first place.

I don't think this is something we need to fix upstream, since by
using those options you're breaking the compiler, so in my view as the
user you get to keep the pieces.

Also there's not a reliable way to even detect this.  Using
-ffast-math defines "__FAST_MATH__", but apparently nothing is defined
for the specific option -ffinite-math-only.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



[Libguestfs] Reported issues in nbdkit_parse_probability (was: Fwd: AUR Comment for nbdkit)

2023-10-14 Thread Richard W.M. Jones
https://aur.archlinux.org/packages/nbdkit#comment-938282

- Forwarded message from not...@aur.archlinux.org -

Date: Sat, 14 Oct 2023 12:40:02 +
Subject: AUR Comment for nbdkit

dreieck [1] added the following comment to nbdkit [2]:

`check()` fails for me, too:

```
[...]
make  check-TESTS
make[3]: Entering directory
'/tmp/makepkg/build/nbdkit/src/nbdkit-1.36.0/server'
make[4]: Entering directory
'/tmp/makepkg/build/nbdkit/src/nbdkit-1.36.0/server'
FAIL: test-public

Testsuite summary for nbdkit 1.36.0

# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

See server/test-suite.log

```

`server/test-suite.log`:
```
==
   nbdkit 1.36.0: server/test-suite.log
==

# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: test-public
=

Wrong return value for inf, got 0, expected -1
Wrong result for inf, got inf, expected 0
Wrong return value for nan, got 0, expected -1
Wrong return value for nan/inf, got 0, expected -1
Wrong return value for inf/inf, got 0, expected -1
Wrong return value for nan/nan, got 0, expected -1
Wrong return value for -0, got 0, expected -1
Wrong return value for 1e200/1e-200, got 0, expected -1
Wrong result for 1e200/1e-200, got inf, expected 0
FAIL test-public (exit status: 1)
```

Regards!

--
If you no longer wish to receive notifications about this package,
please go to the package page [2] and select "Disable notifications".

[1] https://aur.archlinux.org/account/dreieck/
[2] https://aur.archlinux.org/pkgbase/nbdkit/

- End forwarded message -

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs