[U-Boot] [PATCH v3 24/72] dm: test: Move test running code into a separate function