Weblog

All | General | Java | Music
« A customer would... | Main
20070928 Friday September 28, 2007

lofi tests, where art thou?

One of the unwritten rules of test development is "don't reinvent the wheel". When you take on a project, it's tempting to start writing tests from scratch based on how you'd approach the problem. However, unless what you're working on is completely new from the ground up, chances are someone somewhere wrote some tests before the original functionality was checked in. Even if they're not usable in their current form, getting a hold of old tests can shorten your test development time considerably. You might be able to port them, or at the very least borrow concepts that will let you work faster.

However, sometimes you run into a brick wall. I've recently been assigned to lead the test effort for the Solaris Slim Install project (it's being done in the open, look under the "Caiman" umbrella on the Opensolaris web site). One of the components is the addition of compression and on-the-fly decompression to lofi (the loopback filesystem). lofi's been around for quite a while, so I set about searching for existing tests. Unfortunately, I've come up empty. I've poked around in the various test repositories, asked people who should know, and even tracked down the original project developer (who's still at Sun). But as far as coming up with anything that tests lofi specifically (as opposed to general file system tests that could be used on a mounted lofi volume) I've uncovered nada.

So, assuming nothing pops up within the next few days, I have to decide how much in the way of lofi regression tests I should write as part of this new project. In an ideal world, I'd fill this hole by writing a comprehensive regression test suite for the existing lofi functionality before starting on tests for the enhance functionality. But, as ever, time is short and we need tests for the new functionality delivered quickly. So anything I write to verify that the new code doesn't break the existing functionality will most likely take the form of cursory sanity checks.

Unless someone out there comes to my rescue with a pointer to a lofi test suite...


Fast forward a few days...

A conversation with the Solaris PIT (Pre-Integration Test) group has revealed that, while they also are unaware of a lofi-specific test suite, that many of the existing test suites do use lofiadm(1M). A dedicated lofi test suite would be preferable, but at least lofi does get exercised a reasonable amount by other tests. So we do have some means of testing for regressions without having to write a comprehensive lofi suite. Phew! ( Sep 28 2007, 10:40:19 AM PDT ) Permalink

Comments:

Post a Comment:

Comments are closed for this entry.

Calendar

RSS Feeds

Search

Links

Navigation

Referers