[PATCH v3 10/17] iommufd/selftest: Add a helper to get test device