lib/tests: add a timeout/resume test