From 84965ad8c3b357e6dadf288fc6ed629a8e5a1e71 Mon Sep 17 00:00:00 2001 From: James Robson Date: Wed, 3 Feb 2021 21:27:30 +0000 Subject: [PATCH 1/7] Use make to build all binaries --- .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 9b6b60c08..b6bb24bdd 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -33,14 +33,14 @@ jobs: - name: Build binaries shell: bash run: | + sudo apt-get update + sudo apt-get install autoconf autopoint bison texinfo gperf gcc g++ gdb python-pyinotify expect python3-sphinx pushd uutils - cargo build --release + make PROFILE=release BUILDDIR="$PWD/target/release/" popd GNULIB_SRCDIR="$PWD/gnulib" pushd gnu/ - sudo apt-get update - sudo apt-get install autoconf autopoint bison texinfo gperf gcc gdb python-pyinotify expect ./bootstrap --gnulib-srcdir="$GNULIB_SRCDIR" ./configure --quiet --disable-gcc-warnings # Change the PATH in the Makefile to test the uutils coreutils instead of the GNU coreutils From 84b0573f7d19b9979da716654e9cbcde7b3b0496 Mon Sep 17 00:00:00 2001 From: James Robson Date: Wed, 3 Feb 2021 21:30:20 +0000 Subject: [PATCH 2/7] Fix $PATH in tests --- .github/workflows/GNU.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index b6bb24bdd..16d8f1b78 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -47,6 +47,12 @@ jobs: sed -i "s/^[[:blank:]]*PATH=.*/ PATH='${BUILDDIR//\//\\/}\$(PATH_SEPARATOR)'\"\$\$PATH\" \\\/" Makefile 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) + do + make tests/factor/t${i}.sh + done + grep -rl 'path_prepend_' tests/* | xargs sed -i 's|path_prepend_ ./src||' test -f "${BUILDDIR}/getlimits" || cp src/getlimits "${BUILDDIR}" - name: Run GNU tests shell: bash From 5808d56f12c0a991103b537f73101b9add392cb4 Mon Sep 17 00:00:00 2001 From: James Robson Date: Wed, 3 Feb 2021 21:33:14 +0000 Subject: [PATCH 3/7] Skip tests that hang --- .github/workflows/GNU.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 16d8f1b78..1ce6376b7 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -53,6 +53,21 @@ 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 '/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 + 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 + sed -i -e '/tests\/tail-2\/pid.sh/ D' Makefile # hangs on github, tail doesn't support -f + test -f "${BUILDDIR}/getlimits" || cp src/getlimits "${BUILDDIR}" - name: Run GNU tests shell: bash From 7fe5a08b23696f73ce15b7bf0966b28053ed1dc5 Mon Sep 17 00:00:00 2001 From: James Robson Date: Wed, 3 Feb 2021 21:37:39 +0000 Subject: [PATCH 4/7] Use timeout to protect against 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 1ce6376b7..9d996fe64 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -75,6 +75,5 @@ jobs: BUILDDIR="${PWD}/uutils/target/release" GNULIB_DIR="${PWD}/gnulib" pushd gnu - ulimit -t 60 - unbuffer make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no || : + unbuffer timeout 3600 make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no || : From 96219692a4c5b502db976775f7b21e4ef03007e3 Mon Sep 17 00:00:00 2001 From: James Robson Date: Wed, 3 Feb 2021 21:38:24 +0000 Subject: [PATCH 5/7] Archive logs --- .github/workflows/GNU.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 9d996fe64..ad100d8b1 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -77,3 +77,7 @@ jobs: pushd gnu unbuffer timeout 3600 make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no || : + - uses: actions/upload-artifact@v2 + with: + name: test-report + path: gnu/tests/**/*.log From 4573ce44e1a4d31e203fa2f16e1a56fcba9198f2 Mon Sep 17 00:00:00 2001 From: James Robson Date: Thu, 4 Feb 2021 18:08:00 +0000 Subject: [PATCH 6/7] Kill make on timeout so it can't delete the running log --- .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 ad100d8b1..0ca34db1d 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -76,7 +76,7 @@ jobs: GNULIB_DIR="${PWD}/gnulib" pushd gnu - unbuffer timeout 3600 make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no || : + unbuffer timeout -sKILL 3600 make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no || : - uses: actions/upload-artifact@v2 with: name: test-report From d4a30fdff0b5f22db1cb364ad903ece47a979e5d Mon Sep 17 00:00:00 2001 From: James Robson Date: Thu, 4 Feb 2021 18:42:43 +0000 Subject: [PATCH 7/7] Skip sort test that will hang --- .github/workflows/GNU.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/GNU.yml b/.github/workflows/GNU.yml index 0ca34db1d..605603bf9 100644 --- a/.github/workflows/GNU.yml +++ b/.github/workflows/GNU.yml @@ -67,6 +67,7 @@ jobs: -e '/tests\/misc\/seq-precision.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 test -f "${BUILDDIR}/getlimits" || cp src/getlimits "${BUILDDIR}" - name: Run GNU tests