Giter VIP home page Giter VIP logo

Comments (6)

KamilaBorowska avatar KamilaBorowska commented on June 2, 2024 1

Testing for equality in wcstod tests is actually correct, this is pointing a genuine problem. However, this is specifically caused by x87 floating point being pretty broken: rust-lang/rust#114479.

This problem affects Rust's standard library too. Rust's standard library has a pretty cursed workaround for this issue: https://github.com/rust-lang/rust/blob/master/library/core/src/num/dec2flt/fpu.rs.

Personally I would skip those tests for non-SSE2 x86 all(target_arch = "x86", not(target_feature = "sse2")).

Or alternatively, use str::parse rather than fast_float for those targets instead (as standard library has a workaround for this bug). That said, I don't think it's worth it, x87 is not IEEE compliant, so the results are going to be subtly wrong when doing mathematical operations anyway.

from fish-shell.

zanchey avatar zanchey commented on June 2, 2024 1

This is all working ok now, and I fixed the issues with Ubuntu's lto-wrapper (which breaks for some reason when linking the cargo tests) with f4a79cc.

from fish-shell.

mqudsi avatar mqudsi commented on June 2, 2024

I pushed some updates that got tests working for me targeting i586-unknown-linux-gnu under Debian 12 i686. Using str::parse() instead of fast_float is not a one-liner given how we use the latter, so I'm just using a combination of my suggested test and your sse2 note.

The history_formats test failure is because we are including a source code test that relies on the cmake build/tests target being present. I'll fix that separately.

from fish-shell.

mqudsi avatar mqudsi commented on June 2, 2024

test_history_formats fixed in 476b360; everything should be passing now (EDIT: but that's locally, not under CI where the permissions issue exists separately!)

from fish-shell.

mqudsi avatar mqudsi commented on June 2, 2024

@zanchey after a35925b, tests appear to pass with the following under Debian 12 i686, which I assume does the trick for you?

set fish_home (mktemp -d)
sudo chown root:root $fish_home
env HOME=$fish_home cargo test --target i586-unknown-linux-gnu

(I don't actually run the last command as-is because cargo test actually calls rustup which uses $HOME for its own purposes; I actually run a bare cargo test --target i586-unknown-linux-gnu once which builds the test binary as target/debug/i586-unknown-linux-gnu/fish-<hexadecimal-string> then I run that binary with env HOME=$fish_home.)

from fish-shell.

mqudsi avatar mqudsi commented on June 2, 2024

@KamilaBorowska do you have any idea why the other 32-bit vs 64-bit errors didn't manifest under i686 but show up under i586? For example, I would expect the snprintf issue with %ld passed an i64 to show up regardless of which particular 32-bit flavor we're targeting.

from fish-shell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.