]> www.infradead.org Git - users/hch/blktests.git/log
users/hch/blktests.git
6 years agoblktests: Use old variable check for Bash <4.2
Jon Derrick [Fri, 3 May 2019 18:28:28 +0000 (12:28 -0600)]
blktests: Use old variable check for Bash <4.2

Bash 4.2 and above supports -v variable checks, which returns true for
set or null. Instead use an older bashism that is compatible with bash
4.1 and earlier but only returns true if the variable is set non-null.
This inherently adds a sanity check in case of null variables.

Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
6 years agoblock/028: check if T10 verification fails
Ming Lei [Fri, 26 Apr 2019 02:39:37 +0000 (10:39 +0800)]
block/028: check if T10 verification fails

When T10 verification fails, the error code of BLK_STS_PROTECTION
may not be propagated to user space, see mpage_end_io().

So seems the only reliable way for detecting the failure is to
check dmesg.

Cc: Martin K . Petersen <martin.petersen@oracle.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
[Omar: use DMESG_FILTER]
Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agonvme/012 & 013: avoid extremely slow xfs IO
Ming Lei [Mon, 15 Apr 2019 01:22:29 +0000 (09:22 +0800)]
nvme/012 & 013: avoid extremely slow xfs IO

It is observed that nvme/012 may take ~17 minutes to complete on aarch64,
even worse it may trigger IO timeout on nvme-loop.

Eric and Dave replied that it is because of too small log size on small
disk.

So pass '-l size=32m' to avoid the issue.

With this patch, nvme/012 can be completed in one minute.

Cc: Eric Sandeen <esandeen@redhat.com>
Cc: Dave Chinner <dchinner@redhat.com>
Cc: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org
Signed-off-by: Ming Lei <ming.lei@redhat.com>
6 years agoblock/020: dynamically change iodepth if test aio-nr lager than aio-max-nr
Xiao Liang [Sat, 6 Apr 2019 14:27:22 +0000 (22:27 +0800)]
block/020: dynamically change iodepth if test aio-nr lager than aio-max-nr

When system has large count of cpus(eg. 96), the test failed as aio-nr over
aio-max-nr limitation.

This patch continues to use 1024 as default iodepth, but change it if
iodepth*$(nproc) > aio-max-nr.

Signed-off-by: Xiao Liang <xiliang@redhat.com>
6 years agocheck: add zoned sysfs node checking in _test_dev_is_zoned
Yi Zhang [Fri, 22 Mar 2019 08:12:28 +0000 (16:12 +0800)]
check: add zoned sysfs node checking in _test_dev_is_zoned

Some kernel may not have zoned sysfs node, e.g. RHEL7, checking if
it exists first in _test_dev_is_zoned.

Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
[Omar: wrap line]
Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agoblktests: add userspace IO test
Ming Lei [Tue, 5 Mar 2019 01:50:26 +0000 (09:50 +0800)]
blktests: add userspace IO test

Add one test to cover changes on block passthrough IO interface,
such as blk_rq_map_user(), blk_rq_map_user_iov(), blk_rq_unmap_user()
and blk_rq_map_kern().

Signed-off-by: Ming Lei <ming.lei@redhat.com>
6 years agoloop/001: verify all partitions are removed
Dongli Zhang [Thu, 14 Mar 2019 11:45:17 +0000 (19:45 +0800)]
loop/001: verify all partitions are removed

loop/001 does not test whether all partitions are removed successfully
during loop device partition scanning. As a result, the regression
introduced by 0da03cab87e6 ("loop: Fix deadlock when calling
blkdev_reread_part()") can not be detected.

The regression will generate below message in dmesg:

[  464.414043] __loop_clr_fd: partition scan of loop0 failed (rc=-22)

and leave orphan partitions like below:

- /dev/loop0p1
- /sys/block/loop0/loop0p1

This patch verifies all partitions are removed by checking if there is
/sys/block/loopX/loopXpY left. The expected number of partitions left is 0.

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
[Omar: check devices and sysfs for both before and after]
Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agoloop/001: fix typo 'paritition' to 'partition'
Dongli Zhang [Thu, 14 Mar 2019 11:45:16 +0000 (19:45 +0800)]
loop/001: fix typo 'paritition' to 'partition'

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
6 years agozbd/006: Test revalidate during other I/O requests
Shin'ichiro Kawasaki [Thu, 14 Mar 2019 03:46:33 +0000 (12:46 +0900)]
zbd/006: Test revalidate during other I/O requests

Since SCSI scanning occurs asynchronously, the kernel function
blk_revalidate_disk_zones() called from sd_revalidate_disk() may be
executed while write I/Os are ongoing. As a result,
blk_revalidate_disk_zones() must not cause write I/O errors by changing
zone related parameters of the device queue unless the disk has changed.
This patch allows checking this behavior and catch regressions such as
fixed by commit ccce20fc7968 ("scsi: sd_zbc: Avoid that resetting a zone
fails sporadically").

To trigger disk revalidate, fio is executed with the --loops option
causing the target device file to be closed and reopen at each loop. The
file close triggers disk revalidate and fio starts issuing I/Os before
revalidate completes, resulting in the desired simultaneous parallel
execution of write I/Os and blk_revalidate_disk_zones().

Also move the _find_first_sequential_zone() helper function from zbd/005
to zbd/rc and reuse it in the new test case for target zone selection.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
6 years agoadd checking nvmet module in nvme 002,003,004,015,018 test
Xiao Liang [Wed, 13 Mar 2019 07:13:17 +0000 (15:13 +0800)]
add checking nvmet module in nvme 002,003,004,015,018 test

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Xiao Liang <xiliang@redhat.com>
6 years agoFix checking multiple modules error in _have_modules()
Xiao Liang [Wed, 13 Mar 2019 07:05:11 +0000 (15:05 +0800)]
Fix checking multiple modules error in _have_modules()

Signed-off-by: Xiao Liang <xiliang@redhat.com>
6 years agonvme: test out-of-range I/O access (file backend)
Sagi Grimberg [Mon, 11 Mar 2019 22:18:55 +0000 (15:18 -0700)]
nvme: test out-of-range I/O access (file backend)

Test that we correctly fail an out-of-range access
with a proper NVMe status code.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
6 years agonvme: add udevadm settle before disconnecting
Sagi Grimberg [Wed, 6 Mar 2019 09:46:42 +0000 (01:46 -0800)]
nvme: add udevadm settle before disconnecting

otherwise we can see some I/O failures as udev didn't get enough time
to do its thing.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
6 years agoFix the failure case which will exit with 0
Yi Zhang [Tue, 5 Mar 2019 03:33:19 +0000 (11:33 +0800)]
Fix the failure case which will exit with 0

The return value of a failing test was masked by the zoned test check.
Make sure to return either the original or zoned run failed value.

Fixes: e840e1537dc6 ("config: Introduce RUN_ZONED_TESTS variable and CAN_BE_ZONED flag")
Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
6 years agozbd: Change sysfs path for partition devices
Shin'ichiro Kawasaki [Tue, 5 Mar 2019 05:24:47 +0000 (14:24 +0900)]
zbd: Change sysfs path for partition devices

zbd/001 and zbd/002 test cases fail for partition devices because of
sysfs path difference between partition devices and their holder
devices. The size parameter in sysfs path is different between the
partition devices and their holder devices. The holder devices have
nr_zones parameter in sysfs but the partition devices do not.

Utilize _test_dev_is_partition() helper function and TEST_DEV_PART_SYSFS
variable to refer correct sysfs size parameter for the partition devices.
Do not refer sysfs nr_zones parameter for the partition devices. Instead,
calculate the expected nr_zones from device capacity and zone size.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
6 years agocommon: Add _test_dev_is_partition() helper function
Shin'ichiro Kawasaki [Tue, 5 Mar 2019 05:24:46 +0000 (14:24 +0900)]
common: Add _test_dev_is_partition() helper function

To control test conditions unique for partition devices, introduce the
_test_dev_is_partition() helper function. Refer TEST_DEV_PART_SYSFS
variable to tell if the TEST_DEV is a partition device or not.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
6 years agocheck: Add TEST_DEV_PART_SYSFS variable
Shin'ichiro Kawasaki [Tue, 5 Mar 2019 05:24:45 +0000 (14:24 +0900)]
check: Add TEST_DEV_PART_SYSFS variable

When partition devices are specified in TEST_DEV, TEST_DEV_SYSFS
variable points to the sysfs paths of holder devices of the partition
devices (e.g., /sys/block/sda). This sysfs path is different from the
sysfs path of the partition devices (e.g., /sys/block/sda/sda1). For
example, size parameters exist in both the holder device sysfs and
the partition device sysfs with different values.

To allow test cases to access sysfs path of the partition devices,
add TEST_DEV_PART_SYSFS variable. TEST_DEV_SYSFS is set as is to refer
the sysfs path of the holder devices. If the TEST_DEV is not a partition
device, an empty string is set to the TEST_DEV_PART_SYSFS variable.

Rename _find_sysfs_dir() function to _find_sysfs_dirs() and make it find
holder device sysfs as well as the partition device sysfs. The function
obtains the canonical sysfs path, and if the device is a partition
device, the function cuts the last device name in the canonical sysfs
path to obtain the holder device sysfs path.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
6 years agonvme/028: use consistent coding style
Chaitanya Kulkarni [Thu, 21 Feb 2019 04:42:48 +0000 (20:42 -0800)]
nvme/028: use consistent coding style

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agonvme/027: use consistent coding style
Chaitanya Kulkarni [Thu, 21 Feb 2019 04:42:47 +0000 (20:42 -0800)]
nvme/027: use consistent coding style

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agonvme/026: use consistent coding style
Chaitanya Kulkarni [Thu, 21 Feb 2019 04:42:46 +0000 (20:42 -0800)]
nvme/026: use consistent coding style

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agonvme/025: use consistent coding style
Chaitanya Kulkarni [Thu, 21 Feb 2019 04:42:45 +0000 (20:42 -0800)]
nvme/025: use consistent coding style

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agonvme/024: use consistent coding style
Chaitanya Kulkarni [Thu, 21 Feb 2019 04:42:44 +0000 (20:42 -0800)]
nvme/024: use consistent coding style

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agonvme/023: use consistent coding style
Chaitanya Kulkarni [Thu, 21 Feb 2019 04:42:43 +0000 (20:42 -0800)]
nvme/023: use consistent coding style

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agonvme/022: use consistent coding style
Chaitanya Kulkarni [Thu, 21 Feb 2019 04:42:42 +0000 (20:42 -0800)]
nvme/022: use consistent coding style

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agonvme/021: use consistent coding style
Chaitanya Kulkarni [Thu, 21 Feb 2019 04:42:41 +0000 (20:42 -0800)]
nvme/021: use consistent coding style

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
6 years agocheck: default CAN_BE_ZONED to 0
Omar Sandoval [Wed, 27 Feb 2019 19:21:10 +0000 (11:21 -0800)]
check: default CAN_BE_ZONED to 0

Otherwise, the srp tests print:

./check: line 433: CAN_BE_ZONED: unbound variable

Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agoMerge pull request #47 from bvanassche/master
Omar Sandoval [Wed, 27 Feb 2019 19:20:41 +0000 (11:20 -0800)]
Merge pull request #47 from bvanassche/master

srp and nvmeof-mp test improvements

6 years agotests/srp/rc: Avoid triggering "QP creation failed" error messages
Bart Van Assche [Fri, 22 Feb 2019 22:53:14 +0000 (14:53 -0800)]
tests/srp/rc: Avoid triggering "QP creation failed" error messages

Instead of trying to log in to each target port from each initiator
port, only log in to the target ports associated with the RDMA HCA
from which the log in request is sent. This avoids that the SRP
initiator driver logs the following error message when e.g.
attempting to log in to interface lo from an Ethernet interface:
"QP creation failed".

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agotests/srp/rc: Consider all network interfaces
Bart Van Assche [Fri, 22 Feb 2019 22:21:10 +0000 (14:21 -0800)]
tests/srp/rc: Consider all network interfaces

Instead of giving up if a login attempt fails, try all network interfaces.
This patch ensures that login succeeds if the first network interface that
is encountered is down and another network interface is up.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agotests/srp/rc: Simplify log_in()
Bart Van Assche [Fri, 22 Feb 2019 22:05:47 +0000 (14:05 -0800)]
tests/srp/rc: Simplify log_in()

Since the 'sysfsdir' variable is identical to the 'd' variable, leave
out 'sysfsdir' and use 'd' instead. This patch does not change any
functionality.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agotests/srp/rc: Make the output of srp_single_login() less confusing
Bart Van Assche [Fri, 22 Feb 2019 22:17:42 +0000 (14:17 -0800)]
tests/srp/rc: Make the output of srp_single_login() less confusing

Displaying $PWD is not useful inside srp_single_login(). Hence leave
$PWD out.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agotests/srp/rc: Make debugging do_rdma_cm_login() easier
Bart Van Assche [Fri, 22 Feb 2019 22:08:27 +0000 (14:08 -0800)]
tests/srp/rc: Make debugging do_rdma_cm_login() easier

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agonvmeof-mp, srp: Check multipathd version
Bart Van Assche [Thu, 21 Feb 2019 23:18:58 +0000 (15:18 -0800)]
nvmeof-mp, srp: Check multipathd version

The srp tests reliably report data corruption with multipathd versions
before 0.7.0 due to a multipathd bug. Hence verify that the multipathd
version is at least 0.7.0.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agoloop/004: Need to wait for drop caches if block_size is changed
zhengbin [Wed, 20 Feb 2019 09:38:06 +0000 (17:38 +0800)]
loop/004: Need to wait for drop caches if block_size is changed

When i test blktests, loop/004 will be fail. The Key test steps
are as follows:
1. losetup -f --show  /dev/sda
2. src/loblksize /dev/loop0 4096

step 1 will create /dev/loop0. after that, daemon systemd-udevd
will visit and close /dev/loop0 who will add and delete
i_mapping->nrpages.
PS: the operation of systemd-udevd is in the background.

step 2 will set /dev/loop0 block size, linux kernel function
loop_set_block_size has been changed since commit 5db470e229e2
("loop: drop caches if offset or block_size are changed")
+ if (lo->lo_queue->limits.logical_block_size != arg &&
+     lo->lo_device->bd_inode->i_mapping->nrpages) {
+               err = -EAGAIN;
+               pr_warn("%s: loop%d (%s) has still dirty pages\n",
+                       __func__, lo->lo_number, lo->lo_file_name,
+                       lo->lo_device->bd_inode->i_mapping->nrpages);
+               goto out_unfreeze;
+       }
--->maybe systemd-udevd just visited /dev/loop0, this leads to failure

Add a step between 1 and 2.

Signed-off-by: zhengbin <zhengbin13@huawei.com>
6 years agozbd/004: Add zone condition "Closed" for sequential write required zones
Shin'ichiro Kawasaki [Wed, 20 Feb 2019 08:12:28 +0000 (17:12 +0900)]
zbd/004: Add zone condition "Closed" for sequential write required zones

The test case zbd/004 executes write operations for two sequential write
required zones across the zone boundary between them. After the write
operation, the second zone has non-zero write pointer. At that status,
the zone can have not only "Implicit Open" condition but also "Closed"
condition based on zone status management logic of the block zoned device.

Add "Closed" condition to the zone condition check logic in zbd/004. Add
ZONE_COND_CLOSED constant definition in zbd/rc.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
6 years agoblock/024: Increase I/O time
Masato Suzuki [Wed, 20 Feb 2019 08:12:27 +0000 (17:12 +0900)]
block/024: Increase I/O time

The total time spent on write I/Os for the 3 dd executions will be at most
1500 * 3 * 0.5ms = 2250ms, that is, 2.25s. Due to system overhead and
timer triggers, a total write I/O time larger than this value is generally
reported through I/O stat. However, for a system with very low overhead
and/or very precise timers, the reported value can be under 2.5s, leading
to a rounded value equal to 2s, and not the 3s expected.

To avoid the test to fail due to this problem, increase the number of write
I/Os executed so that the total exact I/O time exceeds 2.5s, leading to a
rounded value equal to 3s. The change increases the number of I/Os of the
second and third dd calls to 1800, leading to an exact write I/O time of
(1500 + 1800 * 2) * 0.5 ms = 2.55s.

Signed-off-by: Masato Suzuki <masato.suzuki@wdc.com>
6 years agotravis: streamline config
Omar Sandoval [Wed, 13 Feb 2019 20:56:48 +0000 (12:56 -0800)]
travis: streamline config

- Reorder the testing matrix to more or less the order of importance.
- Don't install libc and libstdc++ explicitly; it's not necessary and
  for some reason it installs a bunch of other packages.
- We only test on Linux, so get rid of the conditional.
- Don't error out if apt update fails, since that seems to happen every
  now and then because some repository changed keys.

Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agotravis: run make check
Omar Sandoval [Wed, 13 Feb 2019 20:05:51 +0000 (12:05 -0800)]
travis: run make check

We want to run shellcheck and the other sanity checks on all pushes.
Install the latest stable version of shellcheck, as old versions are
known to have false positives.

Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agoCONTRIBUTING: add my email address
Omar Sandoval [Wed, 13 Feb 2019 19:47:59 +0000 (11:47 -0800)]
CONTRIBUTING: add my email address

Most people cc me on blktests patches, but let's document it, too, since
I'm not always watching the block mailing list.

Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agosrc: check if header exists with -E
Omar Sandoval [Wed, 13 Feb 2019 19:42:02 +0000 (11:42 -0800)]
src: check if header exists with -E

The current HAVE_C_HEADER function creates a -.o file. We don't need to
compile, just run the C preprocessor, so use -E instead of -c.

Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agoREADME: add Travis status badge
Omar Sandoval [Wed, 13 Feb 2019 19:06:54 +0000 (11:06 -0800)]
README: add Travis status badge

Now that Travis is set up for the repository, let's make it easily
discoverable.

Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agoMerge pull request #44 from bvanassche/master
Omar Sandoval [Wed, 13 Feb 2019 18:47:22 +0000 (10:47 -0800)]
Merge pull request #44 from bvanassche/master

Multiple srp and nvmeof-mp patches

6 years agotests/srp/013: Provide detailed information about the progress of this test
Bart Van Assche [Fri, 4 Jan 2019 23:48:15 +0000 (15:48 -0800)]
tests/srp/013: Provide detailed information about the progress of this test

This makes it easier to determine what went wrong if this test fails.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agotests/srp/rc: Increase maximum request size
Bart Van Assche [Wed, 2 Jan 2019 03:14:37 +0000 (19:14 -0800)]
tests/srp/rc: Increase maximum request size

A new feature for the SRP initiator and target drivers in kernel v5.0-rc1
is that both the initiator and target drivers support immediate data.
Since the default maximum immediate data size is 8 KB, increase the target
maximum request size such that the SRP initiator can send write requests
with up to 8 KB of immediate data.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agotests/nvmeof-mp/rc: Fix simulate_network_failure_loop()
Bart Van Assche [Mon, 11 Feb 2019 17:08:33 +0000 (09:08 -0800)]
tests/nvmeof-mp/rc: Fix simulate_network_failure_loop()

Avoid that the following is reported:

+tests/nvmeof-mp/rc: line 118: /dev/nvme0n1/device/reset_controller: Not a directory

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agotests/nvmeof-mp/rc: Remove sg_reset dependency
Bart Van Assche [Sat, 5 Jan 2019 00:42:08 +0000 (16:42 -0800)]
tests/nvmeof-mp/rc: Remove sg_reset dependency

Since sg_reset is not used by any of the nvmeof-mp tests, do not require
presence of that executable.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agocommon/multipath-over-rdma: Skip teardown if $debug has been set
Bart Van Assche [Thu, 13 Dec 2018 21:49:20 +0000 (13:49 -0800)]
common/multipath-over-rdma: Skip teardown if $debug has been set

A convenient way to debug the srp and nvmeof-mp tests scripts is to set
the debug variable in common/multipath-over-rdma. Examining what went
wrong during a test is only possible if teardown() is skipped after a
test failure. Make sure that this is the case.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agocommon/multipath-over-rdma: Fix held_by()
Bart Van Assche [Fri, 11 Jan 2019 18:43:33 +0000 (10:43 -0800)]
common/multipath-over-rdma: Fix held_by()

Use the proper shell operator to remove the /dev/ prefix from a device
path.

Fixes: a7f15d1141e4 ("Add tests for the SRP initiator and target drivers")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agoUnbreak the continuous integration build
Bart Van Assche [Mon, 11 Feb 2019 16:24:39 +0000 (08:24 -0800)]
Unbreak the continuous integration build

The Travis environment in which the continous integration build is run
does not have the <linux/blkzoned.h> header file. Make sure that the
zbdioctl.c source file builds fine without that header file.

Cc: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
Fixes: d42cc3f85e0d ("src: Introduce zbdioctl program")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agozbdioctl: copy ioctl definitions from kernel
Omar Sandoval [Wed, 6 Feb 2019 01:19:13 +0000 (17:19 -0800)]
zbdioctl: copy ioctl definitions from kernel

blkzoned.h may not have the recent BLKGETZONESZ or BLKGETNRZONES ioctls,
so just copy the definition.

Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agozbd/005: Test write ordering
Masato Suzuki [Mon, 28 Jan 2019 13:14:55 +0000 (22:14 +0900)]
zbd/005: Test write ordering

Run a high queue depth direct sequential write fio job to check that
write requests are not being reordered when the deadline scheduler is
used. This test allowed to catch a bug fixed with commit
80e02039721 "block: mq-deadline: Fix write completion handling".

Signed-off-by: Masato Suzuki <masato.suzuki@wdc.com>
6 years agozbd/004: Check write split accross sequential zones
Masato Suzuki [Mon, 28 Jan 2019 13:14:54 +0000 (22:14 +0900)]
zbd/004: Check write split accross sequential zones

Check that write operations spanning a zone boundary are correctly
processed as 2 different write operations each fully within a single
zone.

Signed-off-by: Masato Suzuki <masato.suzuki@wdc.com>
6 years agozbd/003: Test sequential zones reset
Masato Suzuki [Mon, 28 Jan 2019 13:14:53 +0000 (22:14 +0900)]
zbd/003: Test sequential zones reset

Test zone reset operation to make sure that the BLKRESETZONE ioctl call
works as expected but also that the zone sector remapping that may be
done for logical devices (partitions or dm-linear devices) is correct.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Masato Suzuki <masato.suzuki@wdc.com>
6 years agozbd/002: report zone test
Masato Suzuki [Mon, 28 Jan 2019 13:14:52 +0000 (22:14 +0900)]
zbd/002: report zone test

Get a report for all zones and confirm that the reported values are
valid and consistent with regard to the device capacity and zone size.

Signed-off-by: Masato Suzuki <masato.suzuki@wdc.com>
6 years agozbd/001: sysfs and ioctl consistency test
Masato Suzuki [Mon, 28 Jan 2019 13:14:51 +0000 (22:14 +0900)]
zbd/001: sysfs and ioctl consistency test

Obtain a zoned block device attributes from sysfs and using ioctl calls
and confirm the consistency of the values.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Masato Suzuki <masato.suzuki@wdc.com>
6 years agotests: Introduce zbd test group
Masato Suzuki [Mon, 28 Jan 2019 13:14:50 +0000 (22:14 +0900)]
tests: Introduce zbd test group

The zoned block device (zbd) test group is used to gather all tests
specific to zoned block devices (null_blk device with zoned mode enabled,
SMR disks, dm-linear on top of zoned devices, etc). Execution of this group
requires that the kernel be compiled with the block layer
CONFIG_BLK_DEV_ZONED option enabled and also requires the null_blk driver
to have zoned mode support (added in kernel 4.19).

This group rc script implements _fallback_null_blk_zoned() helper function
which initailize a null_blk device with zoned mode. Each of the zbd group
test cases calls it in fallback_device() function. This allows the zbd
group test cases fallback to the null_blk device even if the TEST_DEVS
is empty. With this, all tests scripts can be written by only defining
the test_device() function while allowing operation on both null_blk and
user specified devices.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Masato Suzuki <masato.suzuki@wdc.com>
6 years agosrc: Introduce zbdioctl program
Shin'ichiro Kawasaki [Mon, 28 Jan 2019 13:14:49 +0000 (22:14 +0900)]
src: Introduce zbdioctl program

zbdioctl implements calls to zoned block devices ioctls that are not
supported currently by sys-utils blkzone utility, namely BLKGETZONESZ
and BLKGETNRZONES.

Reviewed-by: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
6 years agocheck: Introduce fallback_device() and cleanup_fallback_device()
Shin'ichiro Kawasaki [Mon, 28 Jan 2019 13:14:48 +0000 (22:14 +0900)]
check: Introduce fallback_device() and cleanup_fallback_device()

These optional functions can be defined by a test case script. When
defined and TEST_DEVS is empty, the fallback_device() is executed before
runing the test case. The fallback_device() function intializes a virtual
device to run the test case and return the device to be set in TEST_DEVS.
After running the test case, cleanup_fallback_device() is executed to
clean up the device.

This feature allows to run test cases with test_device() function even if
TEST_DEVS is not set in the config, using virtaul devices such as null_blk.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
6 years agoblock: Whitelist tests supporting zoned block devices
Shin'ichiro Kawasaki [Mon, 28 Jan 2019 13:14:47 +0000 (22:14 +0900)]
block: Whitelist tests supporting zoned block devices

Define CAN_BE_ZONED=1 in block/005, block/006, block/010, block/011,
block/016, block/017, block/020, block/021 and block/023 as all these
tests should execute without any problem against null_blk with zoned
mode enabled or zoned block devices specified in TEST_DEVS.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
6 years agoblock/004: Adjust fio conditions for zoned block devices
Shin'ichiro Kawasaki [Mon, 28 Jan 2019 13:14:46 +0000 (22:14 +0900)]
block/004: Adjust fio conditions for zoned block devices

For a random write pattern to a zoned block device, fio requires --direct=1
and --zonemode=zbd options as well as deadline I/O scheduler to be
specified. Specify these options and set the I/O scheduler if the target
device is a zoned block device. Before doing that, also make sure that the
deadline scheduler is available and that fio supports the zbd zone mode.
Set CAN_BE_ZONED flag to run this test case for zoned block devices.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
6 years agocommon: Introduce _have_fio_zbd_zonemode() helper function
Shin'ichiro Kawasaki [Mon, 28 Jan 2019 13:14:45 +0000 (22:14 +0900)]
common: Introduce _have_fio_zbd_zonemode() helper function

Fio zbd zone mode is necessary for zoned block devices. Introduce the
helper function _have_fio_zbd_zonemode() to check that the installed
fio version supports the option --zonemode=zbd.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
6 years agoconfig: Introduce RUN_ZONED_TESTS variable and CAN_BE_ZONED flag
Shin'ichiro Kawasaki [Mon, 28 Jan 2019 13:14:44 +0000 (22:14 +0900)]
config: Introduce RUN_ZONED_TESTS variable and CAN_BE_ZONED flag

To allow running tests using a null_blk device with the zoned mode
disabled (current setup) as well as enabled, introduce the config
the RUN_ZONED_TESTS config variable and the per-test flag CAN_BE_ZONED.

RUN_ZONED_TESTS=1 indicates that tests run against null_blk will be
executed twice, first with null_blk as a regular block device
(RUN_FOR_ZONED=0) and a second time with null_blk set as a zoned block
device (RUN_FOR_ZONED=1). This applies only to tests cases that have the
variable CAN_BE_ZONED set to 1, indicating that the test case applies to
zoned block devices. If CAN_BE_ZONED is not defined by a test case, the
test is executed only with the regular null_blk device.

_init_null_blk is modified to prepare null_blk as a zoned blocked device
if RUN_FOR_ZONED is set and as a regular block device otherwise. To avoid
"modprobe -r null_blk" failures, rmdir calls on all sysfs nullbX
directories is added.

When a zoned block device is specified in TEST_DEVS, failures of test
cases that do not set CAN_BE_ZONED are avoided by automatically skipping
the test. The new helper function _test_dev_is_zoned() is introduced to
implement this.

The use of the RUN_ZONED_TESTS variable requires that the kernel be
compiled with CONFIG_BLK_DEV_ZONED enabled.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
6 years agoloop: Add test for changing capacity when filesystem is mounted
Jan Kara [Mon, 21 Jan 2019 12:02:03 +0000 (13:02 +0100)]
loop: Add test for changing capacity when filesystem is mounted

Add test for changing capacity of a loop device when a filesystem with
non-default block size is mounted on it. This is a regression test for
"blockdev: Fix livelocks on loop device".

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
[Omar: mount under $TMPDIR]
Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agoblock: 028: block integrity funtion test
Ming Lei [Thu, 17 Jan 2019 03:44:25 +0000 (11:44 +0800)]
block: 028: block integrity funtion test

Use scsi_debug's dif/dix to cover block layer's integrity function
test, then it can serve as block integrity regeression test.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
[Omar: fix some shellcheck errors]
Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agoREADME: update required bash version
Omar Sandoval [Thu, 17 Jan 2019 01:38:08 +0000 (17:38 -0800)]
README: update required bash version

Bash 5 was recently released, so the bash 4 requirement is misleading.
Additionally, we also depend on some features in bash 4.2.

Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agocgroup: test if CGROUP2_DIR is set with -v instead of -n
Omar Sandoval [Thu, 17 Jan 2019 01:34:19 +0000 (17:34 -0800)]
cgroup: test if CGROUP2_DIR is set with -v instead of -n

common/multipath-over-rdma does set -u, so -n "$CGROUP2_DIR" fails with
an unbound variable error. Instead, use -v to test if the variable was
set.

Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agoMerge pull request #43 from tytso/master
Omar Sandoval [Mon, 14 Jan 2019 21:07:16 +0000 (13:07 -0800)]
Merge pull request #43 from tytso/master

src/sg/syzkaller1.c: fix portability problem for syscall(__NR_mmap, ...)

6 years agoblock/008: avoid race with CPU offline and sched_setaffinity() in fio
Omar Sandoval [Mon, 14 Jan 2019 21:03:00 +0000 (13:03 -0800)]
block/008: avoid race with CPU offline and sched_setaffinity() in fio

This is a better fix for 4a2933fd0386 ("block/008: fix race between CPU
offline and fio startup"). Closes #41.

Reported-by: Signed-off-by: Ivan Mironov <mironov.ivan@gmail.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agosrc/sg/syzkaller1.c: fix portability problem for syscall(__NR_mmap, ...)
Theodore Ts'o [Mon, 7 Jan 2019 21:09:31 +0000 (16:09 -0500)]
src/sg/syzkaller1.c: fix portability problem for syscall(__NR_mmap, ...)

How mmap is mapped to a raw system call varies across different
architectures.  On some architectures (such as 32-bit ARM), __NR_mmap
may not exist at all; glibc will use __NR_mmap2 to implement mmap(2).
Syzkaller is using mmap() as a non-portable version of malloc(3), so
it should be safe to use the glibc's mmap wrapper instead of trying to
directly call the system call.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
6 years agoblktests: add Ming Lei's scsi-stress-remove
Dennis Zhou [Thu, 20 Dec 2018 18:18:26 +0000 (12:18 -0600)]
blktests: add Ming Lei's scsi-stress-remove

This test exposed a race condiiton when shutting down a request_queue
with active IO against it and blkg association for the IOs [1]. The
issue ended up being that while the request_queue will just start
failing requests, blkg destruction sets the q->root_blkg to %NULL. This
caused a NPE. This was fixed in [2].

So to help prevent this from happening again, integrate Ming's test into
blktests so that it can more easily be ran. Here I've ported it to fit
better into the blktests framework.

[1] https://lore.kernel.org/lkml/20181205171039.73066-1-dennis@kernel.org/
[2] https://lore.kernel.org/lkml/20181211230308.66276-1-dennis@kernel.org/

Signed-off-by: Dennis Zhou <dennis@kernel.org>
Cc: Ming Lei <ming.lei@redhat.com>
6 years agoblktests: split out cgroup2 controller and file check
Dennis Zhou [Thu, 20 Dec 2018 18:18:25 +0000 (12:18 -0600)]
blktests: split out cgroup2 controller and file check

This is a prep patch for a new test that will race blkg association and
request_queue cleanup. As blkg association is a underlying cgroup io
controller feature, we need the ability to check if the controller is
available.

Signed-off-by: Dennis Zhou <dennis@kernel.org>
6 years agoblktests: add cgroup2 infrastructure
Josef Bacik [Wed, 5 Dec 2018 15:34:03 +0000 (10:34 -0500)]
blktests: add cgroup2 infrastructure

In order to test io.latency and other cgroup related things we need some
supporting helpers to setup and tear down cgroup2.  This adds support
for checking that we can even configure cgroup2 things, set them up if
need be, and then add the cleanup stuff to the main cleanup function so
everything is always in a clean state.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
[Omar: split into separate file, fix shellcheck errors, rework
 cleanup/exit]
Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agoblktests: Fix compilation warning
Damien Le Moal [Mon, 17 Dec 2018 05:51:08 +0000 (14:51 +0900)]
blktests: Fix compilation warning

Fix strncpy length to "sizeof(buf) - 1" to avoid the compiler warning:
cc  -O2 -Wall -Wshadow  -o sg/syzkaller1 sg/syzkaller1.c
sg/syzkaller1.c: In function ‘syz_open_dev.constprop’:
sg/syzkaller1.c:204:16: warning: ‘strncpy’ specified bound 1024 equals
destination size [-Wstringop-truncation]
     NONFAILING(strncpy(buf, (char*)a0, sizeof(buf)));
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sg/syzkaller1.c:143:7: note: in definition of macro ‘NONFAILING’
       __VA_ARGS__;                                                     \
       ^~~~~~~~~~~

Since the last character of buf is forced set to 0, there is no
functional change introduced by this patch.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
6 years agoscsi/006: allow changing cache_type to fail
Omar Sandoval [Tue, 18 Dec 2018 20:15:56 +0000 (12:15 -0800)]
scsi/006: allow changing cache_type to fail

Some devices don't support all cache types. Allow setting the cache type
to fail with EINVAL. On success, make sure it was changed to the desired
value.

Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agoMerge pull request #39 from bvanassche/master
Omar Sandoval [Fri, 7 Dec 2018 18:13:57 +0000 (10:13 -0800)]
Merge pull request #39 from bvanassche/master

Two improvements for the srp tests

6 years agocommon/multipath-over-rdma: Retry unloading rdma_rxe if necessary
Bart Van Assche [Tue, 27 Nov 2018 20:57:11 +0000 (12:57 -0800)]
common/multipath-over-rdma: Retry unloading rdma_rxe if necessary

If any context, e.g. queued work, holds a reference on an rdma_rxe
device then it can happen that the first unload attempt fails. Try
several times to unload that kernel module if the first unload
attempt fails.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agosrp and nvmeof-mp: Check whether legacy dm is supported
Bart Van Assche [Tue, 30 Oct 2018 20:04:52 +0000 (13:04 -0700)]
srp and nvmeof-mp: Check whether legacy dm is supported

Kernel commit 6a23e05c2fe3 ("dm: remove legacy request-based IO path")
retained dm-mq but removed the legacy dm code. Skip those tests that
require the legacy dm code.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agoChange _have_module -> _have_modules
Omar Sandoval [Thu, 6 Dec 2018 19:00:04 +0000 (11:00 -0800)]
Change _have_module -> _have_modules

This way, we can report all missing modules at once.

Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agotests/srp: add ib_uverbs to list of modules
Omar Sandoval [Thu, 6 Dec 2018 18:38:38 +0000 (10:38 -0800)]
tests/srp: add ib_uverbs to list of modules

While we're here, sort the list.

Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agoblock/025: test discard sector alignement and sector size overflow
Ming Lei [Thu, 15 Nov 2018 04:00:17 +0000 (12:00 +0800)]
block/025: test discard sector alignement and sector size overflow

This test covers the following two issues:

1) discard sector need to be aligned with logical block size

2) make sure 'sector_t' instead of 'unsigned int' is used when comparing
with discard sector size

Signed-off-by: Ming Lei <ming.lei@redhat.com>
[Omar: reword description]
Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agoAdd use of logger so that syslog files show when each test starts
Theodore Ts'o [Mon, 29 Oct 2018 16:15:57 +0000 (12:15 -0400)]
Add use of logger so that syslog files show when each test starts

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
6 years agoCheck permissions of output files in make check
Omar Sandoval [Mon, 26 Nov 2018 19:31:33 +0000 (11:31 -0800)]
Check permissions of output files in make check

Output files should not be executable.

Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agoFix permissions of golden output files
Michael Moese [Thu, 22 Nov 2018 09:25:16 +0000 (10:25 +0100)]
Fix permissions of golden output files

Four of the golden outputs had execute bits set. However, like all the
other .out-files, their permission should be restricted to 644.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Michael Moese <mmoese@suse.de>
6 years agoMerge pull request #37 from bvanassche/master
Omar Sandoval [Wed, 14 Nov 2018 22:34:58 +0000 (14:34 -0800)]
Merge pull request #37 from bvanassche/master

Fix 32-bit build and add a Travis configuration file

6 years agomakefile: Add install rule
Gwendal Grignou [Wed, 14 Nov 2018 19:39:31 +0000 (11:39 -0800)]
makefile: Add install rule

Add rule to install to a target directory, /usr/local/blktests by
default.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
6 years ago.travis.yml: Add to repository
Bart Van Assche [Thu, 1 Nov 2018 15:06:51 +0000 (08:06 -0700)]
.travis.yml: Add to repository

Automatically build binaries upon 'git push' with -Werror to avoid that
new build errors or warnings get introduced.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agosrc/sg/syzkaller1.c: Fix a 32-bit compiler warning
Bart Van Assche [Thu, 1 Nov 2018 15:25:27 +0000 (08:25 -0700)]
src/sg/syzkaller1.c: Fix a 32-bit compiler warning

Avoid that clang reports the following warning when building in 32-bit mode:

sg/syzkaller1.c:405:34: error: implicit conversion from 'unsigned long long' to
      'uintptr_t' (aka 'unsigned int') changes value from 18446744073709551615
      to 4294967295 [-Werror,-Wconstant-conversion]
                         0x32ul, 0xfffffffffffffffful, 0x0ul, 0, 0, 0);
                                 ^~~~~~~~~~~~~~~~~~~~

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agosrc/discontiguous-io: Do not shadow variables
Bart Van Assche [Mon, 29 Oct 2018 21:34:00 +0000 (14:34 -0700)]
src/discontiguous-io: Do not shadow variables

Avoid using variables in an inner scope with the same name as variables in
an outer scope. Enable the -Wshadow compiler flag for C and C++ source
files such that in the future the compiler will complain about shadowing.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agoFix build failure for discontiguous-io on 32-bit platforms
Theodore Ts'o [Tue, 30 Oct 2018 14:36:49 +0000 (10:36 -0400)]
Fix build failure for discontiguous-io on 32-bit platforms

Avoid that building with a 32-bit compiler fails as follows:
discontiguous-io.cpp:294:34: error: no matching function for call to 'min(long unsigned int, size_t)'
         std::min(4ul, len - i * 4));
                                  ^
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
[bvanassche: elaborated commit message]
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agoloop/006: Add test for oops during backing file verification
Jan Kara [Thu, 18 Oct 2018 10:31:47 +0000 (12:31 +0200)]
loop/006: Add test for oops during backing file verification

Add regression test for patch "block/loop: Use global lock for ioctl()
operation." where we can oops while traversing list of loop devices
backing newly created device.

Signed-off-by: Jan Kara <jack@suse.cz>
[Omar: rename to 006, change description]
Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agoblktest: remove instances of null_blk queue_mode=1
Jens Axboe [Thu, 25 Oct 2018 20:49:04 +0000 (14:49 -0600)]
blktest: remove instances of null_blk queue_mode=1

This is no longer supported in recent kernels, get rid of any testing of
queue_mode=1. queue_mode=1 tested the legacy IO path, which is going
away completely. As such, there's no point in doing anymore testing with
it.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoConvert license headers to SPDX tags
Omar Sandoval [Fri, 5 Oct 2018 21:12:47 +0000 (14:12 -0700)]
Convert license headers to SPDX tags

This gets rid of the noisy boilerplate at the beginning of every file.

Signed-off-by: Omar Sandoval <osandov@fb.com>
6 years agoAdd NVMeOF dm-mpath tests
Bart Van Assche [Mon, 17 Sep 2018 16:59:46 +0000 (09:59 -0700)]
Add NVMeOF dm-mpath tests

Add a series of tests for the NVMeOF drivers on top of the dm-mpath
driver. These tests are similar to the tests under tests/srp. Both
tests use the dm-mpath driver for multipath and the loopback
functionality of the rdma_rxe driver. The only difference is that the
nvmeof-mp tests use the NVMeOF initiator and target drivers instead
of the SRP initiator and target drivers.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agocommon/multipath-over-rdma: Log fio exit code
Bart Van Assche [Wed, 26 Sep 2018 21:20:09 +0000 (14:20 -0700)]
common/multipath-over-rdma: Log fio exit code

Log the fio exit code to make it easier to analyze test failures.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agocommon/multipath-over-rdma: Improve robustness
Bart Van Assche [Tue, 25 Sep 2018 23:35:58 +0000 (16:35 -0700)]
common/multipath-over-rdma: Improve robustness

Detect all test setup failures and report any failures.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agocommon/multipath-over-rdma: Make teardown() shut down the client
Bart Van Assche [Tue, 25 Sep 2018 23:43:09 +0000 (16:43 -0700)]
common/multipath-over-rdma: Make teardown() shut down the client

This ensures that no multipath definitions created during a test remain
after a test has finished.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agocommon/multipath-over-rdma: Fix is_qinp_def()
Bart Van Assche [Tue, 25 Sep 2018 23:42:11 +0000 (16:42 -0700)]
common/multipath-over-rdma: Fix is_qinp_def()

Make is_qinp_def() recognize the queue_if_no_path keyword correctly.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agotests/srp/rc, common/multipath-over-rdma: Introduce setup_rdma()
Bart Van Assche [Tue, 25 Sep 2018 23:57:16 +0000 (16:57 -0700)]
tests/srp/rc, common/multipath-over-rdma: Introduce setup_rdma()

Move the code that will be reused by the NVMeOF tests into a new
function. This patch does not change any functionality.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agotests/srp: Move reusable code into common/multipath-over-rdma
Bart Van Assche [Thu, 27 Sep 2018 17:48:58 +0000 (10:48 -0700)]
tests/srp: Move reusable code into common/multipath-over-rdma

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
6 years agotests/srp/rc: Move the multipathd reconfiguration command into the get_bdev() loop
Bart Van Assche [Thu, 27 Sep 2018 17:50:44 +0000 (10:50 -0700)]
tests/srp/rc: Move the multipathd reconfiguration command into the get_bdev() loop

Signed-off-by: Bart Van Assche <bvanassche@acm.org>