@@ -15,7 +15,8 @@ TIMED=1
CAN_BE_ZONED=1
requires() {
- _have_module_param null_blk blocking && _have_fio
+ _have_module_param null_blk blocking
+ _have_fio
}
test() {
@@ -12,7 +12,8 @@ TIMED=1
CAN_BE_ZONED=1
requires() {
- _have_cpu_hotplug && _have_fio
+ _have_cpu_hotplug
+ _have_fio
}
test_device() {
@@ -15,7 +15,8 @@ TIMED=1
CAN_BE_ZONED=1
requires() {
- _have_module_param null_blk shared_tags && _have_fio
+ _have_module_param null_blk shared_tags
+ _have_fio
}
run_fio_job() {
@@ -24,7 +24,8 @@ pci_dev_mounted() {
}
requires() {
- _have_fio && _have_program setpci
+ _have_fio
+ _have_program setpci
}
device_requires() {
@@ -11,7 +11,8 @@ QUICK=1
CAN_BE_ZONED=1
requires() {
- _have_fio && _have_program setpci
+ _have_fio
+ _have_program setpci
}
device_requires() {
@@ -14,7 +14,8 @@ QUICK=1
CAN_BE_ZONED=1
requires() {
- _have_driver null_blk && _have_fio
+ _have_driver null_blk
+ _have_fio
}
test() {
@@ -11,7 +11,8 @@ DESCRIPTION="trigger blk_mq_update_nr_hw_queues()"
QUICK=1
requires() {
- _have_fio && _have_driver null_blk
+ _have_fio
+ _have_driver null_blk
}
modify_nr_hw_queues() {
@@ -15,7 +15,9 @@ DESCRIPTION="try various loop device block sizes"
QUICK=1
requires() {
- _have_program xfs_io && _have_src_program loblksize && _have_loop_set_block_size
+ _have_program xfs_io
+ _have_src_program loblksize
+ _have_loop_set_block_size
}
test() {
@@ -11,7 +11,9 @@ DESCRIPTION="resize a connected nbd device"
QUICK=1
requires() {
- _have_nbd && _have_program parted && _have_src_program nbdsetsize
+ _have_nbd
+ _have_program parted
+ _have_src_program nbdsetsize
}
test() {
@@ -17,7 +17,8 @@ DESCRIPTION="tests on partition handling for an nbd device"
QUICK=1
requires() {
- _have_nbd_netlink && _have_program parted
+ _have_nbd_netlink
+ _have_program parted
}
test() {
@@ -11,7 +11,8 @@ DESCRIPTION="mount/unmount concurrently with NBD_CLEAR_SOCK"
QUICK=1
requires() {
- _have_nbd && _have_src_program mount_clear_sock
+ _have_nbd
+ _have_src_program mount_clear_sock
}
test() {
@@ -12,7 +12,8 @@ QUICK=1
requires() {
_nvme_requires
- _have_loop && _have_module_param_value nvme_core multipath Y
+ _have_loop
+ _have_module_param_value nvme_core multipath Y
_require_nvme_trtype_is_fabrics
}
@@ -11,7 +11,8 @@ TIMED=1
requires() {
_nvme_requires
- _have_fio && _have_loop
+ _have_fio
+ _have_loop
_require_nvme_trtype_is_fabrics
}
@@ -14,8 +14,8 @@ QUICK=1
requires() {
_have_program nvme
- _have_kernel_option FAULT_INJECTION && \
- _have_kernel_option FAULT_INJECTION_DEBUG_FS
+ _have_kernel_option FAULT_INJECTION
+ _have_kernel_option FAULT_INJECTION_DEBUG_FS
}
device_requires() {
@@ -30,7 +30,9 @@ requires() {
_have_fio
_have_program ip
_have_program ethtool
- _have_kernel_source && _have_program python3 && have_netlink_cli
+ _have_kernel_source
+ _have_program python3
+ have_netlink_cli
have_iface
}
@@ -11,7 +11,8 @@ DESCRIPTION="try triggering a kernel GPF with 0 byte SG reads"
QUICK=1
requires() {
- _have_scsi_generic && _have_src_program sg/syzkaller1
+ _have_scsi_generic
+ _have_src_program sg/syzkaller1
}
test_device() {
@@ -11,7 +11,8 @@ DESCRIPTION="perform a SG_DXFER_FROM_DEV from the /dev/sg read-write interface"
QUICK=1
requires() {
- _have_scsi_generic && _have_src_program sg/dxfer-from-dev
+ _have_scsi_generic
+ _have_src_program sg/dxfer-from-dev
}
test_device() {
The '&&' operator should only be used when the second operand is dependent on the first. In the context of requires() functions, we prefer to evaluate all conditions independently to display all SKIP_REASONS at once. This change separates the conditions into individual lines to ensure each condition is evaluated regardless of the others. After this patch, only 2 '&&' remain $ git grep -wl 'requires()' | xargs -I {} sed -n '/^requires() *{/,/}/p' {} | grep '&&' _have_module nvme_tcp && _have_module_param nvme_tcp ddp_offload _have_program mkfs.btrfs && have_good_mkfs_btrfs Signed-off-by: Li Zhijian <lizhijian@fujitsu.com> --- tests/block/006 | 3 ++- tests/block/008 | 3 ++- tests/block/010 | 3 ++- tests/block/011 | 3 ++- tests/block/019 | 3 ++- tests/block/020 | 3 ++- tests/block/029 | 3 ++- tests/loop/002 | 4 +++- tests/nbd/001 | 4 +++- tests/nbd/002 | 3 ++- tests/nbd/003 | 3 ++- tests/nvme/005 | 3 ++- tests/nvme/010 | 3 ++- tests/nvme/039 | 4 ++-- tests/nvme/056 | 4 +++- tests/scsi/001 | 3 ++- tests/scsi/002 | 3 ++- 17 files changed, 37 insertions(+), 18 deletions(-)