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