Skip to content

Commit 572f3a2

Browse files
authored
yes, coreutils: backport(enable) 2 GnuTests (#11480)
1 parent e0f0318 commit 572f3a2

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

.github/workflows/GnuTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: GnuTests
22

33
# spell-checker:ignore (abbrev/names) CodeCov gnulib GnuTests Swatinem
44
# spell-checker:ignore (jargon) submodules devel
5-
# spell-checker:ignore (libs/utils) chksum dpkg getenforce getlimits gperf lcov libexpect limactl pyinotify setenforce shopt valgrind libattr libcap taiki-e zstd cpio
5+
# spell-checker:ignore (libs/utils) chksum dpkg getenforce gperf lcov libexpect limactl pyinotify setenforce shopt valgrind libattr libcap taiki-e zstd cpio
66
# spell-checker:ignore (options) Ccodegen Coverflow Cpanic Zpanic
77
# spell-checker:ignore (people) Dawid Dziurla * dawidd dtolnay
88
# spell-checker:ignore (vars) FILESET SUBDIRS XPASS

.vscode/cspell.dictionaries/workspace.wordlist.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ EEXIST
138138
EINVAL
139139
ENODATA
140140
ENOENT
141+
ENOSPC
141142
ENOSYS
142143
ENOTEMPTY
143144
EOPNOTSUPP
@@ -363,6 +364,7 @@ uutils
363364
getcwd
364365

365366
# * other
367+
getlimits
366368
weblate
367369
algs
368370
wasm

src/uu/yes/src/yes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use clap::{Arg, ArgAction, Command, builder::ValueParser};
99
use std::error::Error;
1010
use std::ffi::OsString;
1111
use std::io::{self, Write};
12-
use uucore::error::{UResult, USimpleError};
12+
use uucore::error::{UResult, USimpleError, strip_errno};
1313
use uucore::format_usage;
1414
use uucore::translate;
1515

@@ -33,7 +33,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
3333
Err(err) if err.kind() == io::ErrorKind::BrokenPipe => Ok(()),
3434
Err(err) => Err(USimpleError::new(
3535
1,
36-
translate!("yes-error-standard-output", "error" => err),
36+
translate!("yes-error-standard-output", "error" => strip_errno(&err)),
3737
)),
3838
}
3939
}

util/build-gnu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# `build-gnu.bash` ~ builds GNU coreutils (from supplied sources)
33
#
44

5-
# spell-checker:ignore (paths) abmon deref discrim eacces getlimits getopt ginstall inacc infloop inotify reflink ; (misc) INT_OFLOW OFLOW
5+
# spell-checker:ignore (paths) abmon deref discrim eacces getopt ginstall inacc infloop inotify reflink ; (misc) INT_OFLOW OFLOW
66
# spell-checker:ignore baddecode submodules xstrtol distros ; (vars/env) SRCDIR vdir rcexp xpart dired OSTYPE ; (utils) greadlink gsed multihardlink texinfo CARGOFLAGS
77
# spell-checker:ignore openat TOCTOU CFLAGS tmpfs gnproc
88

util/fetch-gnu.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ repo=https://github.com/coreutils/coreutils
44
curl -L "${repo}/releases/download/v${ver}/coreutils-${ver}.tar.xz" | tar --strip-components=1 -xJf -
55

66
# TODO stop backporting tests from master at GNU coreutils > $ver
7-
# backport = ()
8-
# for f in ${backport[@]}
9-
# do curl -L ${repo}/raw/refs/heads/master/tests/$f > tests/$f
10-
# done
7+
backport=(
8+
misc/coreutils.sh # enable test
9+
misc/yes.sh # zero-copy
10+
)
11+
for f in "${backport[@]}"
12+
do curl -L ${repo}/raw/refs/heads/master/tests/$f > tests/$f
13+
done
14+
# adjust for getlimits > $ver
15+
sed -i.b "s/\$ENOSPC/No space left on device/" tests/misc/yes.sh

0 commit comments

Comments
 (0)