coreutils
coreutils copied to clipboard
cp: integer conversion panic on ppc64le
trafficstars
I'm packaging Nushell 0.105 for Alpine right now, and ppc64le is one of the supported architectures. Nushell's cp, which uses uu_cp underneath, failed the tests because of a panic:
---- commands::ucp::copies_files_with_glob_metachars::case_1 stdout ----
=== stderr
Error: × Main thread panicked.
├─▶ at /home/buildozer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/
│ uu_cp-0.1.0/src/platform/linux.rs:69:54
╰─▶ called `Result::unwrap()` on an `Err` value: TryFromIntError(())
help: set the `RUST_BACKTRACE=1` environment variable to display a
backtrace.
thread 'commands::ucp::copies_files_with_glob_metachars::case_1' panicked at crates/nu-command/tests/commands/ucp.rs:1014:9:
assertion failed: actual.err.is_empty()
Full log: https://gitlab.alpinelinux.org/kaathewise/aports/-/jobs/1891916
This is the code which fails:
https://github.com/uutils/coreutils/blob/18b963ed6f612ac30ebca92426280cf4c1451f6a/src/uu/cp/src/platform/linux.rs#L64-L72