coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

GNU coreutils 9.9: Test report

Open RenjiSann opened this issue 1 month ago • 36 comments

Here are the failing GNU tests as of 2025-11-10 I hope to complete this issue, either by fixing tests, or at least providing a reason explaining what's missing in our implementation.

https://uutils.github.io/coreutils/docs/test_coverage.html

Replace https://github.com/uutils/coreutils/issues/4627

FAILED

  • basenc

    • [x] base64.pl
    • [x] basenc.pl (https://github.com/uutils/coreutils/pull/9203)
    • [ ] bounded-memory.sh (introduced with v9.9)
  • cat

    • [x] cat-self.sh (https://github.com/uutils/coreutils/pull/9122)
  • cksum

    • [x] b2sum.sh (https://github.com/uutils/coreutils/pull/9569)
    • [x] cksum-base64-untagged.sh (introduced with v9.9) (https://github.com/uutils/coreutils/pull/9344)
    • [x] cksum-c.sh (https://github.com/uutils/coreutils/pull/9511)
    • [ ] cksum.sh (https://github.com/uutils/coreutils/pull/9603)
  • cp

    • [ ] cp-a-selinux.sh
    • [ ] link_heap.sh
    • [ ] preserve-gid.sh
  • date

    • [ ] date-debug.sh
    • [ ] date-ethiopia.sh (reason: Missing translation)
    • [ ] date-iran.sh (reason: Missing translation)
    • [ ] date-locale-hour.sh (introduced with v9.9)
    • [ ] date-thailand.sh (reason: Missing translation)
    • [ ] date.pl
  • dd

    • [ ] no-allocate.sh
    • [ ] nocache_eof.sh
    • [ ] nocache_fail.sh
    • [ ] skip-seek-past-file.sh
    • [ ] stderr.sh
  • du

    • [x] files0-from.pl (https://github.com/uutils/coreutils/pull/8985)
  • env

    • [ ] env-signal-handler.sh
  • fmt

    • [ ] non-space.sh
  • fold

    • [x] fold-characters.sh (https://github.com/uutils/coreutils/pull/9126)
    • [x] fold-nbsp.sh (https://github.com/uutils/coreutils/pull/9126)
    • [ ] fold-zero-width.sh
    • [x] fold.pl (https://github.com/uutils/coreutils/pull/9328)
  • install

    • [x] basic-1.sh (https://github.com/uutils/coreutils/pull/9188)
  • ls

    • [ ] ls-misc.pl
    • [ ] stat-free-symlinks.sh
  • misc

    • [ ] close-stdout.sh
    • [ ] nohup.sh
    • [x] option-aliases.sh (https://github.com/uutils/coreutils/pull/9181)
    • [ ] stdbuf.sh
    • [ ] tee.sh
    • [x] time-style.sh (https://github.com/uutils/coreutils/pull/9252)
    • [ ] tsort.pl
    • [ ] unexpand.pl (https://github.com/uutils/coreutils/pull/9265)
    • [ ] write-errors.sh
  • numfmt

    • [ ] numfmt.pl
  • od

    • [x] od-float.sh (https://github.com/uutils/coreutils/pull/9534)
    • [x] od.pl (https://github.com/uutils/coreutils/pull/9334)
  • printf

    • [x] printf-surprise.sh (https://github.com/uutils/coreutils/pull/9133)
  • ptx

    • [ ] ptx-overrun.sh
    • [ ] ptx.pl
  • readlink

    • [x] readlink-posix.sh (https://github.com/uutils/coreutils/pull/9189)
  • rm

    • [ ] one-file-system.sh
    • [ ] rm1.sh
  • seq

    • [ ] seq-epipe.sh
  • shred

    • [ ] shred-passes.sh
  • sort

    • [x] sort-compress.sh (https://github.com/uutils/coreutils/pull/9266)
    • [ ] sort-continue.sh (https://github.com/uutils/coreutils/pull/9107)
    • [ ] sort-debug-keys.sh
    • [ ] sort-debug-warn.sh
    • [ ] sort-field-limit.sh
    • [ ] sort-float.sh
    • [ ] sort-h-thousands-sep.sh
    • [ ] sort-merge-fdlimit.sh
    • [ ] sort-month.sh
    • [ ] sort.pl
  • tac

    • [ ] tac-2-non-seekable.sh
  • tail

    • [ ] follow-name.sh
    • [ ] follow-stdin.sh
    • [ ] inotify-rotate-resources.sh
    • [ ] overlay-headers.sh
    • [ ] pid-pipe.sh
    • [ ] pipe-f.sh
    • [ ] symlink.sh
    • [ ] tail.pl
  • tty

    • [x] tty-eof.pl (https://github.com/uutils/coreutils/pull/9573)
  • wc

    • [ ] wc-cpu.sh

SKIPPED

  • cp
    • [ ] cp-mv-enotsup-xattr.sh
    • [ ] nfs-removal-race.sh
  • csplit
    • [ ] csplit-io-err.sh
  • df
    • [ ] no-mtab-status.sh
    • [ ] skip-duplicates.sh
    • [ ] skip-rootfs.sh
  • du
    • [x] bigtime.sh (https://github.com/uutils/coreutils/pull/9216)
  • id
    • [ ] gnu-zero-uids.sh
    • [ ] smack.sh
  • misc
    • [x] coreutils.sh (reason: meta test ?) (https://github.com/uutils/coreutils/pull/9572)
  • mkdir
    • [ ] smack-no-root.sh
    • [ ] smack-root.sh
    • [ ] writable-under-readonly.sh
  • mv
    • [ ] hardlink-case.sh
    • [ ] i-3.sh
  • nproc
    • [ ] nproc-quota.sh
  • numfmt
    • [ ] mb-non-utf8.sh
  • pr
    • [ ] pr-tests.pl
  • rm
    • [ ] fail-eperm.xpl
    • [ ] r-root.sh (reason: need root in the testsuite ?)
    • [ ] rm-readdir-fail.sh
  • stty (reason: testsuite env not adapted ?)
    • [ ] bad-speed.sh
    • [ ] stty-invalid.sh
    • [ ] stty-pairs.sh
    • [ ] stty-row-col.sh
    • [ ] stty.sh
  • tac
    • [ ] tac-continue.sh
  • tail
    • [ ] inotify-dir-recreate.sh
    • [ ] inotify-race.sh
    • [ ] inotify-race2.sh
  • timeout
    • [ ] timeout-group.sh

RenjiSann avatar Nov 03 '25 11:11 RenjiSann

Thanks for doing that! A few issues should be easy to fix!

sylvestre avatar Nov 03 '25 12:11 sylvestre

I’d like to work on fixing the test failures in the following test scripts:

tests/readlink/readlink-posix.sh

karanabe avatar Nov 08 '25 10:11 karanabe

please just provide PR :)

sylvestre avatar Nov 08 '25 10:11 sylvestre

For tracking: The fold zero width test: https://github.com/uutils/coreutils/pull/9274 The fold test https://github.com/uutils/coreutils/pull/9328

ChrisDryden avatar Nov 19 '25 17:11 ChrisDryden

I created a discussion issue for the ptx tests: https://github.com/uutils/coreutils/issues/9335 a CR that addresses the test but requires a substantive refactor due to the way that the original program was implemented

ChrisDryden avatar Nov 19 '25 17:11 ChrisDryden

Created a discussion SIM for the new date tests that were added in 9.8 https://github.com/uutils/coreutils/issues/9438

ChrisDryden avatar Nov 21 '25 15:11 ChrisDryden

@cakebaker now that we have some open discussions about the strategies to support different locales in Date, could we merge: https://github.com/uutils/coreutils/pull/9052 so that it would move from skip to fail?

ChrisDryden avatar Nov 23 '25 15:11 ChrisDryden

@ChrisDryden the PR got merged, and I moved the tests to "fail" in the list.

cakebaker avatar Nov 24 '25 08:11 cakebaker

Mind if we merge this one to be able to move the stty tests from skipped to fail? https://github.com/uutils/coreutils/pull/9336

Most of the fixes for those test are already in with https://github.com/uutils/coreutils/pull/9454, and were close to having 5 more passing. I have a working draft of all of the fixes with them passing here: https://github.com/uutils/coreutils/pull/9427 but am splitting that into smaller PR's with more tests

EDIT: After re-basing it doesn't seem to always recognize the pty now, needs more work EDIT2: Have a new approach that's more robust than the script approach, ready for review again EDIT3: Still having issues EDIT4: Turns out that whats happening is that when the tests fail due to STTY crashing it actually impacts the other tests since the PTY is no longer in a state thats recognized by the tests. It appears the tests need to be first fixed for them to be able to be run in the CI correctly. Might need to split them from the rest of the tests to make a unique PTY for each test

ChrisDryden avatar Nov 24 '25 16:11 ChrisDryden

@oech3 You seem to be quite familiar with the builds, was wondering if you've given any thought to the tests that require a different file system. The there's four tests that come to mind for me, the three smackfs tests and the rootfs tests. I was experimenting with using QEMU to emulate these file systems to run the tests here but https://github.com/uutils/coreutils/pull/9461 having issues with timeouts. Would you think that is the right approach for these tests or do you have any other in mind?

Another other approach could be getting private runners since there are no native GH runners that have those file system support available, maybe I can ask the Rust team at work if AWS can sponsor some few instances to run these if that's something that the uutils team is open to running on?

ChrisDryden avatar Nov 24 '25 16:11 ChrisDryden

Will some root test works without root if we use something equivalent with udisksctl mount?

oech3 avatar Nov 26 '25 16:11 oech3

Here's a fix for the rm eperm test: https://github.com/uutils/coreutils/pull/9525

ChrisDryden avatar Nov 29 '25 23:11 ChrisDryden

fail-eperm.xpl no longer exists anymore: https://github.com/coreutils/coreutils/commit/ffbd8c487 it was merged into fail2 eperm

ChrisDryden avatar Dec 01 '25 14:12 ChrisDryden

Are there any prior examples of what to do to remove a test from the automated tracking system? I am thinking about this specifically for "fail-eperm.xpl" but also the writable-under-readonly.sh has been skipped in the GNU test suite for around 18 years I think and would be useful to not have it part of the comparisons as uutils gets close to 100% completion

ChrisDryden avatar Dec 01 '25 16:12 ChrisDryden

build-gnu.sh has many hack already. Maybe, symlink true to tests what we want to skip or simply rm?

oech3 avatar Dec 01 '25 16:12 oech3

Are there any prior examples of what to do to remove a test from the automated tracking system? I am thinking about this specifically for "fail-eperm.xpl" but also the writable-under-readonly.sh has been skipped in the GNU test suite for around 18 years I think and would be useful to not have it part of the comparisons as uutils gets close to 100% completion

It's time we fixed that :) writeable-under-readonly.sh is now enabled as of https://github.com/coreutils/coreutils/commit/d5a75a2f9

pixelb avatar Dec 01 '25 21:12 pixelb

To add to the tracker for stty:

  • stty-invalid.sh https://github.com/uutils/coreutils/pull/9454
  • stty-pairs.sh https://github.com/uutils/coreutils/pull/9480
  • bad-speed.sh https://github.com/uutils/coreutils/pull/9517
  • stty-row-col.sh https://github.com/uutils/coreutils/pull/9516
  • stty.sh https://github.com/uutils/coreutils/pull/9490

Once the bad speed one is in this one will make them all run on the CI, its not a good idea to merge it until the bad-speed one doesn't time out: https://github.com/uutils/coreutils/pull/9336

ChrisDryden avatar Dec 02 '25 00:12 ChrisDryden

@pixelb Thanks! Looks like writeable-under-readonly.sh is working in the CI now! https://github.com/uutils/coreutils/pull/9539#issuecomment-3599600245

ChrisDryden avatar Dec 02 '25 00:12 ChrisDryden

@pixelb Is df/skip-rootfs.sh useless in many system too?

oech3 avatar Dec 02 '25 06:12 oech3

@pixelb Is df/skip-rootfs.sh useless in many system too?

Well it's useful for some (older) setups

pixelb avatar Dec 02 '25 13:12 pixelb

FULL_PARTITION_TMPDIR not defined looks easy to fix. But high cost to run on this CI?

oech3 avatar Dec 05 '25 12:12 oech3

FULL_PARTITION_TMPDIR not defined looks easy to fix. But high cost to run on this CI?

@oech3 : I tried it by creating a small filesystem and loop mounting it. This could also be done CI. But then the tests/tac/tac-continue test fails for uutils. Reason is that the test expects tac to write to a temporary file. It looks like uutils implementation doesn't need and doesn't create this temporary file.

martinkunkel2 avatar Dec 06 '25 21:12 martinkunkel2

It looks like uutils implementation doesn't need and doesn't create this temporary file.

Would you send a patch to drop the assumption as a PR? Examples are: https://github.com/uutils/coreutils/tree/main/util/gnu-patches https://github.com/uutils/coreutils/blob/main/util/gnu-patches/series

oech3 avatar Dec 07 '25 06:12 oech3

Cannot ubuntu-latest use LD_PRELOAD?

oech3 avatar Dec 08 '25 18:12 oech3

My understanding is that it can but it relies on the same libc call being used in the utility to be able to override it. I believe we already have tests that use this successfully, I think the bigger issue is a bunch of the tests that we skip that have LD_PRELOAD are also skipped.

A way which would be a bit janky would be to use sed to modify the implementation before the test by adding something like this:

#[no_mangle]
pub extern "C" fn example() {
    // Empty on purpose; used only as a gdb breakpoint target.
}

fn function_to_break_on() -> Result<()> {
    // Breakpoint for gdb:
    unsafe { example() }

That matches the name of the function that the test expects such as in https://github.com/coreutils/coreutils/blob/master/tests/rm/r-root.sh its the function called excise. Probably would be better to prove it in a simpler example, didn't realize until halfway through that there was a real possibility that this could nuke my instance.

ChrisDryden avatar Dec 08 '25 18:12 ChrisDryden

it relies on the same libc call being used in the utility to be able to override it.

Do you mean glibc rustc use != glibc test suite use now?

oech3 avatar Dec 08 '25 19:12 oech3

Not that its a different glibc but that the functions that the uutilities use are actually different in some places, for example in rm-readdir-fail.sh its trying to override readdir but we use readdir64_r in our implementation so thats why the test fails, for that one I have a working patch locally where you change the overriden function to readdir64_r and the test passes after updating the error messaging.

ChrisDryden avatar Dec 08 '25 19:12 ChrisDryden

uutils use glibc funcs via crates. So unpredictable what funcs are used. Possible solution is patching GNU test suite to override glibc funcs only?

Both solutions are unrealistic for me.

oech3 avatar Dec 08 '25 19:12 oech3

And GNU LD_PRELOAD test suite does not support heavily optimized static coreutils binaries?

oech3 avatar Dec 08 '25 19:12 oech3

@oech3 Here's an example for that rm-readdir-fail.sh and how we could patch it, to make the tests work. https://github.com/uutils/coreutils/pull/9604 it works with the LD_PRELOAD and passes the tests, just it requires us to have an understanding of what nix is doing under the hood when making the patches to the function names.

ChrisDryden avatar Dec 08 '25 20:12 ChrisDryden