test/vhost: close bdev before claim for lvs
The original implementation of bdev claims allows a module to establish an exclusive writer claim on a bdev that has other descriptors open for writing. This is arguably a bug. With claims v2, this bug does not exist. The conversion of spdk_bs_bdev_claim() to claims v2 exposes this bug in the vhost_negative test. This patch removes an extraneous vhost_scsi_controller_add_target RPC call that left Malloc0 open read-write while bdev_lvol_create_lvstore tries to create an lvstore on Malloc0. Signed-off-by: Mike Gerdts <mgerdts@nvidia.com> Change-Id: I963e210e1bc033d8720e240760004ed8aef7fda3 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16169 Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
This commit is contained in:
parent
86bbcdb8f6
commit
486651f790
@ -2,6 +2,7 @@
|
|||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
# Copyright (C) 2017 Intel Corporation
|
# Copyright (C) 2017 Intel Corporation
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
# Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||||
#
|
#
|
||||||
testdir=$(readlink -f $(dirname $0))
|
testdir=$(readlink -f $(dirname $0))
|
||||||
rootdir=$(readlink -f $testdir/../../..)
|
rootdir=$(readlink -f $testdir/../../..)
|
||||||
@ -171,9 +172,6 @@ if $rpc_py vhost_scsi_controller_remove_target naa.0 8 > /dev/null; then
|
|||||||
error "Removing device 8 from controller naa.0 succeeded, but it shouldn't"
|
error "Removing device 8 from controller naa.0 succeeded, but it shouldn't"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
notice "Re-adding device 0 to naa.0"
|
|
||||||
$rpc_py vhost_scsi_controller_add_target naa.0 0 Malloc0
|
|
||||||
|
|
||||||
# BLK
|
# BLK
|
||||||
notice "Trying to create block controller with incorrect cpumask outside of application cpumask"
|
notice "Trying to create block controller with incorrect cpumask outside of application cpumask"
|
||||||
if $rpc_py vhost_create_blk_controller vhost.invalid.cpumask Malloc0 --cpumask 0xf0; then
|
if $rpc_py vhost_create_blk_controller vhost.invalid.cpumask Malloc0 --cpumask 0xf0; then
|
||||||
|
Loading…
Reference in New Issue
Block a user