From b4feef995a0b46bf6a0d45feeede955c88e3bb8d Mon Sep 17 00:00:00 2001 From: oech3 <79379754+oech3@users.noreply.github.com> Date: Wed, 25 Mar 2026 11:12:23 +0900 Subject: [PATCH 1/2] yes, coreutils: backport(enable) some GnuTests --- util/fetch-gnu.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/util/fetch-gnu.sh b/util/fetch-gnu.sh index afd9ebfa88a..6efc67a96e3 100755 --- a/util/fetch-gnu.sh +++ b/util/fetch-gnu.sh @@ -4,7 +4,10 @@ repo=https://github.com/coreutils/coreutils curl -L "${repo}/releases/download/v${ver}/coreutils-${ver}.tar.xz" | tar --strip-components=1 -xJf - # TODO stop backporting tests from master at GNU coreutils > $ver -# backport = () -# for f in ${backport[@]} -# do curl -L ${repo}/raw/refs/heads/master/tests/$f > tests/$f -# done + backport=( + misc/coreutils.sh # enable test + misc/yes.sh # zero-copy +) + for f in "${backport[@]}" + do curl -L ${repo}/raw/refs/heads/master/tests/$f > tests/$f + done From 34c82fa0e196001ce1c5f89c434401dc8c34a195 Mon Sep 17 00:00:00 2001 From: oech3 <79379754+oech3@users.noreply.github.com> Date: Wed, 25 Mar 2026 11:40:24 +0900 Subject: [PATCH 2/2] yes: strip errno --- .github/workflows/GnuTests.yml | 2 +- .vscode/cspell.dictionaries/workspace.wordlist.txt | 2 ++ src/uu/yes/src/yes.rs | 4 ++-- util/build-gnu.sh | 2 +- util/fetch-gnu.sh | 2 ++ 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/GnuTests.yml b/.github/workflows/GnuTests.yml index 2ad489c8f18..e350c31bcf3 100644 --- a/.github/workflows/GnuTests.yml +++ b/.github/workflows/GnuTests.yml @@ -2,7 +2,7 @@ name: GnuTests # spell-checker:ignore (abbrev/names) CodeCov gnulib GnuTests Swatinem # spell-checker:ignore (jargon) submodules devel -# spell-checker:ignore (libs/utils) chksum dpkg getenforce getlimits gperf lcov libexpect limactl pyinotify setenforce shopt valgrind libattr libcap taiki-e zstd cpio +# spell-checker:ignore (libs/utils) chksum dpkg getenforce gperf lcov libexpect limactl pyinotify setenforce shopt valgrind libattr libcap taiki-e zstd cpio # spell-checker:ignore (options) Ccodegen Coverflow Cpanic Zpanic # spell-checker:ignore (people) Dawid Dziurla * dawidd dtolnay # spell-checker:ignore (vars) FILESET SUBDIRS XPASS diff --git a/.vscode/cspell.dictionaries/workspace.wordlist.txt b/.vscode/cspell.dictionaries/workspace.wordlist.txt index 1d3929832a2..a5d245016c7 100644 --- a/.vscode/cspell.dictionaries/workspace.wordlist.txt +++ b/.vscode/cspell.dictionaries/workspace.wordlist.txt @@ -138,6 +138,7 @@ EEXIST EINVAL ENODATA ENOENT +ENOSPC ENOSYS ENOTEMPTY EOPNOTSUPP @@ -363,6 +364,7 @@ uutils getcwd # * other +getlimits weblate algs wasm diff --git a/src/uu/yes/src/yes.rs b/src/uu/yes/src/yes.rs index 88d2c7ed113..732a1bf5877 100644 --- a/src/uu/yes/src/yes.rs +++ b/src/uu/yes/src/yes.rs @@ -9,7 +9,7 @@ use clap::{Arg, ArgAction, Command, builder::ValueParser}; use std::error::Error; use std::ffi::OsString; use std::io::{self, Write}; -use uucore::error::{UResult, USimpleError}; +use uucore::error::{UResult, USimpleError, strip_errno}; use uucore::format_usage; use uucore::translate; @@ -33,7 +33,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> { Err(err) if err.kind() == io::ErrorKind::BrokenPipe => Ok(()), Err(err) => Err(USimpleError::new( 1, - translate!("yes-error-standard-output", "error" => err), + translate!("yes-error-standard-output", "error" => strip_errno(&err)), )), } } diff --git a/util/build-gnu.sh b/util/build-gnu.sh index 4a731f8aa29..3f6ec60d817 100755 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -2,7 +2,7 @@ # `build-gnu.bash` ~ builds GNU coreutils (from supplied sources) # -# spell-checker:ignore (paths) abmon deref discrim eacces getlimits getopt ginstall inacc infloop inotify reflink ; (misc) INT_OFLOW OFLOW +# spell-checker:ignore (paths) abmon deref discrim eacces getopt ginstall inacc infloop inotify reflink ; (misc) INT_OFLOW OFLOW # spell-checker:ignore baddecode submodules xstrtol distros ; (vars/env) SRCDIR vdir rcexp xpart dired OSTYPE ; (utils) greadlink gsed multihardlink texinfo CARGOFLAGS # spell-checker:ignore openat TOCTOU CFLAGS tmpfs gnproc diff --git a/util/fetch-gnu.sh b/util/fetch-gnu.sh index 6efc67a96e3..ae6de16e7fc 100755 --- a/util/fetch-gnu.sh +++ b/util/fetch-gnu.sh @@ -11,3 +11,5 @@ curl -L "${repo}/releases/download/v${ver}/coreutils-${ver}.tar.xz" | tar --stri for f in "${backport[@]}" do curl -L ${repo}/raw/refs/heads/master/tests/$f > tests/$f done +# adjust for getlimits > $ver +sed -i.b "s/\$ENOSPC/No space left on device/" tests/misc/yes.sh