t/zbd: Avoid magic number of test case count
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Thu, 26 Sep 2019 01:00:44 +0000 (10:00 +0900)
committerJens Axboe <axboe@kernel.dk>
Thu, 26 Sep 2019 06:47:14 +0000 (00:47 -0600)
commit106a71cd6c24f31fce9d95c49e00ff4b28aa6fdc
tree5651fe6e5ab5af113ed37705f987e8e60b436e6b
parent3c029ac46c3478243932f76cadf04ca10b64ab3e
t/zbd: Avoid magic number of test case count

In the test script t/zbd/test-zbd-support, the number of test cases is
defined as a raw constant. Every time a new test case is added, need to
update the constant but this chore tends to be overlooked. When test
case 47 was added recently, the number was not incremented from 46. Then
the test script does not run the test case 47.

To avoid the constant increment chore, automate the test case number
counting. List bash functions which implement test cases and convert the
list to test case numbers.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
t/zbd/test-zbd-support