[PATCH v6 06/19] test: Create a common function to get the config