From 56ad1cbea45800746eb469dd022bb09d21ffa99b Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Mon, 9 Jul 2018 15:40:16 -0700 Subject: [PATCH] ut/lvol: remove bogus lvol_op_comp test This is passing a struct lvol_task that is not nested inside a bdev_io context, which is assumed by lvol_op_comp() in the actual lvol code. There is no problem currently, since lvol_op_comp() happens to not dereference the bdev_io except inside of mocked functions and inside a SPDK_INFOLOG() that does not get executed in the unit tests right now, but this would break if the lvol code ever actually used the bdev_io pointer. Change-Id: Ic3b67f4ecff47e5a98a5be8a83c2524573113aa9 Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/418735 Tested-by: SPDK Automated Test System Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- test/unit/lib/bdev/vbdev_lvol.c/vbdev_lvol_ut.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/test/unit/lib/bdev/vbdev_lvol.c/vbdev_lvol_ut.c b/test/unit/lib/bdev/vbdev_lvol.c/vbdev_lvol_ut.c index c07360987..002f62b22 100644 --- a/test/unit/lib/bdev/vbdev_lvol.c/vbdev_lvol_ut.c +++ b/test/unit/lib/bdev/vbdev_lvol.c/vbdev_lvol_ut.c @@ -1330,15 +1330,6 @@ ut_vbdev_lvol_io_type_supported(void) free(lvol); } -static void -ut_lvol_op_comp(void) -{ - struct lvol_task task; - - lvol_op_comp(&task, 1); - CU_ASSERT(task.status == SPDK_BDEV_IO_STATUS_FAILED); -} - static void ut_lvol_read_write(void) { @@ -1468,7 +1459,6 @@ int main(int argc, char **argv) CU_add_test(suite, "lvol_hotremove", ut_lvol_hotremove) == NULL || CU_add_test(suite, "ut_vbdev_lvol_get_io_channel", ut_vbdev_lvol_get_io_channel) == NULL || CU_add_test(suite, "ut_vbdev_lvol_io_type_supported", ut_vbdev_lvol_io_type_supported) == NULL || - CU_add_test(suite, "ut_lvol_op_comp", ut_lvol_op_comp) == NULL || CU_add_test(suite, "ut_lvol_read_write", ut_lvol_read_write) == NULL || CU_add_test(suite, "ut_vbdev_lvol_submit_request", ut_vbdev_lvol_submit_request) == NULL || CU_add_test(suite, "lvol_examine", ut_lvol_examine) == NULL ||