Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions util/fetch-gnu.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
#!/bin/bash -e
ver="9.11"
ver="9.12"
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=(
cat/splice.sh # split tests
dd/fail-ftruncate-fstat.sh # remove LD_PRELOAD
dd/stderr.sh # replace GNU/test binary by uutils/test
misc/close-stdout.sh # fix hardcoded pathes to GNU executables
misc/uname-labeled.sh # uname -A/--all-labeled, added after $ver
nproc/nproc-quota.sh # remove LD_PRELOAD
misc/empty-backup-suffix.sh
# https://github.com/coreutils/coreutils/issues/355
env/env.sh
env/printenv.sh
)
for f in "${backport[@]}"
do curl -L ${repo}/raw/refs/heads/master/tests/$f > tests/$f
Expand Down
6 changes: 3 additions & 3 deletions util/gnu-patches/error_msg_uniq.diff
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ Index: gnu/tests/uniq/uniq.pl
+ {ERR=>"error: invalid value 'badoption' for '--group[=<group-method>]'\n\n" .
+ " [possible values: separate, prepend, append, both]\n\n" .
+ "For more information, try '--help'.\n"}],
);

# Locale related tests
# Test for read buffer overrun.
do { my $longline = "\360\237\230\200" . "A" x 255 . "\n";
['146', '-w256', {IN => $longline x 2}, {OUT => $longline}] },
6 changes: 3 additions & 3 deletions util/gnu-patches/tests_comm.pl.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Index: gnu/tests/misc/comm.pl
Index: gnu/tests/comm/comm.pl
===================================================================
--- gnu.orig/tests/misc/comm.pl
+++ gnu/tests/misc/comm.pl
--- gnu.orig/tests/comm/comm.pl
+++ gnu/tests/comm/comm.pl
@@ -73,18 +73,24 @@ my @Tests =

# invalid missing command line argument (1)
Expand Down
2 changes: 1 addition & 1 deletion util/gnu-patches/tests_env_env-S.pl.patch
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Index: gnu/tests/env/env-S.pl
+ "For more information, try '--help'.\n" .
+ "$prog: use -[v]S to pass options in shebang lines\n"}],
['err_sp3', q['-v -S cat -n'], {EXIT=>125}, # embedded tab after -v
- {ERR=>"env: invalid option -- '\t'\n" .
- {ERR=>"env: invalid option -- '\\t'\n" .
- "env: use -[v]S to pass options in shebang lines\n" .
- "Try 'env --help' for more information.\n"}],
+ {ERR=>"error: unexpected argument '-\t' found\n\n" .
Expand Down
8 changes: 4 additions & 4 deletions util/gnu-patches/tests_ls_no_cap.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ index 99f0563bc..f7b9e7885 100755
skip_ "setcap doesn't work"

LS_COLORS=ca=1; export LS_COLORS
-strace -e capget ls --color=always > /dev/null 2> out || fail=1
-strace -e trace=capget ls --color=always > /dev/null 2> out || fail=1
-$EGREP 'capget\(' out || skip_ "your ls doesn't call capget"
+strace -e listxattr ls --color=always > /dev/null 2> out || fail=1
+strace -e trace=listxattr ls --color=always > /dev/null 2> out || fail=1
+$EGREP 'listxattr\(' out || skip_ "your ls doesn't call listxattr"

LS_COLORS=ca=:; export LS_COLORS
-strace -e capget ls --color=always > /dev/null 2> out || fail=1
-strace -e trace=capget ls --color=always > /dev/null 2> out || fail=1
-$EGREP 'capget\(' out && fail=1
+strace -e listxattr ls --color=always > /dev/null 2> out || fail=1
+strace -e trace=listxattr ls --color=always > /dev/null 2> out || fail=1
+$EGREP 'listxattr\(' out && fail=1

Exit $fail
6 changes: 3 additions & 3 deletions util/gnu-patches/tests_pwd-long.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ Index: gnu/tests/pwd/pwd-long.sh
+++ gnu/tests/pwd/pwd-long.sh
@@ -19,7 +19,6 @@

. "${srcdir=.}/tests/init.sh";
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ pwd
-uses_strace_

require_readable_root_
require_perl_
@@ -27,11 +26,10 @@
@@ -27,11 +26,10 @@ require_perl_
ARGV_0=$0
export ARGV_0

-# Disable the getcwd syscall if possible, so more of our code is exercised.
-no_sys_getcwd() {
- strace -f -o /dev/null -e 'getcwd' -e fault=all:error=ENOSYS "$@"
- strace -f -o /dev/null -e trace=getcwd -e fault=all:error=ENOSYS "$@"
-}
-no_sys_getcwd true || no_sys_getcwd() { "$@"; }
+# uutils: our pwd has no userspace getcwd reimplementation like GNU's; it
Expand Down
5 changes: 4 additions & 1 deletion util/run-gnu-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ echo "path_UUTILS='${path_UUTILS}'"
echo "path_GNU='${path_GNU}'"

# Use GNU nproc for *BSD
NPROC=$(command -v ${path_GNU}/src/nproc||command -v nproc)
NPROC_BIN=$(command -v "${path_GNU}"/src/nproc||command -v nproc)
# `-j` wants a job count: handing it the path to nproc made make read it as a
# (bogus) goal and run with unlimited parallelism, which starves the CI runner.
NPROC=$("${NPROC_BIN}" 2>/dev/null) || NPROC=1
MAKEFLAGS="${MAKEFLAGS} -j ${NPROC}"
export MAKEFLAGS
###
Expand Down
Loading