[dev] Testing suckless programs

From: Thomas Levine <__AT_thomaslevine.com>
Date: Fri, 29 Apr 2016 04:21:25 +0000

Hi,

I originally came across suckless about six years ago when I was looking
at IRC clients and thus discovered ii. Since then I have periodically
updated myself on suckless happenings and have always held the software
in high regard. But I had never thought to contribute anything because
I have pretty much never written C.

I have been thinking about how I might contribute without learning a lot
of C, and writing automated tests seems like a good thing. Many of the
tools could be tested in sh instead, and this might even be preferable
in some cases. And I probably can write decent tests in C without being
particularly good at C because the test cases can be relatively
straightforward. Also, the intended behaviors of suckless programs are
usually obvious because they are so simple and well documented, so I
think I understand them well enough to write appropriate tests.

1. Tell me if you would like to see tests for any particular
   project that you work on, and I might eventually write them.
2. Have you previously considered having someone who knows very
   little C write tests for suckless programs?

Tom

Postscript: I might also not write tests for any particular project.
Because suckless programs are so simple in both implementation and
interface, I suspect that maintaining a test suite would often provide
little benefit compared to informal documentation that discusses the
intended behavior of the program and mentions edge cases; I suspect that
a program would need to meet at least one of the following criteria in
order for automated testing to be very helpful.

1. The user interface is complex.
2. Supporting different environments is a large concern.
3. People have managed to break already-documented things by accident
   in patches.

I even have my doubts that testing would be that helpful here, though,
because of what I see in sbase. I consider sbase to have a relatively
complex user interface, but it is quite developed and lacks automated
tests; it has apparently done fine without automated tests.
Received on Fri Apr 29 2016 - 06:21:25 CEST

This archive was generated by hypermail 2.3.0 : Fri Apr 29 2016 - 06:24:11 CEST