port some tests to kernel error handling