Fix linemode, add timeout test and make interact test timeout