Loading
ut/bdev/nvme: cover ctrlr register vs aer race
This check improves coverage for the situation where nvme_ctrlr_aer_cb is called before the controller is registered as an I/O device. A potential error can occur when the AER completion is received but the initial ANA log page is not (see nvme_ctrlr_init_ana_log_page_done), so this test simulates a similar scenario. Without the fix (bdev/nvme: prevent ns populate before ctrlr registration) this test fails with assertion checking if callback is set. Without assertion and actual AER callback being invoked it hits > thread.c:2375:spdk_get_io_channel: *ERROR*: could not find io_device 0x513000009880 > bdev_nvme.c: 953:_bdev_nvme_add_io_path: *ERROR*: [nqn.2016-06.io.spdk:cnode1,192.168.100.9:4420,cntlid:31,nsid:1,ns:0x50b000001430,nbdev:0x517000005100] Failed to alloc io_channel. > bdev_nvme.c:4999:bdev_nvme_add_io_path: *ERROR*: [nqn.2016-06.io.spdk:cnode1,192.168.100.9:4420,cntlid:31,nsid:1,ns:0x50b000001430,nbdev:0x517000005100] Failed to add I/O path to bdev_channel dynamically. Change-Id: Id6f8cf4c5c1f1ae901a36abad2811c3ec627a860 Signed-off-by:Jacek Kalwas <jacek.kalwas@nutanix.com> Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26938 Community-CI: Mellanox Build Bot Tested-by:
SPDK Automated Test System <spdkbot@gmail.com> Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by:
Tomasz Zawadzki <tomasz@tzawadzki.com>