move periodic os test to kernel and fix it