test: use new on_exit stuff