[PATCH v3 11/41] test: Create pre/post-run functions