coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

Update tests for du, ls, tail

Open shinhs0506 opened this issue 2 years ago • 3 comments

Some tests use expected_result which compares against, possibly outdated, local GNU coreutils installation

At the moment, Ubuntu-latest (22.04) in our CI/CD installs version 8.3x

shinhs0506 avatar Jun 26 '23 00:06 shinhs0506

I agree, I think it's best if we rely on external tools as little as possible.

tertsdiepraam avatar Jun 26 '23 14:06 tertsdiepraam

One difficulty that I ran into on OpenBSD is that any command that tries to display file size on disk (du, ls, etc) becomes hard to test across different OSes using approaches other than direct output comparison of the GNU coreutils.

Specifically on OpenBSD the filesystem blocksize and fragment size are "dynamic" (determined at install time based on the size of the install partition). These different filesystem settings result in different expected output. I'm not sure if there is any easy to solution to this (although I am trying to learn more about what options there may be).

n1000 avatar Oct 26 '23 06:10 n1000

I would classify the issue as wontfix, because sadly we don't really have the choice to refer to the installed reference when it comes to system-aware checks. One workaround would be to create a tool that gets and processes the information by itself, but that would pretty much mean implementing the very util we are testing.

RenjiSann avatar Feb 27 '25 23:02 RenjiSann