Re: [PATCH blktests 05/11] nvme/rc: introduce NVMET_TR_TYPES

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

 



On Apr 16, 2024 / 05:20, Shinichiro Kawasaki wrote:
> On Apr 11, 2024 / 20:12, Shin'ichiro Kawasaki wrote:
> > Some of the test cases in nvme test group can be run under various nvme
> > target transport types. The configuration parameter nvme_trtype
> > specifies the transport to use. But this configuration method has two
> > drawbacks. Firstly, the blktests check script needs to be invoked
> > multiple times to cover multiple transport types. Secondly, the test
> > cases irrelevant to the transport types are executed exactly same
> > conditions in the multiple blktests runs.
> > 
> > To avoid the drawbacks, introduce new configuration parameter
> > NVMET_TR_TYPES. This is an array, and multiple transport types can
> > be set like:
> > 
> >     NVMET_TR_TYPES=(loop tcp)
> > 
> > Also introduce _nvmet_set_nvme_trtype() which can be called from the
> > set_conditions() hook of the transport type dependent test cases.
> > Blktests will repeat the test case as many as the number of elements in
> > NVMET_TR_TYPES, and set nvme_trtype for each test case run.
> > 
> > Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>
> > ---
> >  Documentation/running-tests.md |  6 +++++-
> >  tests/nvme/rc                  | 30 +++++++++++++++++++++++++++++-
> >  2 files changed, 34 insertions(+), 2 deletions(-)
> > 
> > diff --git a/Documentation/running-tests.md b/Documentation/running-tests.md
> > index ae80860..ede3a81 100644
> > --- a/Documentation/running-tests.md
> > +++ b/Documentation/running-tests.md
> > @@ -102,8 +102,12 @@ RUN_ZONED_TESTS=1
> >  
> >  The NVMe tests can be additionally parameterized via environment variables.
> >  
> > +- NVMET_TR_TYPES (array)
> > +  Set up NVME target backends with the specified transport.
> > +  Valid elements are 'loop', 'tcp', 'rdma' and 'fc'. Default value is '(loop)'.
> >  - nvme_trtype: 'loop' (default), 'tcp', 'rdma' and 'fc'
> > -  Run the tests with the given transport.
> > +  Run the tests with the given transport. This parameter is still usable but
> > +  replaced with NVMET_TR_TYPES. Use NVMET_TR_TYPES instead.
> 
> I noticed that nvme_trtype is still useful. nvmet_trtypes can be set in both in
> the config file and the command line. But NVMET_TRTYPES can be set in the config
> file only, because bash does not support setting arrays in the command line.
> 
>   # nvme_trtypes=rdma ./check nvme/006     ... works
>   # NVMET_TRTYPES=(rdma) ./check nvme/006  ... does not work
> 
> I will modify the descriptions above in the v2 series to note that both
> nvme_trtype and NVMET_TRTYPES are supported and usable.

I rethought this. Now I think it is bad that NVMET_TRTYPES can not be specified
in command lines. To avoid this drawback, I think it's the better to change
NVME_TRTYPES from an array to a variable with multiple items separated with
spaces. For example, three types can be specified to NVMET_TRTYPES like this:

   NVMET_TRTYPES="loop tcp rdma"

NVMET_BLKDEV_TYPES has the same restriction then I will change it also from an
array to a variable in same manner. I will send out v2 soon with this change.

Daniel,

I assume this change is fine for your use case. If it is not the case, please
let me know.




[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