[PATCH 03/43] test: Add functions to init and uninit the test state