From 723adbaf325fd57f7ffbbd78e699420e59361e34 Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Mon, 13 Dec 2021 10:36:32 -0500 Subject: [PATCH] UT/vfio-user: fix clang-12 compilation error Add missed STUBs. Change-Id: I20989bf4ea66720d62f8ecc9668bb8f74e459666 Signed-off-by: Changpeng Liu Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10638 Tested-by: SPDK CI Jenkins Reviewed-by: Dong Yi Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- test/unit/lib/nvmf/vfio_user.c/vfio_user_ut.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/unit/lib/nvmf/vfio_user.c/vfio_user_ut.c b/test/unit/lib/nvmf/vfio_user.c/vfio_user_ut.c index 494f744226..f0fa7ce758 100644 --- a/test/unit/lib/nvmf/vfio_user.c/vfio_user_ut.c +++ b/test/unit/lib/nvmf/vfio_user.c/vfio_user_ut.c @@ -53,6 +53,11 @@ DEFINE_STUB(spdk_bdev_get_block_size, uint32_t, (const struct spdk_bdev *bdev), DEFINE_STUB_V(nvmf_ctrlr_abort_aer, (struct spdk_nvmf_ctrlr *ctrlr)); DEFINE_STUB(nvmf_ctrlr_async_event_error_event, int, (struct spdk_nvmf_ctrlr *ctrlr, union spdk_nvme_async_event_completion event), 0); +DEFINE_STUB(spdk_nvme_transport_id_adrfam_str, const char *, (enum spdk_nvmf_adrfam adrfam), NULL); +DEFINE_STUB(spdk_nvmf_qpair_get_listen_trid, int, (struct spdk_nvmf_qpair *qpair, + struct spdk_nvme_transport_id *trid), 0); +DEFINE_STUB(spdk_nvme_transport_id_compare, int, (const struct spdk_nvme_transport_id *trid1, + const struct spdk_nvme_transport_id *trid2), 0); static void * gpa_to_vva(void *prv, uint64_t addr, uint64_t len, int prot)