Update tests for du, ls, tail
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
I agree, I think it's best if we rely on external tools as little as possible.
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).
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.