-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
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()
This is the code which fails:
coreutils/src/uu/cp/src/platform/linux.rs
Lines 64 to 72 in 18b963e
| // Using .try_into().unwrap() is required as glibc, musl & android all have different type for ioctl() | |
| #[allow(clippy::unnecessary_fallible_conversions)] | |
| let result = unsafe { | |
| libc::ioctl( | |
| dst_fd, | |
| linux_raw_sys::ioctl::FICLONE.try_into().unwrap(), | |
| src_fd, | |
| ) | |
| }; |