Hi Hanna,
I'm adding the io_uring block driver (block/blkio.c) to qemu-iotests
and hit a syntax issue with json:.

In tests/qemu-iotests/common.rc where TEST_IMG_FILE and TEST_IMG are
defined for each IMGPROTO, I'm unable to come up with a TEST_IMG that
works with all test cases. Some test cases want:

  
TEST_IMG="json:{\"file.driver\":\"io_uring\",\"file.filename\":\"$TEST_IMG_FILE\"}"

While others want:

  TEST_IMG="json:{\"driver\":\"io_uring\",\"filename\":\"$TEST_IMG_FILE\"}"

It seems to depend on how TEST_IMG is used by the tests.

For example, 001 works with the first version. When I use the second
version it fails with:

  qemu-io: can't open device
json:{"driver":"io_uring","filename":"/home/stefanha/qemu/build/scratch/raw-io_uring-001/t.raw"}:
A block device must be specified for "file"

The opposite is true for 077, which works with the second version but
fails as follows with the first version:

  qemu-io: can't open device
blkdebug::json:{"file.driver":"io_uring","file.filename":"/home/stefanha/qemu/build/scratch/raw-io_uring-077/t.raw"}:
Must specify either driver or file

This only seems to happen with json: because the other protocols use
TEST_IMG=nfs://... and so on without any problems.

Any ideas?

Stefan

Reply via email to