[PATCH v5 12/41] test: Create pre/post-run functions