[PATCH v2 41/45] dm: core: Create a function to get a live tree in a test