[PATCH v4 07/19] test: Create a common function to get the config