3

Are there any test suites available for the small programs usually shipped with the operating system? Specifically, programs like cp, cat, dd etc (anything in /bin/) on Linux or BSD; OpenBSD being the preferred option. I know that md5 has a testing script built in however I can't find any others. The regression testing suite from OpenBSD doesn't have tests for all the utilities.

  • What is it you'd like to test? – Kusalananda Jul 19 at 7:07
  • I'm writing custom versions of a few coreutils with the same interface. – user3927312 Jul 20 at 16:06
4

The POSIX test suites provide full coverage of the standard utilities, which won't be everything in /bin on most systems. It will cover all of the tools you list, however. As well as only covering the standard utilities, the suite will only cover their specified behaviours, and any extensions above POSIX would be ignored (at best).

You would want the VSC suite, "for Shell and Utilities", rather than the one for system interfaces. These are available for a fee to trademark licensees, but you can get a time-limited licence as an open-source project implementing the standard for free with what doesn't appear to be an onerous licence agreement.

There are open suites for much of the system interfaces, but I'm not aware of one for the utilities (and the ones I know of are quite dated as well).

  • 1
    The POSIX test suite seems like a good fit. Also FreeBSD ships with a test suite and it might be closest to the utilities for OpenBSD (wiki.freebsd.org/TestSuite). I'm trying to figure out how I can pull that into OpenBSD. – user3927312 Jul 19 at 0:39
2

On GNU/Linux, these utilities are a part of the coreutils, the test suite can be found in the source repository under tests.

Note: Linux is just the kernel, the rest of the system is developed by different entities, such as GNU.

GNU is an operating system that is free software...consists of GNU packages (programs specifically released by the GNU Project) as well as free software released by third parties.

On BSD, the whole operating system is developed together in one repository.

For OpenBSD, there do not appear to be any tests for these utilities in their source repository.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.