Re: [PATCH blktests] nvmeof-mp/001: Set expected count properly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I also met this failure during my previous testing, thanks.

Reviewed-by: Yi Zhang <yi.zhang@xxxxxxxxxx>

On Wed, May 18, 2022 at 11:44 AM Xiao Yang <yangx.jy@xxxxxxxxxxx> 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@xxxxxxxxxxx>
> ---
>  tests/nvmeof-mp/001     | 7 +++++--
>  tests/nvmeof-mp/001.out | 1 -
>  2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/tests/nvmeof-mp/001 b/tests/nvmeof-mp/001
> index f3e6394..82cb298 100755
> --- a/tests/nvmeof-mp/001
> +++ b/tests/nvmeof-mp/001
> @@ -18,7 +18,11 @@ 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
> @@ -27,7 +31,6 @@ wait_for_devices() {
>                 sleep .1
>         done
>         echo "count_devices(): $devices <> $expected" >>"$FULL"
> -       echo "count_devices(): $devices <> $expected"
>         [ "$devices" -ge $expected ]
>  }
>
> 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
> --
> 2.34.1
>
>
>


-- 
Best Regards,
  Yi Zhang




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux