mirror of
https://codeberg.org/guix/guix.git
synced 2026-09-06 13:51:41 +00:00
* gnu/packages/python-xyz.scm (python-angr): Update to 9.2.186. [source] <patches>: Add patch to fix manyfloat test failure. [arguments] <imported-modules, modules>: Add cargo modules. <phases>: Add prepare-cargo-build-system, fix-tests, use-guix-vendored-dependencies, check-setup, generate-protobuf-files; Remove 'patch-tests. [propagated-inputs]: Remove python-ailment, python-colorama, python-cppheaderparser, python-dpkt, python-nampa, python-itanium-demangler, python-rpyc, python-sqlalchemy; add python-msgspec, python-pypcode, python-typing-extensions. [native-inputs]: Remove python-wheel and "binaries" which is moved to a hidden package; add angr-binaries and python-setuptools-rust; remove package labels. * gnu/packages/rust-sources.scm (rust-icicle-emu-0.1.0.4d7ed93): New variable. * gnu/packages/rust-crates.scm (lookup-cargo-inputs): Add python-angr inputs. (lookup-cargo-inputs): Add rust-icicle-emu-0.1.0.4d7ed93 inputs. * gnu/packages/patches/python-angr-check-exec-deps.patch: Rebase patch. * gnu/packages/patches/python-angr-fix-manyfloat-tests.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register new patch. Change-Id: I88180e4be3d5b65fc4047a0d6eeecc864bba8b55 Co-authored-by: Sharlatan Hellseher <sharlatanus@gmail.com>
30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
See https://github.com/angr/angr/commit/d4a3f058e06a78361b60e08544ea4ae8f735e0cf
|
|
|
|
diff --git a/tests/factory/test_callable.py b/tests/factory/test_callable.py
|
|
index 22602c15e..f6e5e49df 100755
|
|
--- a/tests/factory/test_callable.py
|
|
+++ b/tests/factory/test_callable.py
|
|
@@ -3,6 +3,8 @@ from __future__ import annotations
|
|
|
|
__package__ = __package__ or "tests.factory" # pylint:disable=redefined-builtin
|
|
|
|
+import functools
|
|
+import operator
|
|
import os
|
|
import unittest
|
|
|
|
@@ -135,7 +137,12 @@ class TestCallable(unittest.TestCase):
|
|
# not almost equal!! totally equal!!! z3 is magic, if kinda slow!!!!!
|
|
for arg_conc in args_conc:
|
|
assert arg_conc > 1.0
|
|
- assert sum(args_conc) == 27.7
|
|
+ # Sum sequentially like the program does. Since Python 3.12, builtin
|
|
+ # sum() uses Neumaier compensated summation for floats, which is MORE
|
|
+ # accurate than the program's naive left-to-right addition and so can
|
|
+ # disagree with the (exactly satisfied) symbolic result by an ulp.
|
|
+ seq_sum = functools.reduce(operator.add, args_conc)
|
|
+ assert seq_sum == 27.7
|
|
|
|
def test_fauxware_armel(self):
|
|
self.run_fauxware("armel")
|