One of the things that I worked on during the workshop this year was setting up a test suite harness, towards which I hope to move OpenAFS in the future (although this will take some time).
Right now, we have a variety of test programs and scripts which are scattered throughout the tree, largely not built by default, and almost never run by default. Some of them are just in the same directories with the regular source files, some of them are in tests subdirectories of separate source directories, and there's a pile of stuff in src/tests which doesn't currently work. We now have a top-level tests directory, and my goal is to move all testing scripts and programs from everywhere else in the tree into that directory. I'd also like to see all new tests go there, rather than into the various other places they've gone. I moved one set of tests from src/util into that directory as an example. More will be coming. The test suite is set up using C TAP Harness as the test suite driver. This means that the test harness will run a list of programs and expect those programs to produce output in TAP format (Test Anything Protocol, the same format used for testing everything Perl). This makes test cases in Perl very easy to write, since one can just use the existing Test::More Perl library and all of its functions. To support writing tests in C and shell, TAP libraries for both of those languages are in tests/tap and the existing tests/util/ktime-t.c test demonstrates how to use the C library. tests/README and tests/HOWTO contain additional information about how to use the test harness and how to write tests, including how to add more library functions to support common operations in OpenAFS tests. Please let me know if you have any questions, and I'll also try to review any test-related code to help with integrating it into the new testing harness. The new harness is now run by default if one runs make check in the tree, although at present very little is tested by it. -- Russ Allbery ([email protected]) <http://www.eyrie.org/~eagle/> _______________________________________________ OpenAFS-devel mailing list [email protected] https://lists.openafs.org/mailman/listinfo/openafs-devel
