]> www.infradead.org Git - users/hch/blktests.git/commit
zbd: Change sysfs path for partition devices
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Tue, 5 Mar 2019 05:24:47 +0000 (14:24 +0900)
committerOmar Sandoval <osandov@fb.com>
Thu, 7 Mar 2019 19:24:33 +0000 (11:24 -0800)
commit662bba271383be1c519029150860a5bb0a9021a1
tree688fa3c6f022bc445644998c0de01a88b28e9619
parentf35b631c62d345367d93dc3256d89ccf887025f6
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>
tests/zbd/rc