Message ID | 20220521123020.90046-1-yangx.jy@fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [blktests,v2] nvmeof-mp/001: Set expected count properly | expand |
On May 21, 2022 / 20:30, Xiao Yang wrote: > The number of block devices will increase according > to the number of RDMA-capable NICs. > For example, nvmeof-mp/001 with two RDMA-capable NICs > got the following error: > ------------------------------------- > Configured NVMe target driver > -count_devices(): 1 <> 1 > +count_devices(): 2 <> 1 > Passed > ------------------------------------- > > Set expected count properly by calculating the number > of RDMA-capable NICs. > > Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com> Hi Xiao, thanks for the fix. Looks good to me. Reviewed-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
On May 21, 2022 / 20:30, Xiao Yang wrote: > The number of block devices will increase according > to the number of RDMA-capable NICs. > For example, nvmeof-mp/001 with two RDMA-capable NICs > got the following error: > ------------------------------------- > Configured NVMe target driver > -count_devices(): 1 <> 1 > +count_devices(): 2 <> 1 > Passed > ------------------------------------- > > Set expected count properly by calculating the number > of RDMA-capable NICs. > > Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com> Thanks, applied.
diff --git a/tests/nvmeof-mp/001 b/tests/nvmeof-mp/001 index f3e6394..70a4455 100755 --- a/tests/nvmeof-mp/001 +++ b/tests/nvmeof-mp/001 @@ -18,17 +18,20 @@ count_devices() { } wait_for_devices() { - local expected=1 i devices + local expected=0 i devices + + for i in $(rdma_network_interfaces); do + ((expected++)) + done use_blk_mq y || return $? for ((i=0;i<100;i++)); do devices=$(count_devices) - [ "$devices" -ge $expected ] && break + [ "$devices" -ge "$expected" ] && break sleep .1 done echo "count_devices(): $devices <> $expected" >>"$FULL" - echo "count_devices(): $devices <> $expected" - [ "$devices" -ge $expected ] + [ "$devices" -ge "$expected" ] } test() { diff --git a/tests/nvmeof-mp/001.out b/tests/nvmeof-mp/001.out index 2ce8d17..a7d4cb9 100644 --- a/tests/nvmeof-mp/001.out +++ b/tests/nvmeof-mp/001.out @@ -1,3 +1,2 @@ Configured NVMe target driver -count_devices(): 1 <> 1 Passed
The number of block devices will increase according to the number of RDMA-capable NICs. For example, nvmeof-mp/001 with two RDMA-capable NICs got the following error: ------------------------------------- Configured NVMe target driver -count_devices(): 1 <> 1 +count_devices(): 2 <> 1 Passed ------------------------------------- Set expected count properly by calculating the number of RDMA-capable NICs. Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com> --- tests/nvmeof-mp/001 | 11 +++++++---- tests/nvmeof-mp/001.out | 1 - 2 files changed, 7 insertions(+), 5 deletions(-)