]> www.infradead.org Git - users/hch/blktests.git/commit
zbd/007: Add --force option to blkzone reset
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Mon, 8 Jun 2020 02:44:58 +0000 (11:44 +0900)
committerOmar Sandoval <osandov@fb.com>
Mon, 15 Jun 2020 23:11:53 +0000 (16:11 -0700)
commit22995560ac8f97289af08b28d7e1a8f886e18e34
tree6045df8037bfec8d3c117b933f69f7bb78a11a4c
parent60cd622fe84fb1dbd14de5614e40c7b321c77530
zbd/007: Add --force option to blkzone reset

The test case zbd/007 utilizes blkzone command from util-linux project
to reset zones of test target devices. Recently, blkzone was modified to
report EBUSY error when it was called to change zone status of devices
used by the system. This avoids unintended zone status change by mistake
and good for most of use cases.

However this change triggered failure of the test case zbd/007 with the
EBUSY error. The test case executes blkzone to reset zones of block devices
which the system maps to container devices such as dm-linear.

To avoid this failure, modify zbd/007 to check if blkzone supports --force
option. And if it is supported, add it to blkzone command line. This option
was introduced to blkzone to allow zone status change of devices even when
the system use them.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
tests/zbd/007