add some test and improve kernel creation code
Authored by: gerddie 2007-04-10
Parent: [r319]
Child: [r321]