Java and security bits

Tuesday May 29, 2007

Security Unit and Regression Tests on OpenJDK

One thing I forgot to mention in my earlier entry is that apart from the implementation source code we also have a large number of unit and regression tests available on OpenJDK. For security alone, it is more than 400 separate tests, with each test often checking multiple conditions. In total there are more than 3500 unit and regression tests on OpenJDK today and the number is only growing as we write new tests and work to make more existing tests available.

These tests are in the j2se/test directory with a directory hierarchy that (usually) mirrors the source files being tested. That means for security most of the tests are in test/java/security and test/sun/security. You can run them using the jtreg harness, which predates JUnit & co.

I don't think I need to explain why tests are important, but I have to quote a sentence I first heard from Bill Moore: If it has not been not tested, it does not work. No ifs, buts, or maybes. Even if something happened to work initially, when there is no test, it will eventually get broken. So make sure to include a test when you decide to contribute code.

Comments:

Post a Comment:
Comments are closed for this entry.

Calendar

Feeds

Links

Recent Posts

Referers