t5305: move cleanup into test block