-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test failures pre 3.8.0 #10474
Comments
Testing for equality in 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 Or alternatively, use |
%ld expects a 4-byte parameter on 32-bit architectures and an 8-byte parameter on 64-bit architectures, but we supplied are trying to supply a 64-bit parameter that would overflow 32-bit storage. Use %lld instead which expects a `long long` parameter, which should be 8-bytes under both architectures. See #10474
As documented in #10474, there are issues with 64-bit floating point rounding under x86 targets without SSE2 extensions, where x87 floating point math causes imprecise results. Document the shortcoming and provide some version of the test that passes regardless of architecture.
I pushed some updates that got tests working for me targeting The history_formats test failure is because we are including a source code test that relies on the cmake |
|
We will continue to use the "normal" fish base directory detection when using the CMake test harness which properly sets up a sandboxed $HOME for fish to use, but when running source code tests with a bare `cargo test` we don't want to write to the actual user's profile. This also works around test failures when running `cargo test` under CI with a locked-down $HOME directory (see #10474).
@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 |
@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 |
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. |
The tests are failing on the package builders in a few places.
I'm filing an issue for posterity and also to make sure they actually get fixed.
@KamilaBorowska spotted this one as the argument to sprintf being long, which is 32 bits on a 32-bit platform rather than defined as 64-bit.
@mqudsi notes this is the wrong comparison to be doing as floating point values should be compared by epsilon
I don't know why these two aren't picked up by the 32-bit CI build.
HOME is set to something unwritable in the Debian package builds. This wasn't a problem pre-cargo test, because
tests/test_env.sh
was run beforehand. The cargo tests should be equally hermetic. It probably means reimplementingtest_env.sh
in Rust, because sourcing it before runningcargo test
stuffs up any rustup-installed toolchains.The text was updated successfully, but these errors were encountered: