tests: Fix tests that were defect

* I used pexpect instead of when expect script was not working expect, since
  TCL confuses me
* I deleted the thread_exit test since it was completely invalid