Cut out tap test code from selftest.