From 3586f4ddb0280f45a273e6c950c04a91828fd4c7 Mon Sep 17 00:00:00 2001 From: Martin Kunkel Date: Sun, 7 Dec 2025 09:31:18 +0000 Subject: [PATCH 1/2] gnu-tests: create full partition for tac-continue tac/tac-continue test needs a temporary directory which is on a partition in which you can still create files, but where no free space is left. --- .github/workflows/GnuTests.yml | 12 +++++++++++- util/why-skip.md | 3 --- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/GnuTests.yml b/.github/workflows/GnuTests.yml index 55c57080821..22077b5ff7f 100644 --- a/.github/workflows/GnuTests.yml +++ b/.github/workflows/GnuTests.yml @@ -1,6 +1,6 @@ name: GnuTests -# spell-checker:ignore (abbrev/names) CodeCov gnulib GnuTests Swatinem +# spell-checker:ignore (abbrev/names) CodeCov gnulib GnuTests Swatinem tmpfs # spell-checker:ignore (jargon) submodules devel # spell-checker:ignore (libs/utils) autopoint chksum getenforce gperf lcov libexpect limactl pyinotify setenforce shopt texinfo valgrind libattr libcap taiki-e # spell-checker:ignore (options) Ccodegen Coverflow Cpanic Zpanic @@ -115,6 +115,16 @@ jobs: cd 'uutils' env PROFILE=release-small bash util/build-gnu.sh + ### Test environment setup + - name: Setup specific GNU tests environment + shell: bash + run: | + # for tac/tac-continue test + export FULL_PARTITION_TMPDIR=/mnt/full_partition + sudo mount --mkdir=0777 --types tmpfs --options size=1M tmpfs $FULL_PARTITION_TMPDIR + dd if=/dev/zero of=$FULL_PARTITION_TMPDIR/data bs=1M count=1 + echo "FULL_PARTITION_TMPDIR=$FULL_PARTITION_TMPDIR" >> $GITHUB_ENV + ### Run tests as user - name: Run GNU tests shell: bash diff --git a/util/why-skip.md b/util/why-skip.md index f179a58bb1c..647bc06dbf4 100644 --- a/util/why-skip.md +++ b/util/why-skip.md @@ -35,9 +35,6 @@ = timeout returned 142. SIGALRM not handled? = * tests/misc/timeout-group.sh -= FULL_PARTITION_TMPDIR not defined = -* tests/misc/tac-continue.sh - = can't get window size = * tests/misc/stty-row-col.sh From 65f5655450f3343f18cc7f1265e646566cee5e36 Mon Sep 17 00:00:00 2001 From: Martin Kunkel Date: Sun, 7 Dec 2025 10:01:02 +0000 Subject: [PATCH 2/2] gnu-tests: adapt expected behavior of tac-continue Add a patch that changes the expected behavior in tac-continue test to match uutils implementation of tac. The test expects that a temporary file has to be opened and written to. This is not the case for uutils implementation. --- util/gnu-patches/series | 1 + util/gnu-patches/tests_tac_continue.patch | 24 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 util/gnu-patches/tests_tac_continue.patch diff --git a/util/gnu-patches/series b/util/gnu-patches/series index 5fb1398cd17..f04bf77f1ab 100644 --- a/util/gnu-patches/series +++ b/util/gnu-patches/series @@ -10,4 +10,5 @@ tests_sort_merge.pl.patch tests_tsort.patch tests_du_move_dir_while_traversing.patch test_mkdir_restorecon.patch +tests_tac_continue.patch error_msg_uniq.diff diff --git a/util/gnu-patches/tests_tac_continue.patch b/util/gnu-patches/tests_tac_continue.patch new file mode 100644 index 00000000000..d530ed58268 --- /dev/null +++ b/util/gnu-patches/tests_tac_continue.patch @@ -0,0 +1,24 @@ +Index: gnu/tests/tac/tac-continue.sh +=================================================================== +--- gnu.orig/tests/tac/tac-continue.sh ++++ gnu/tests/tac/tac-continue.sh +@@ -59,11 +59,17 @@ seq 5 > in + + # Give tac a fifo command line argument. + # This makes it try to create a temporary file in $TMPDIR. ++ ++# uutils does not create this temporary file in $TMPDIR, so the expected result is different ++# there is just no difference from normal operation ++# that means tac returns with success and the expected output the reverse of inputs ++ + mkfifo_or_skip_ fifo + seq 1000 > fifo & pid=$! +-TMPDIR=$FULL_PARTITION_TMPDIR tac fifo in >out 2>err && fail=1 ++TMPDIR=$FULL_PARTITION_TMPDIR tac fifo in >out 2>err || fail=1 + +-cat <<\EOF > exp || framework_failure_ ++seq 1000 -1 1 > exp || framework_failure_ ++cat <<\EOF >> exp || framework_failure_ + 5 + 4 + 3