Re: [PATCH blktests v4 05/17] common/rc: introduce _set_combined_conditions

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

 



On Sat, May 04, 2024 at 05:14:36PM GMT, Shin'ichiro Kawasaki wrote:
> When the test case has the "set_conditions" hook, blktests repeats the
> test case multiple times. This allows repeating the test changing one
> condition parameter. However, it is often desired to run the test for
> multiple condition parameters. For example, some test cases in the nvme
> test group are required to run for different "transport types" as well
> as different "backend block device types". In this case, it is required
> to iterate over all combinations of the two condition parameters
> "transport types" and "backend block device types".
> 
> To cover such iteration for the multiple condition parameters, introduce
> the helper function _set_combined_conditions. It takes multiple
> _set_conditions hooks as its arguments, combines them and works as the
> set_conditions() hook. When the hook x iterates x1 and x2, and the other
> hook y iterates y1 and y2, the function iterates (x1, y1), (x2, y1),
> (x1, y2) and (x2, y2). In other words, it iterates over the Cartesian
> product of the given condition sets.
> 
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>

I learned a bit on bash variable expansion today :)

Looks good.

Reviewed-by: Daniel Wagner <dwagner@xxxxxxx>




[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