From eb8cdcf44aa4bc452493465e09b4de2dbd994ba0 Mon Sep 17 00:00:00 2001 From: James Robson Date: Sat, 20 Feb 2021 15:07:47 +0000 Subject: [PATCH 01/33] Re-add fixed test --- .github/workflows/GNU.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index b1cbc1502..c599a454c 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -55,7 +55,6 @@ jobs: grep -rl 'path_prepend_' tests/* | xargs sed -i 's|path_prepend_ ./src||' sed -i -e 's|^seq |/usr/bin/seq |' tests/factor/t*sh sed -i -e '/tests\/misc\/cat-self.sh/ D' Makefile # issue #1707 - sed -i -e '/tests\/misc\/numfmt.pl/ D' Makefile # issue #1708 sed -i -e '/tests\/chown\/preserve-root.sh/ D' Makefile # issue #1709 sed -i -e '/tests\/cp\/file-perm-race.sh/ D' Makefile # issue #1710 sed -i -e '/tests\/cp\/special-f.sh/ D' Makefile # issue #1710 From a73c34c7355a198e48c86fa1308ed9a2fad87f65 Mon Sep 17 00:00:00 2001 From: James Robson Date: Sat, 20 Feb 2021 17:17:03 +0000 Subject: [PATCH 02/33] Stop tests failing on utils that aren't the focu of the test --- .github/workflows/GNU.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index c599a454c..6ec44cf22 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -74,6 +74,16 @@ jobs: sed -i -e '/tests\/tail-2\/pid.sh/ D' Makefile # hangs on github, tail doesn't support -f sed -i -e'/incompat4/ D' -e"/options '-co' are incompatible/ d" tests/misc/sort.pl # Sort doesn't correctly check for incompatible options, waits for input + # Use the system coreutils where the test fails due to error in a util that is not the one being tested + sed -i -e 's|stat|/usr/bin/stat|' tests/chgrp/basic.sh tests/cp/existing-perm-dir.sh tests/chgrp/basic.sh tests/touch/60-seconds.sh tests/misc/sort-compress-proc.sh tests/touch/60-seconds.sh + sed -i -e 's|ls -|/usr/bin/ls -|' tests/chgrp/posix-H.sh tests/chown/deref.sh tests/cp/same-file.sh tests/misc/mknod.sh tests/mv/part-symlink.sh + sed -i -e 's|mkdir |/usr/bin/mkdir |' tests/cp/existing-perm-dir.sh tests/rm/empty-inacc.sh + sed -i -e 's|timeout |/usr/bin/timeout |' tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh misc/sort-NaN-infloop.log tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/inotify-rotate.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh + sed -i -e 's|chmod |/usr/bin/chmod |' tests/du/inacc-dir.sh tests/mkdir/p-3.sh + sed -i -e 's|sort |/usr/bin/sort |' tests/ls/hyperlink.sh + sed -i -e 's|split |/usr/bin/split |' tests/misc/factor-parallel.sh + sed -i -e 's|truncate |/usr/bin/truncate |' tests/split/fail.sh + test -f "${BUILDDIR}/getlimits" || cp src/getlimits "${BUILDDIR}" - name: Run GNU tests shell: bash From b3dea739f4d4ff1433ccf05f769cfaa1371184f6 Mon Sep 17 00:00:00 2001 From: James Robson Date: Sun, 21 Feb 2021 09:36:03 +0000 Subject: [PATCH 03/33] Fix script name --- .github/workflows/GNU.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 6ec44cf22..f9390a3f0 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -78,7 +78,7 @@ jobs: sed -i -e 's|stat|/usr/bin/stat|' tests/chgrp/basic.sh tests/cp/existing-perm-dir.sh tests/chgrp/basic.sh tests/touch/60-seconds.sh tests/misc/sort-compress-proc.sh tests/touch/60-seconds.sh sed -i -e 's|ls -|/usr/bin/ls -|' tests/chgrp/posix-H.sh tests/chown/deref.sh tests/cp/same-file.sh tests/misc/mknod.sh tests/mv/part-symlink.sh sed -i -e 's|mkdir |/usr/bin/mkdir |' tests/cp/existing-perm-dir.sh tests/rm/empty-inacc.sh - sed -i -e 's|timeout |/usr/bin/timeout |' tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh misc/sort-NaN-infloop.log tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/inotify-rotate.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh + sed -i -e 's|timeout |/usr/bin/timeout |' tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh tests/misc/sort-NaN-infloop.log tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/inotify-rotate.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh sed -i -e 's|chmod |/usr/bin/chmod |' tests/du/inacc-dir.sh tests/mkdir/p-3.sh sed -i -e 's|sort |/usr/bin/sort |' tests/ls/hyperlink.sh sed -i -e 's|split |/usr/bin/split |' tests/misc/factor-parallel.sh From 910f6d102f529b10c75fb3fa5696da0b9c15cc21 Mon Sep 17 00:00:00 2001 From: James Robson Date: Sun, 21 Feb 2021 09:53:11 +0000 Subject: [PATCH 04/33] Fix script name --- .github/workflows/GNU.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index f9390a3f0..9e0d66eee 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -78,7 +78,7 @@ jobs: sed -i -e 's|stat|/usr/bin/stat|' tests/chgrp/basic.sh tests/cp/existing-perm-dir.sh tests/chgrp/basic.sh tests/touch/60-seconds.sh tests/misc/sort-compress-proc.sh tests/touch/60-seconds.sh sed -i -e 's|ls -|/usr/bin/ls -|' tests/chgrp/posix-H.sh tests/chown/deref.sh tests/cp/same-file.sh tests/misc/mknod.sh tests/mv/part-symlink.sh sed -i -e 's|mkdir |/usr/bin/mkdir |' tests/cp/existing-perm-dir.sh tests/rm/empty-inacc.sh - sed -i -e 's|timeout |/usr/bin/timeout |' tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh tests/misc/sort-NaN-infloop.log tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/inotify-rotate.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh + sed -i -e 's|timeout |/usr/bin/timeout |' tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh tests/misc/sort-NaN-infloop.sh tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/inotify-rotate.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh sed -i -e 's|chmod |/usr/bin/chmod |' tests/du/inacc-dir.sh tests/mkdir/p-3.sh sed -i -e 's|sort |/usr/bin/sort |' tests/ls/hyperlink.sh sed -i -e 's|split |/usr/bin/split |' tests/misc/factor-parallel.sh From f2013e47b3789fc22fd8bed0383154d5d1235c8d Mon Sep 17 00:00:00 2001 From: James Robson Date: Sun, 21 Feb 2021 11:14:14 +0000 Subject: [PATCH 05/33] Use which to find system utils --- .github/workflows/GNU.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 9e0d66eee..15bab8b3f 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -75,14 +75,14 @@ jobs: sed -i -e'/incompat4/ D' -e"/options '-co' are incompatible/ d" tests/misc/sort.pl # Sort doesn't correctly check for incompatible options, waits for input # Use the system coreutils where the test fails due to error in a util that is not the one being tested - sed -i -e 's|stat|/usr/bin/stat|' tests/chgrp/basic.sh tests/cp/existing-perm-dir.sh tests/chgrp/basic.sh tests/touch/60-seconds.sh tests/misc/sort-compress-proc.sh tests/touch/60-seconds.sh - sed -i -e 's|ls -|/usr/bin/ls -|' tests/chgrp/posix-H.sh tests/chown/deref.sh tests/cp/same-file.sh tests/misc/mknod.sh tests/mv/part-symlink.sh - sed -i -e 's|mkdir |/usr/bin/mkdir |' tests/cp/existing-perm-dir.sh tests/rm/empty-inacc.sh - sed -i -e 's|timeout |/usr/bin/timeout |' tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh tests/misc/sort-NaN-infloop.sh tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/inotify-rotate.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh - sed -i -e 's|chmod |/usr/bin/chmod |' tests/du/inacc-dir.sh tests/mkdir/p-3.sh - sed -i -e 's|sort |/usr/bin/sort |' tests/ls/hyperlink.sh - sed -i -e 's|split |/usr/bin/split |' tests/misc/factor-parallel.sh - sed -i -e 's|truncate |/usr/bin/truncate |' tests/split/fail.sh + sed -i -e "s|stat|$(which stat)|" tests/chgrp/basic.sh tests/cp/existing-perm-dir.sh tests/touch/60-seconds.sh tests/misc/sort-compress-proc.sh tests/touch/60-seconds.sh + sed -i -e "s|ls -|$(which ls) -|" tests/chgrp/posix-H.sh tests/chown/deref.sh tests/cp/same-file.sh tests/misc/mknod.sh tests/mv/part-symlink.sh + sed -i -e "s|mkdir |$(which mkdir) |" tests/cp/existing-perm-dir.sh tests/rm/empty-inacc.sh + sed -i -e "s|timeout |$(which timeout) |" tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh tests/misc/sort-NaN-infloop.sh tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/inotify-rotate.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh + sed -i -e "s|chmod |$(which chmod) |" tests/du/inacc-dir.sh tests/mkdir/p-3.sh + sed -i -e "s|sort |$(which sort) |" tests/ls/hyperlink.sh + sed -i -e "s|split |$(which split) |" tests/misc/factor-parallel.sh + sed -i -e "s|truncate |$(which truncate) |" tests/split/fail.sh test -f "${BUILDDIR}/getlimits" || cp src/getlimits "${BUILDDIR}" - name: Run GNU tests From cebb58c5b486853a7dedaba0e68a8b022f83dc64 Mon Sep 17 00:00:00 2001 From: James Robson Date: Sun, 21 Feb 2021 13:36:16 +0000 Subject: [PATCH 06/33] Rename install for testing --- .github/workflows/GNU.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 15bab8b3f..c92d90076 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -37,6 +37,7 @@ jobs: sudo apt-get install autoconf autopoint bison texinfo gperf gcc g++ gdb python-pyinotify expect python3-sphinx pushd uutils make PROFILE=release + cp target/release/install target/release/ginstall # The GNU tests rename this script before running, to avoid confusion with the make target BUILDDIR="$PWD/target/release/" popd GNULIB_SRCDIR="$PWD/gnulib" From 4e90de44cc0e8f28b8d86b9218985b71da472017 Mon Sep 17 00:00:00 2001 From: James Robson Date: Sun, 21 Feb 2021 15:51:03 +0000 Subject: [PATCH 07/33] Move timeout to per-test script Move to a timeout applied to each script and re add the tests that are hanging so they show as failing --- .github/workflows/GNU.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index c92d90076..82494bdd7 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -44,6 +44,8 @@ jobs: pushd gnu/ ./bootstrap --gnulib-srcdir="$GNULIB_SRCDIR" ./configure --quiet --disable-gcc-warnings + #Add timeout to tests to protest against hangs + sed -i -e 's|"\$@|timeout 600 "\$@|' build-aux/test-driver # Change the PATH in the Makefile to test the uutils coreutils instead of the GNU coreutils sed -i "s/^[[:blank:]]*PATH=.*/ PATH='${BUILDDIR//\//\\/}\$(PATH_SEPARATOR)'\"\$\$PATH\" \\\/" Makefile sed -i 's| tr | /usr/bin/tr |' tests/init.sh @@ -55,25 +57,13 @@ jobs: done grep -rl 'path_prepend_' tests/* | xargs sed -i 's|path_prepend_ ./src||' sed -i -e 's|^seq |/usr/bin/seq |' tests/factor/t*sh - sed -i -e '/tests\/misc\/cat-self.sh/ D' Makefile # issue #1707 - sed -i -e '/tests\/chown\/preserve-root.sh/ D' Makefile # issue #1709 - sed -i -e '/tests\/cp\/file-perm-race.sh/ D' Makefile # issue #1710 - sed -i -e '/tests\/cp\/special-f.sh/ D' Makefile # issue #1710 - sed -i -e '/tests\/mv\/mv-special-1.sh/ D' Makefile # issue #1710 - sed -i -e '/tests\/dd\/stats.sh/ D' Makefile # issue #1710 - sed -i -e '/tests\/cp\/existing-perm-race.sh/ D' Makefile # hangs, cp doesn't implement --copy-contents - # Remove tests that rely on seq with large numbers. See issue #1703 - sed -i -e '/tests\/misc\/seq.pl/ D' \ - -e '/tests\/misc\/seq-precision.sh/D' \ - Makefile + # Remove tests checking for --version & --help # Not really interesting for us and logs are too big sed -i -e '/tests\/misc\/invalid-opt.pl/ D' \ -e '/tests\/misc\/help-version.sh/ D' \ -e '/tests\/misc\/help-version-getopt.sh/ D' \ Makefile - sed -i -e '/tests\/tail-2\/pid.sh/ D' Makefile # hangs on github, tail doesn't support -f - sed -i -e'/incompat4/ D' -e"/options '-co' are incompatible/ d" tests/misc/sort.pl # Sort doesn't correctly check for incompatible options, waits for input # Use the system coreutils where the test fails due to error in a util that is not the one being tested sed -i -e "s|stat|$(which stat)|" tests/chgrp/basic.sh tests/cp/existing-perm-dir.sh tests/touch/60-seconds.sh tests/misc/sort-compress-proc.sh tests/touch/60-seconds.sh @@ -93,7 +83,7 @@ jobs: GNULIB_DIR="${PWD}/gnulib" pushd gnu - unbuffer timeout -sKILL 3600 make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no || : + unbuffer make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no || : - name: Extract tests info shell: bash run: | From 89f74948e0db872bd9b4722ec8dd822bef7e34db Mon Sep 17 00:00:00 2001 From: James Robson Date: Sun, 21 Feb 2021 15:52:18 +0000 Subject: [PATCH 08/33] Typo --- .github/workflows/GNU.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 82494bdd7..1541be1a4 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -44,7 +44,7 @@ jobs: pushd gnu/ ./bootstrap --gnulib-srcdir="$GNULIB_SRCDIR" ./configure --quiet --disable-gcc-warnings - #Add timeout to tests to protest against hangs + #Add timeout to to protect against hangs sed -i -e 's|"\$@|timeout 600 "\$@|' build-aux/test-driver # Change the PATH in the Makefile to test the uutils coreutils instead of the GNU coreutils sed -i "s/^[[:blank:]]*PATH=.*/ PATH='${BUILDDIR//\//\\/}\$(PATH_SEPARATOR)'\"\$\$PATH\" \\\/" Makefile From 16c8b3cbba351898335c0e6b21857b3fe57920b3 Mon Sep 17 00:00:00 2001 From: James Robson Date: Mon, 22 Feb 2021 09:19:43 +0000 Subject: [PATCH 09/33] Use system timeout command --- .github/workflows/GNU.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 1541be1a4..2ce9e44a5 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -45,7 +45,7 @@ jobs: ./bootstrap --gnulib-srcdir="$GNULIB_SRCDIR" ./configure --quiet --disable-gcc-warnings #Add timeout to to protect against hangs - sed -i -e 's|"\$@|timeout 600 "\$@|' build-aux/test-driver + sed -i -e "s|\"\$@|$(which timeout) 600 \"\$@|" build-aux/test-driver # Change the PATH in the Makefile to test the uutils coreutils instead of the GNU coreutils sed -i "s/^[[:blank:]]*PATH=.*/ PATH='${BUILDDIR//\//\\/}\$(PATH_SEPARATOR)'\"\$\$PATH\" \\\/" Makefile sed -i 's| tr | /usr/bin/tr |' tests/init.sh From b92b88a8229e1d80455d6a3a97fdf7ead2b25f1e Mon Sep 17 00:00:00 2001 From: James Robson Date: Mon, 22 Feb 2021 19:29:00 +0000 Subject: [PATCH 10/33] Add 4 hour global timeout for protection --- .github/workflows/GNU.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 2ce9e44a5..0af969220 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -6,6 +6,7 @@ jobs: gnu: name: Run GNU tests runs-on: ubuntu-latest + timeout-minutes: 240 # Kill after 4 hours in case something gets stuck steps: # Checks out a copy of your repository on the ubuntu-latest machine - name: Checkout code uutil From dc49415829ba8eddd0486bd2503b29df3cca65ff Mon Sep 17 00:00:00 2001 From: James Robson Date: Mon, 22 Feb 2021 19:29:45 +0000 Subject: [PATCH 11/33] Stop seq-precision.sh causing jams in make --- .github/workflows/GNU.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 0af969220..024112f8a 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -76,6 +76,9 @@ jobs: sed -i -e "s|split |$(which split) |" tests/misc/factor-parallel.sh sed -i -e "s|truncate |$(which truncate) |" tests/split/fail.sh + #Add specific timeout to seq-precision.sh because otherwise seq will fill logs and cause something to jam in make + sed -i -e "s| seq |$(which timeout) 1 seq |" tests/misc/seq-precision.sh + test -f "${BUILDDIR}/getlimits" || cp src/getlimits "${BUILDDIR}" - name: Run GNU tests shell: bash From b19afebad8a62037aff0e1ea3c05b25808885b8c Mon Sep 17 00:00:00 2001 From: James Robson Date: Tue, 23 Feb 2021 09:58:06 +0000 Subject: [PATCH 12/33] Shorten the timeout on seq-precision --- .github/workflows/GNU.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 024112f8a..b9b014dbf 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -77,7 +77,7 @@ jobs: sed -i -e "s|truncate |$(which truncate) |" tests/split/fail.sh #Add specific timeout to seq-precision.sh because otherwise seq will fill logs and cause something to jam in make - sed -i -e "s| seq |$(which timeout) 1 seq |" tests/misc/seq-precision.sh + sed -i -e "s| seq |$(which timeout) 0.1 seq |" tests/misc/seq-precision.sh test -f "${BUILDDIR}/getlimits" || cp src/getlimits "${BUILDDIR}" - name: Run GNU tests From e89387c089344a6763f94239673437909aa66c44 Mon Sep 17 00:00:00 2001 From: James Robson Date: Tue, 23 Feb 2021 19:49:11 +0000 Subject: [PATCH 13/33] Try removing seq-precision --- .github/workflows/GNU.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index b9b014dbf..30c109cda 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -76,9 +76,8 @@ jobs: sed -i -e "s|split |$(which split) |" tests/misc/factor-parallel.sh sed -i -e "s|truncate |$(which truncate) |" tests/split/fail.sh - #Add specific timeout to seq-precision.sh because otherwise seq will fill logs and cause something to jam in make - sed -i -e "s| seq |$(which timeout) 0.1 seq |" tests/misc/seq-precision.sh - + # take seq-precision out + sed -i '/seq-precision.sh/ D' Makefile test -f "${BUILDDIR}/getlimits" || cp src/getlimits "${BUILDDIR}" - name: Run GNU tests shell: bash From 4cca2b651ad72a9683d9def7f8b2168e9bfab8f0 Mon Sep 17 00:00:00 2001 From: James Robson Date: Wed, 24 Feb 2021 17:28:20 +0000 Subject: [PATCH 14/33] Keep producing logs even if make hangs --- .github/workflows/GNU.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 30c109cda..a6e740319 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -6,7 +6,6 @@ jobs: gnu: name: Run GNU tests runs-on: ubuntu-latest - timeout-minutes: 240 # Kill after 4 hours in case something gets stuck steps: # Checks out a copy of your repository on the ubuntu-latest machine - name: Checkout code uutil @@ -86,7 +85,7 @@ jobs: GNULIB_DIR="${PWD}/gnulib" pushd gnu - unbuffer make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no || : + unbuffer timeout -sKILL 4h make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no || : # Kill after 4 hours in case something gets stuck in make - name: Extract tests info shell: bash run: | From 1cef9aa0462e5e9c8517965d983262493785487b Mon Sep 17 00:00:00 2001 From: James Robson Date: Wed, 24 Feb 2021 17:47:30 +0000 Subject: [PATCH 15/33] Add timeouts to other tests that hang --- .github/workflows/GNU.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index a6e740319..cebd5550e 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -69,14 +69,17 @@ jobs: sed -i -e "s|stat|$(which stat)|" tests/chgrp/basic.sh tests/cp/existing-perm-dir.sh tests/touch/60-seconds.sh tests/misc/sort-compress-proc.sh tests/touch/60-seconds.sh sed -i -e "s|ls -|$(which ls) -|" tests/chgrp/posix-H.sh tests/chown/deref.sh tests/cp/same-file.sh tests/misc/mknod.sh tests/mv/part-symlink.sh sed -i -e "s|mkdir |$(which mkdir) |" tests/cp/existing-perm-dir.sh tests/rm/empty-inacc.sh - sed -i -e "s|timeout |$(which timeout) |" tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh tests/misc/sort-NaN-infloop.sh tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/inotify-rotate.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh + sed -i -e "s|timeout |$(which timeout) |" tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh tests/misc/sort-NaN-infloop.sh tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/inotify-rotate.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh tests/tail-2/pid.sh tests/dd/stats.sh sed -i -e "s|chmod |$(which chmod) |" tests/du/inacc-dir.sh tests/mkdir/p-3.sh sed -i -e "s|sort |$(which sort) |" tests/ls/hyperlink.sh sed -i -e "s|split |$(which split) |" tests/misc/factor-parallel.sh sed -i -e "s|truncate |$(which truncate) |" tests/split/fail.sh - # take seq-precision out - sed -i '/seq-precision.sh/ D' Makefile + #Add specific timeout to tests that currently hang to limit time spent waiting + sed -i -e "s| seq |$(which timeout) 0.1 seq |" tests/misc/seq-precision.sh + sed -i -e "s|cat |$(which timeout) 0.1 cat |" tests/misc/cat-self.sh + + test -f "${BUILDDIR}/getlimits" || cp src/getlimits "${BUILDDIR}" - name: Run GNU tests shell: bash From 03619d867ebd00ff87addf05b4e66cd4a1ee070e Mon Sep 17 00:00:00 2001 From: James Robson Date: Thu, 25 Feb 2021 18:18:30 +0000 Subject: [PATCH 16/33] More tight timeouts --- .github/workflows/GNU.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index cebd5550e..6739a12b5 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -76,7 +76,7 @@ jobs: sed -i -e "s|truncate |$(which truncate) |" tests/split/fail.sh #Add specific timeout to tests that currently hang to limit time spent waiting - sed -i -e "s| seq |$(which timeout) 0.1 seq |" tests/misc/seq-precision.sh + sed -i -e "s|seq \\$|$(which timeout) 0.1 seq \$|" tests/misc/seq-precision.sh tests/misc/seq-long-double.sh sed -i -e "s|cat |$(which timeout) 0.1 cat |" tests/misc/cat-self.sh From bbce17911596c54891154988b86e32241e9351e6 Mon Sep 17 00:00:00 2001 From: James Robson Date: Sat, 27 Feb 2021 13:25:13 +0000 Subject: [PATCH 17/33] Remove unbuffer This causes the make process to hang for some reason, and it itsn't providing any real advantage so it's taken out --- .github/workflows/GNU.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 6739a12b5..fb2e231d4 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -88,7 +88,7 @@ jobs: GNULIB_DIR="${PWD}/gnulib" pushd gnu - unbuffer timeout -sKILL 4h make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no || : # Kill after 4 hours in case something gets stuck in make + timeout -sKILL 4h make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no || : # Kill after 4 hours in case something gets stuck in make - name: Extract tests info shell: bash run: | From a395af7ee761aef1041567edecebe46bf6382fcd Mon Sep 17 00:00:00 2001 From: James Robson Date: Sat, 27 Feb 2021 14:35:31 +0000 Subject: [PATCH 18/33] Create *sum binaries for tests --- .github/workflows/GNU.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index fb2e231d4..528d62863 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -38,6 +38,12 @@ jobs: pushd uutils make PROFILE=release cp target/release/install target/release/ginstall # The GNU tests rename this script before running, to avoid confusion with the make target + # Create *sum binaries + for sum in b2sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum + do + sum_path="target/release/${sum}" + fest -f "${sum_path}" || cp target/release/hashsum "${sum_path}" + done BUILDDIR="$PWD/target/release/" popd GNULIB_SRCDIR="$PWD/gnulib" From 20082971be5d47fd13ad2ae928de8574cedfc8fb Mon Sep 17 00:00:00 2001 From: James Robson Date: Thu, 4 Mar 2021 17:33:31 +0000 Subject: [PATCH 19/33] Use system sha1sum in factor tests --- .github/workflows/GNU.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 528d62863..3a9864ae1 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -62,7 +62,7 @@ jobs: make tests/factor/t${i}.sh done grep -rl 'path_prepend_' tests/* | xargs sed -i 's|path_prepend_ ./src||' - sed -i -e 's|^seq |/usr/bin/seq |' tests/factor/t*sh + sed -i -e 's|^seq |/usr/bin/seq |' -e "s|sha1sum |$(which sha1sum) |" tests/factor/t*sh # Remove tests checking for --version & --help # Not really interesting for us and logs are too big From 3b9399513293f9225b8050326507ac9cc44487b8 Mon Sep 17 00:00:00 2001 From: James Robson Date: Thu, 4 Mar 2021 19:11:38 +0000 Subject: [PATCH 20/33] generate all factor scripts --- .github/workflows/GNU.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 3a9864ae1..91796214c 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -57,7 +57,7 @@ jobs: sed -i 's| tr | /usr/bin/tr |' tests/init.sh make # Generate the factor tests, so they can be fixed - for i in $(seq -w 1 36) + for i in $(seq -w 0 36) do make tests/factor/t${i}.sh done From e42479b79b5ba63a87ef902da684ec3ed28f2f1e Mon Sep 17 00:00:00 2001 From: James Robson Date: Thu, 4 Mar 2021 20:50:57 +0000 Subject: [PATCH 21/33] fail tests for any binary not built --- .github/workflows/GNU.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 91796214c..f6729d0d1 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -37,17 +37,26 @@ jobs: sudo apt-get install autoconf autopoint bison texinfo gperf gcc g++ gdb python-pyinotify expect python3-sphinx pushd uutils make PROFILE=release - cp target/release/install target/release/ginstall # The GNU tests rename this script before running, to avoid confusion with the make target + BUILDDIR="$PWD/target/release/" + cp ${BUILDDIR}/install ${BUILDDIR}/ginstall # The GNU tests rename this script before running, to avoid confusion with the make target # Create *sum binaries for sum in b2sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum do - sum_path="target/release/${sum}" - fest -f "${sum_path}" || cp target/release/hashsum "${sum_path}" + sum_path="${BUILDDIR}/${sum}" + test -f "${sum_path}" || cp "${BUILDDIR}/hashsum" "${sum_path}" done - BUILDDIR="$PWD/target/release/" + test -f "${BUILDDIR}/[" || cp "${BUILDDIR}/test" "${BUILDDIR}/[" popd GNULIB_SRCDIR="$PWD/gnulib" pushd gnu/ + + # Any binaries that aren't built become `false` so their tests fail + for binary in $(./build-aux/gen-lists-of-programs.sh --list-progs) + do + bin_path="${BUILDDIR}/${binary}" + test -f "${bin_path}" || cp "${BUILDDIR}/false" "${bin_path}" + done + ./bootstrap --gnulib-srcdir="$GNULIB_SRCDIR" ./configure --quiet --disable-gcc-warnings #Add timeout to to protect against hangs From b098bd5ec2e7523c7eb659bee927edf32c8680bc Mon Sep 17 00:00:00 2001 From: James Robson Date: Fri, 5 Mar 2021 21:40:16 +0000 Subject: [PATCH 22/33] Fix tests still failing for the wrong reason --- .github/workflows/GNU.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index f6729d0d1..4d3e39613 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -84,9 +84,10 @@ jobs: sed -i -e "s|stat|$(which stat)|" tests/chgrp/basic.sh tests/cp/existing-perm-dir.sh tests/touch/60-seconds.sh tests/misc/sort-compress-proc.sh tests/touch/60-seconds.sh sed -i -e "s|ls -|$(which ls) -|" tests/chgrp/posix-H.sh tests/chown/deref.sh tests/cp/same-file.sh tests/misc/mknod.sh tests/mv/part-symlink.sh sed -i -e "s|mkdir |$(which mkdir) |" tests/cp/existing-perm-dir.sh tests/rm/empty-inacc.sh - sed -i -e "s|timeout |$(which timeout) |" tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh tests/misc/sort-NaN-infloop.sh tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/inotify-rotate.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh tests/tail-2/pid.sh tests/dd/stats.sh + sed -i -e "s|timeout |$(which timeout) |" tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh tests/misc/sort-NaN-infloop.sh tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh tests/tail-2/pid.sh tests/dd/stats.sh + sed -i -e "s| timeout | $(which timeout) |" tests/tail-2/inotify-rotate.sh # Don't break the function called 'grep_timeout' sed -i -e "s|chmod |$(which chmod) |" tests/du/inacc-dir.sh tests/mkdir/p-3.sh - sed -i -e "s|sort |$(which sort) |" tests/ls/hyperlink.sh + sed -i -e "s|sort |$(which sort) |" tests/ls/hyperlink.sh tests/misc/test-N.sh sed -i -e "s|split |$(which split) |" tests/misc/factor-parallel.sh sed -i -e "s|truncate |$(which truncate) |" tests/split/fail.sh From 8dae8b798a1de60689271df83676bfe60ab8ebb5 Mon Sep 17 00:00:00 2001 From: James Robson Date: Sat, 6 Mar 2021 16:35:22 +0000 Subject: [PATCH 23/33] Revert "Remove unbuffer" This reverts commit bbce17911596c54891154988b86e32241e9351e6. --- .github/workflows/GNU.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 4d3e39613..2cfc535ce 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -104,7 +104,7 @@ jobs: GNULIB_DIR="${PWD}/gnulib" pushd gnu - timeout -sKILL 4h make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no || : # Kill after 4 hours in case something gets stuck in make + unbuffer timeout -sKILL 4h make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no || : # Kill after 4 hours in case something gets stuck in make - name: Extract tests info shell: bash run: | From 78ec6d1e5a20e697e7e79afead4ec34c5eba07d1 Mon Sep 17 00:00:00 2001 From: James Robson Date: Sat, 6 Mar 2021 21:24:28 +0000 Subject: [PATCH 24/33] Revert "Revert "Remove unbuffer"" This reverts commit 8dae8b798a1de60689271df83676bfe60ab8ebb5. --- .github/workflows/GNU.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 2cfc535ce..4d3e39613 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -104,7 +104,7 @@ jobs: GNULIB_DIR="${PWD}/gnulib" pushd gnu - unbuffer timeout -sKILL 4h make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no || : # Kill after 4 hours in case something gets stuck in make + timeout -sKILL 4h make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no || : # Kill after 4 hours in case something gets stuck in make - name: Extract tests info shell: bash run: | From d8c3d1d51dd7de9d237364ef931c5a957d4a3974 Mon Sep 17 00:00:00 2001 From: James Robson Date: Sun, 14 Mar 2021 15:32:30 +0000 Subject: [PATCH 25/33] Use system utils --- .github/workflows/GNU.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 4d3e39613..ff88fb5a3 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -90,6 +90,8 @@ jobs: sed -i -e "s|sort |$(which sort) |" tests/ls/hyperlink.sh tests/misc/test-N.sh sed -i -e "s|split |$(which split) |" tests/misc/factor-parallel.sh sed -i -e "s|truncate |$(which truncate) |" tests/split/fail.sh + sed -i -e "s|dd |$(which dd) |" tests/du/8gb.sh tests/tail-2/big-4gb.sh + sed -i -e "s|id -|$(which id) -|" tests/misc/runcon-no-reorder.sh #Add specific timeout to tests that currently hang to limit time spent waiting sed -i -e "s|seq \\$|$(which timeout) 0.1 seq \$|" tests/misc/seq-precision.sh tests/misc/seq-long-double.sh From 7c219fd128968f786c9806408b5f3bb21c711b48 Mon Sep 17 00:00:00 2001 From: James Robson Date: Sun, 14 Mar 2021 15:34:22 +0000 Subject: [PATCH 26/33] clean up sed commands --- .github/workflows/GNU.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index ff88fb5a3..374160c42 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -60,7 +60,7 @@ jobs: ./bootstrap --gnulib-srcdir="$GNULIB_SRCDIR" ./configure --quiet --disable-gcc-warnings #Add timeout to to protect against hangs - sed -i -e "s|\"\$@|$(which timeout) 600 \"\$@|" build-aux/test-driver + sed -i "s|\"\$@|$(which timeout) 600 \"\$@|" build-aux/test-driver # Change the PATH in the Makefile to test the uutils coreutils instead of the GNU coreutils sed -i "s/^[[:blank:]]*PATH=.*/ PATH='${BUILDDIR//\//\\/}\$(PATH_SEPARATOR)'\"\$\$PATH\" \\\/" Makefile sed -i 's| tr | /usr/bin/tr |' tests/init.sh @@ -81,21 +81,21 @@ jobs: Makefile # Use the system coreutils where the test fails due to error in a util that is not the one being tested - sed -i -e "s|stat|$(which stat)|" tests/chgrp/basic.sh tests/cp/existing-perm-dir.sh tests/touch/60-seconds.sh tests/misc/sort-compress-proc.sh tests/touch/60-seconds.sh - sed -i -e "s|ls -|$(which ls) -|" tests/chgrp/posix-H.sh tests/chown/deref.sh tests/cp/same-file.sh tests/misc/mknod.sh tests/mv/part-symlink.sh - sed -i -e "s|mkdir |$(which mkdir) |" tests/cp/existing-perm-dir.sh tests/rm/empty-inacc.sh - sed -i -e "s|timeout |$(which timeout) |" tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh tests/misc/sort-NaN-infloop.sh tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh tests/tail-2/pid.sh tests/dd/stats.sh - sed -i -e "s| timeout | $(which timeout) |" tests/tail-2/inotify-rotate.sh # Don't break the function called 'grep_timeout' - sed -i -e "s|chmod |$(which chmod) |" tests/du/inacc-dir.sh tests/mkdir/p-3.sh - sed -i -e "s|sort |$(which sort) |" tests/ls/hyperlink.sh tests/misc/test-N.sh - sed -i -e "s|split |$(which split) |" tests/misc/factor-parallel.sh - sed -i -e "s|truncate |$(which truncate) |" tests/split/fail.sh - sed -i -e "s|dd |$(which dd) |" tests/du/8gb.sh tests/tail-2/big-4gb.sh - sed -i -e "s|id -|$(which id) -|" tests/misc/runcon-no-reorder.sh + sed -i "s|stat|$(which stat)|" tests/chgrp/basic.sh tests/cp/existing-perm-dir.sh tests/touch/60-seconds.sh tests/misc/sort-compress-proc.sh tests/touch/60-seconds.sh + sed -i "s|ls -|$(which ls) -|" tests/chgrp/posix-H.sh tests/chown/deref.sh tests/cp/same-file.sh tests/misc/mknod.sh tests/mv/part-symlink.sh + sed -i "s|mkdir |$(which mkdir) |" tests/cp/existing-perm-dir.sh tests/rm/empty-inacc.sh + sed -i "s|timeout |$(which timeout) |" tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh tests/misc/sort-NaN-infloop.sh tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh tests/tail-2/pid.sh tests/dd/stats.sh + sed -i "s| timeout | $(which timeout) |" tests/tail-2/inotify-rotate.sh # Don't break the function called 'grep_timeout' + sed -i "s|chmod |$(which chmod) |" tests/du/inacc-dir.sh tests/mkdir/p-3.sh + sed -i "s|sort |$(which sort) |" tests/ls/hyperlink.sh tests/misc/test-N.sh + sed -i "s|split |$(which split) |" tests/misc/factor-parallel.sh + sed -i "s|truncate |$(which truncate) |" tests/split/fail.sh + sed -i "s|dd |$(which dd) |" tests/du/8gb.sh tests/tail-2/big-4gb.sh + sed -i "s|id -|$(which id) -|" tests/misc/runcon-no-reorder.sh #Add specific timeout to tests that currently hang to limit time spent waiting - sed -i -e "s|seq \\$|$(which timeout) 0.1 seq \$|" tests/misc/seq-precision.sh tests/misc/seq-long-double.sh - sed -i -e "s|cat |$(which timeout) 0.1 cat |" tests/misc/cat-self.sh + sed -i "s|seq \\$|$(which timeout) 0.1 seq \$|" tests/misc/seq-precision.sh tests/misc/seq-long-double.sh + sed -i "s|cat |$(which timeout) 0.1 cat |" tests/misc/cat-self.sh test -f "${BUILDDIR}/getlimits" || cp src/getlimits "${BUILDDIR}" From 570e45649613f0515db32213acf004c7214bd7f9 Mon Sep 17 00:00:00 2001 From: James Robson Date: Sun, 14 Mar 2021 15:59:17 +0000 Subject: [PATCH 27/33] clean up workflow script --- .github/workflows/GNU.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 374160c42..299f333e1 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -34,11 +34,11 @@ jobs: shell: bash run: | sudo apt-get update - sudo apt-get install autoconf autopoint bison texinfo gperf gcc g++ gdb python-pyinotify expect python3-sphinx + sudo apt-get install autoconf autopoint bison texinfo gperf gcc g++ gdb python-pyinotify python3-sphinx pushd uutils make PROFILE=release BUILDDIR="$PWD/target/release/" - cp ${BUILDDIR}/install ${BUILDDIR}/ginstall # The GNU tests rename this script before running, to avoid confusion with the make target + cp "${BUILDDIR}/install" "${BUILDDIR}/ginstall" # The GNU tests rename this script before running, to avoid confusion with the make target # Create *sum binaries for sum in b2sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum do @@ -54,7 +54,7 @@ jobs: for binary in $(./build-aux/gen-lists-of-programs.sh --list-progs) do bin_path="${BUILDDIR}/${binary}" - test -f "${bin_path}" || cp "${BUILDDIR}/false" "${bin_path}" + test -f "${bin_path}" || { echo "'${binary}' was not built with uutils, using the 'false' program"; cp "${BUILDDIR}/false" "${bin_path}"; } done ./bootstrap --gnulib-srcdir="$GNULIB_SRCDIR" @@ -66,7 +66,7 @@ jobs: sed -i 's| tr | /usr/bin/tr |' tests/init.sh make # Generate the factor tests, so they can be fixed - for i in $(seq -w 0 36) + for i in {00..36} do make tests/factor/t${i}.sh done @@ -106,7 +106,7 @@ jobs: GNULIB_DIR="${PWD}/gnulib" pushd gnu - timeout -sKILL 4h make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no || : # Kill after 4 hours in case something gets stuck in make + timeout -sKILL 2h make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no || : # Kill after 4 hours in case something gets stuck in make - name: Extract tests info shell: bash run: | From 0a661a6da27af00751ccaf9ce1f89b5018739399 Mon Sep 17 00:00:00 2001 From: James Robson Date: Sat, 20 Mar 2021 22:15:47 +0000 Subject: [PATCH 28/33] Remove use of which to set system binaries --- .github/workflows/GNU.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 299f333e1..1fcc7c721 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -60,7 +60,7 @@ jobs: ./bootstrap --gnulib-srcdir="$GNULIB_SRCDIR" ./configure --quiet --disable-gcc-warnings #Add timeout to to protect against hangs - sed -i "s|\"\$@|$(which timeout) 600 \"\$@|" build-aux/test-driver + sed -i 's|"\$@|/usr/bin/timeout 600 "\$@|' build-aux/test-driver # Change the PATH in the Makefile to test the uutils coreutils instead of the GNU coreutils sed -i "s/^[[:blank:]]*PATH=.*/ PATH='${BUILDDIR//\//\\/}\$(PATH_SEPARATOR)'\"\$\$PATH\" \\\/" Makefile sed -i 's| tr | /usr/bin/tr |' tests/init.sh @@ -71,7 +71,7 @@ jobs: make tests/factor/t${i}.sh done grep -rl 'path_prepend_' tests/* | xargs sed -i 's|path_prepend_ ./src||' - sed -i -e 's|^seq |/usr/bin/seq |' -e "s|sha1sum |$(which sha1sum) |" tests/factor/t*sh + sed -i -e 's|^seq |/usr/bin/seq |' -e 's|sha1sum |/usr/bin/sha1sum |' tests/factor/t*sh # Remove tests checking for --version & --help # Not really interesting for us and logs are too big @@ -81,21 +81,21 @@ jobs: Makefile # Use the system coreutils where the test fails due to error in a util that is not the one being tested - sed -i "s|stat|$(which stat)|" tests/chgrp/basic.sh tests/cp/existing-perm-dir.sh tests/touch/60-seconds.sh tests/misc/sort-compress-proc.sh tests/touch/60-seconds.sh - sed -i "s|ls -|$(which ls) -|" tests/chgrp/posix-H.sh tests/chown/deref.sh tests/cp/same-file.sh tests/misc/mknod.sh tests/mv/part-symlink.sh - sed -i "s|mkdir |$(which mkdir) |" tests/cp/existing-perm-dir.sh tests/rm/empty-inacc.sh - sed -i "s|timeout |$(which timeout) |" tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh tests/misc/sort-NaN-infloop.sh tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh tests/tail-2/pid.sh tests/dd/stats.sh - sed -i "s| timeout | $(which timeout) |" tests/tail-2/inotify-rotate.sh # Don't break the function called 'grep_timeout' - sed -i "s|chmod |$(which chmod) |" tests/du/inacc-dir.sh tests/mkdir/p-3.sh - sed -i "s|sort |$(which sort) |" tests/ls/hyperlink.sh tests/misc/test-N.sh - sed -i "s|split |$(which split) |" tests/misc/factor-parallel.sh - sed -i "s|truncate |$(which truncate) |" tests/split/fail.sh - sed -i "s|dd |$(which dd) |" tests/du/8gb.sh tests/tail-2/big-4gb.sh - sed -i "s|id -|$(which id) -|" tests/misc/runcon-no-reorder.sh + sed -i 's|stat|/usr/bin/stat|' tests/chgrp/basic.sh tests/cp/existing-perm-dir.sh tests/touch/60-seconds.sh tests/misc/sort-compress-proc.sh tests/touch/60-seconds.sh + sed -i 's|ls -|/usr/bin/ls -|' tests/chgrp/posix-H.sh tests/chown/deref.sh tests/cp/same-file.sh tests/misc/mknod.sh tests/mv/part-symlink.sh tests/du/8gb.sh + sed -i 's|mkdir |/usr/bin/mkdir |' tests/cp/existing-perm-dir.sh tests/rm/empty-inacc.sh + sed -i 's|timeout |/usr/bin/timeout |' tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh tests/misc/sort-NaN-infloop.sh tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh tests/tail-2/pid.sh tests/dd/stats.sh + sed -i 's| timeout | /usr/bin/timeout |' tests/tail-2/inotify-rotate.sh # Don't break the function called 'grep_timeout' + sed -i 's|chmod |/usr/bin/chmod |' tests/du/inacc-dir.sh tests/mkdir/p-3.sh + sed -i 's|sort |/usr/bin/sort |' tests/ls/hyperlink.sh tests/misc/test-N.sh + sed -i 's|split |/usr/bin/split |' tests/misc/factor-parallel.sh + sed -i 's|truncate |/usr/bin/truncate |' tests/split/fail.sh + sed -i '|dd |/usr/bin/dd |' tests/du/8gb.sh tests/tail-2/big-4gb.sh + sed -i 's|id -|/usr/bin/id -|' tests/misc/runcon-no-reorder.sh #Add specific timeout to tests that currently hang to limit time spent waiting - sed -i "s|seq \\$|$(which timeout) 0.1 seq \$|" tests/misc/seq-precision.sh tests/misc/seq-long-double.sh - sed -i "s|cat |$(which timeout) 0.1 cat |" tests/misc/cat-self.sh + sed -i 's|seq \$|/usr/bin/timeout 0.1 seq \$|' tests/misc/seq-precision.sh tests/misc/seq-long-double.sh + sed -i 's|cat |/usr/bin/timeout 0.1 cat |' tests/misc/cat-self.sh test -f "${BUILDDIR}/getlimits" || cp src/getlimits "${BUILDDIR}" From 4352d47ac31f6aab4968cfa3aa1cb54f75eed7ed Mon Sep 17 00:00:00 2001 From: James Robson Date: Sun, 21 Mar 2021 14:45:34 +0000 Subject: [PATCH 29/33] Don't fail the job if test-suite.log is missing --- .github/workflows/GNU.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 1fcc7c721..79ef69b8c 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -110,13 +110,18 @@ jobs: - name: Extract tests info shell: bash run: | - TOTAL=$( grep "# TOTAL:" gnu/tests/test-suite.log|cut -d' ' -f2-) - PASS=$( grep "# PASS:" gnu/tests/test-suite.log|cut -d' ' -f2-) - SKIP=$( grep "# SKIP:" gnu/tests/test-suite.log|cut -d' ' -f2-) - FAIL=$( grep "# FAIL:" gnu/tests/test-suite.log|cut -d' ' -f2-) - XPASS=$( grep "# XPASS:" gnu/tests/test-suite.log|cut -d' ' -f2-) - ERROR=$( grep "# ERROR:" gnu/tests/test-suite.log|cut -d' ' -f2-) - echo "::warning ::GNU testsuite = $TOTAL / $PASS / $FAIL / $ERROR" + if test -f gnu/tests/test-suite.log + then + TOTAL=$( grep "# TOTAL:" gnu/tests/test-suite.log|cut -d' ' -f2-) + PASS=$( grep "# PASS:" gnu/tests/test-suite.log|cut -d' ' -f2-) + SKIP=$( grep "# SKIP:" gnu/tests/test-suite.log|cut -d' ' -f2-) + FAIL=$( grep "# FAIL:" gnu/tests/test-suite.log|cut -d' ' -f2-) + XPASS=$( grep "# XPASS:" gnu/tests/test-suite.log|cut -d' ' -f2-) + ERROR=$( grep "# ERROR:" gnu/tests/test-suite.log|cut -d' ' -f2-) + echo "::warning ::GNU testsuite = $TOTAL / $PASS / $FAIL / $ERROR" + else + echo "::error ::Failed to get summary of test results" + fi - uses: actions/upload-artifact@v2 with: From 0f77b54aeb8c44ca61979d9a772abe0b2cba29d4 Mon Sep 17 00:00:00 2001 From: James Robson Date: Sun, 21 Mar 2021 15:11:48 +0000 Subject: [PATCH 30/33] Fix typo --- .github/workflows/GNU.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 79ef69b8c..59ce82420 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -90,7 +90,7 @@ jobs: sed -i 's|sort |/usr/bin/sort |' tests/ls/hyperlink.sh tests/misc/test-N.sh sed -i 's|split |/usr/bin/split |' tests/misc/factor-parallel.sh sed -i 's|truncate |/usr/bin/truncate |' tests/split/fail.sh - sed -i '|dd |/usr/bin/dd |' tests/du/8gb.sh tests/tail-2/big-4gb.sh + sed -i 's|dd |/usr/bin/dd |' tests/du/8gb.sh tests/tail-2/big-4gb.sh sed -i 's|id -|/usr/bin/id -|' tests/misc/runcon-no-reorder.sh #Add specific timeout to tests that currently hang to limit time spent waiting From 40677bdc7a367b85dc0b0a40fb2f52a776ecda6f Mon Sep 17 00:00:00 2001 From: James Robson Date: Sun, 21 Mar 2021 20:49:15 +0000 Subject: [PATCH 31/33] Fix more problems with utils that aren't being tested --- .github/workflows/GNU.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 59ce82420..5b8742b6b 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -84,14 +84,20 @@ jobs: sed -i 's|stat|/usr/bin/stat|' tests/chgrp/basic.sh tests/cp/existing-perm-dir.sh tests/touch/60-seconds.sh tests/misc/sort-compress-proc.sh tests/touch/60-seconds.sh sed -i 's|ls -|/usr/bin/ls -|' tests/chgrp/posix-H.sh tests/chown/deref.sh tests/cp/same-file.sh tests/misc/mknod.sh tests/mv/part-symlink.sh tests/du/8gb.sh sed -i 's|mkdir |/usr/bin/mkdir |' tests/cp/existing-perm-dir.sh tests/rm/empty-inacc.sh - sed -i 's|timeout |/usr/bin/timeout |' tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh tests/misc/sort-NaN-infloop.sh tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh tests/tail-2/pid.sh tests/dd/stats.sh - sed -i 's| timeout | /usr/bin/timeout |' tests/tail-2/inotify-rotate.sh # Don't break the function called 'grep_timeout' - sed -i 's|chmod |/usr/bin/chmod |' tests/du/inacc-dir.sh tests/mkdir/p-3.sh + sed -i 's|timeout \([[:digit:]]\)| /usr/bin/timeout \1|' tests/tail-2/inotify-rotate.sh tests/tail-2/inotify-dir-recreate.sh tests/tail-2/inotify-rotate-resources.sh tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh tests/misc/sort-NaN-infloop.sh tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh tests/tail-2/pid.sh tests/dd/stats.sh tests/tail-2/follow-name.sh + # Don't break the function called 'grep_timeout' + sed -i 's|chmod |/usr/bin/chmod |' tests/du/inacc-dir.sh tests/mkdir/p-3.sh tests/tail-2/tail-n0f.sh tests/cp/fail-perm.sh tests/du/inaccessible-cwd.sh tests/mv/i-2.sh sed -i 's|sort |/usr/bin/sort |' tests/ls/hyperlink.sh tests/misc/test-N.sh sed -i 's|split |/usr/bin/split |' tests/misc/factor-parallel.sh sed -i 's|truncate |/usr/bin/truncate |' tests/split/fail.sh - sed -i 's|dd |/usr/bin/dd |' tests/du/8gb.sh tests/tail-2/big-4gb.sh + sed -i 's|dd |/usr/bin/dd |' tests/du/8gb.sh tests/tail-2/big-4gb.sh tests/cp/fiemap-2.sh tests/init.sh sed -i 's|id -|/usr/bin/id -|' tests/misc/runcon-no-reorder.sh + sed -i 's|touch |/usr/bin/touch |' tests/cp/preserve-link.sh tests/cp/reflink-perm.sh tests/ls/block-size.sh tests/ls/abmon-align.sh tests/ls/rt-1.sh tests/mv/update.sh tests/misc/ls-time.sh tests/misc/stat-nanoseconds.sh tests/misc/time-style.sh tests/misc/test-N.sh + sed -i 's|ln -|/usr/bin/ln -|' tests/cp/link-deref.sh + sed -i 's|printf |/usr/bin/printf |' tests/dd/ascii.sh + sed -i 's|cp |/usr/bin/cp |' tests/mv/hard-2.sh + sed -i 's|paste |/usr/bin/paste |' tests/misc/od-endian.sh + sed -i 's|seq |/usr/bin/seq |' tests/misc/sort-discrim.sh #Add specific timeout to tests that currently hang to limit time spent waiting sed -i 's|seq \$|/usr/bin/timeout 0.1 seq \$|' tests/misc/seq-precision.sh tests/misc/seq-long-double.sh From 027d5e6d9d848a5f58389db79591b63763d9011f Mon Sep 17 00:00:00 2001 From: James Robson Date: Sun, 21 Mar 2021 22:31:15 +0000 Subject: [PATCH 32/33] Fix yaml syntax --- .github/workflows/GNU.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 5b8742b6b..f89621e3f 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -84,8 +84,7 @@ jobs: sed -i 's|stat|/usr/bin/stat|' tests/chgrp/basic.sh tests/cp/existing-perm-dir.sh tests/touch/60-seconds.sh tests/misc/sort-compress-proc.sh tests/touch/60-seconds.sh sed -i 's|ls -|/usr/bin/ls -|' tests/chgrp/posix-H.sh tests/chown/deref.sh tests/cp/same-file.sh tests/misc/mknod.sh tests/mv/part-symlink.sh tests/du/8gb.sh sed -i 's|mkdir |/usr/bin/mkdir |' tests/cp/existing-perm-dir.sh tests/rm/empty-inacc.sh - sed -i 's|timeout \([[:digit:]]\)| /usr/bin/timeout \1|' tests/tail-2/inotify-rotate.sh tests/tail-2/inotify-dir-recreate.sh tests/tail-2/inotify-rotate-resources.sh tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh tests/misc/sort-NaN-infloop.sh tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh tests/tail-2/pid.sh tests/dd/stats.sh tests/tail-2/follow-name.sh - # Don't break the function called 'grep_timeout' + sed -i 's|timeout \([[:digit:]]\)| /usr/bin/timeout \1|' tests/tail-2/inotify-rotate.sh tests/tail-2/inotify-dir-recreate.sh tests/tail-2/inotify-rotate-resources.sh tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh tests/misc/sort-NaN-infloop.sh tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh tests/tail-2/pid.sh tests/dd/stats.sh tests/tail-2/follow-name.sh # Don't break the function called 'grep_timeout' sed -i 's|chmod |/usr/bin/chmod |' tests/du/inacc-dir.sh tests/mkdir/p-3.sh tests/tail-2/tail-n0f.sh tests/cp/fail-perm.sh tests/du/inaccessible-cwd.sh tests/mv/i-2.sh sed -i 's|sort |/usr/bin/sort |' tests/ls/hyperlink.sh tests/misc/test-N.sh sed -i 's|split |/usr/bin/split |' tests/misc/factor-parallel.sh From 56da6b4a2c656e387ebd9d98ffae74e82068c7c9 Mon Sep 17 00:00:00 2001 From: James Robson Date: Mon, 22 Mar 2021 17:48:12 +0000 Subject: [PATCH 33/33] Fix test setup --- .github/workflows/GNU.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index f89621e3f..9eb5da2b9 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -81,15 +81,15 @@ jobs: Makefile # Use the system coreutils where the test fails due to error in a util that is not the one being tested - sed -i 's|stat|/usr/bin/stat|' tests/chgrp/basic.sh tests/cp/existing-perm-dir.sh tests/touch/60-seconds.sh tests/misc/sort-compress-proc.sh tests/touch/60-seconds.sh + sed -i 's|stat|/usr/bin/stat|' tests/chgrp/basic.sh tests/cp/existing-perm-dir.sh tests/touch/60-seconds.sh tests/misc/sort-compress-proc.sh sed -i 's|ls -|/usr/bin/ls -|' tests/chgrp/posix-H.sh tests/chown/deref.sh tests/cp/same-file.sh tests/misc/mknod.sh tests/mv/part-symlink.sh tests/du/8gb.sh sed -i 's|mkdir |/usr/bin/mkdir |' tests/cp/existing-perm-dir.sh tests/rm/empty-inacc.sh sed -i 's|timeout \([[:digit:]]\)| /usr/bin/timeout \1|' tests/tail-2/inotify-rotate.sh tests/tail-2/inotify-dir-recreate.sh tests/tail-2/inotify-rotate-resources.sh tests/cp/parent-perm-race.sh tests/ls/infloop.sh tests/misc/sort-exit-early.sh tests/misc/sort-NaN-infloop.sh tests/misc/uniq-perf.sh tests/tail-2/inotify-only-regular.sh tests/tail-2/pipe-f2.sh tests/tail-2/retry.sh tests/tail-2/symlink.sh tests/tail-2/wait.sh tests/tail-2/pid.sh tests/dd/stats.sh tests/tail-2/follow-name.sh # Don't break the function called 'grep_timeout' - sed -i 's|chmod |/usr/bin/chmod |' tests/du/inacc-dir.sh tests/mkdir/p-3.sh tests/tail-2/tail-n0f.sh tests/cp/fail-perm.sh tests/du/inaccessible-cwd.sh tests/mv/i-2.sh + sed -i 's|chmod |/usr/bin/chmod |' tests/du/inacc-dir.sh tests/mkdir/p-3.sh tests/tail-2/tail-n0f.sh tests/cp/fail-perm.sh tests/du/inaccessible-cwd.sh tests/mv/i-2.sh tests/chgrp/basic.sh sed -i 's|sort |/usr/bin/sort |' tests/ls/hyperlink.sh tests/misc/test-N.sh sed -i 's|split |/usr/bin/split |' tests/misc/factor-parallel.sh sed -i 's|truncate |/usr/bin/truncate |' tests/split/fail.sh - sed -i 's|dd |/usr/bin/dd |' tests/du/8gb.sh tests/tail-2/big-4gb.sh tests/cp/fiemap-2.sh tests/init.sh + sed -i 's|dd |/usr/bin/dd |' tests/du/8gb.sh tests/tail-2/big-4gb.sh tests/cp/fiemap-2.sh init.cfg sed -i 's|id -|/usr/bin/id -|' tests/misc/runcon-no-reorder.sh sed -i 's|touch |/usr/bin/touch |' tests/cp/preserve-link.sh tests/cp/reflink-perm.sh tests/ls/block-size.sh tests/ls/abmon-align.sh tests/ls/rt-1.sh tests/mv/update.sh tests/misc/ls-time.sh tests/misc/stat-nanoseconds.sh tests/misc/time-style.sh tests/misc/test-N.sh sed -i 's|ln -|/usr/bin/ln -|' tests/cp/link-deref.sh