[PATCH v3 5/7] iommufd/selftest: Add a helper to get test device