Re: [Qemu-block] [PATCH v9 6/6] qemu-iotests: add 184 for throttle filter driver

2017-09-05 Thread Kevin Wolf
Am 05.09.2017 um 18:16 hat Kevin Wolf geschrieben:
> Am 25.08.2017 um 15:20 hat Manos Pitsidianakis geschrieben:
> > Reviewed-by: Alberto Garcia 
> > Signed-off-by: Manos Pitsidianakis 
> 
> Does this test actually (still) pass for you? I can't see that it's
> related to any recent change in master, but this is the diff that I get.
> 
> I can update the reference output while applying, but obviously if it's
> currently passing for you, it will fail after I "fix" it.

For the record, we discussed this on IRC. The test works correctly on
master, but on my block branch there is a conflict with "block: pass
bdrv_* methods to bs->file by default in block filters".

The correct action is to merge this throttle driver series after the
conflicting patch because throttle doesn't implement .bdrv_get_info and
needs the forwarding that the other patch implements.

I updated the test output accordingly and applied the series to my block
branch.

Kevin



Re: [Qemu-block] [PATCH v9 6/6] qemu-iotests: add 184 for throttle filter driver

2017-09-05 Thread Kevin Wolf
Am 25.08.2017 um 15:20 hat Manos Pitsidianakis geschrieben:
> Reviewed-by: Alberto Garcia 
> Signed-off-by: Manos Pitsidianakis 

Does this test actually (still) pass for you? I can't see that it's
related to any recent change in master, but this is the diff that I get.

I can update the reference output while applying, but obviously if it's
currently passing for you, it will fail after I "fix" it.

Kevin


184[18:07:39] [18:07:39] - output mismatch (see 184.out.bad)
--- /home/kwolf/source/qemu/tests/qemu-iotests/184.out  2017-09-05 
18:07:30.751340633 +0200
+++ 184.out.bad 2017-09-05 18:07:39.707341854 +0200
@@ -30,8 +30,10 @@
 "image": {
 "virtual-size": 67108864,
 "filename": "json:{\"throttle-group\": \"group0\", \"driver\": 
\"throttle\", \"file\": {\"driver\": \"qcow2\", \"file\": {\"driver\": 
\"file\", \"filename\": \"TEST_DIR/t.qcow2\"}}}",
+"cluster-size": 65536,
 "format": "throttle",
-"actual-size": 200704
+"actual-size": 200704,
+"dirty-flag": false
 },
 "iops_wr": 0,
 "ro": false,



[Qemu-block] [PATCH v9 6/6] qemu-iotests: add 184 for throttle filter driver

2017-08-25 Thread Manos Pitsidianakis
Reviewed-by: Alberto Garcia 
Signed-off-by: Manos Pitsidianakis 
---
 tests/qemu-iotests/184 | 205 +++
 tests/qemu-iotests/184.out | 300 +
 tests/qemu-iotests/group   |   1 +
 3 files changed, 506 insertions(+)
 create mode 100755 tests/qemu-iotests/184
 create mode 100644 tests/qemu-iotests/184.out

diff --git a/tests/qemu-iotests/184 b/tests/qemu-iotests/184
new file mode 100755
index 00..704f38f936
--- /dev/null
+++ b/tests/qemu-iotests/184
@@ -0,0 +1,205 @@
+#!/bin/bash
+#
+# Test I/O throttle block filter driver interface
+#
+# Copyright (C) 2017 Manos Pitsidianakis
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
+#
+
+# creator
+owner="Manos Pitsidianakis"
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+status=1   # failure is the default!
+
+_cleanup()
+{
+_cleanup_test_img
+}
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+_supported_fmt qcow2
+_supported_proto file
+_supported_os Linux
+
+function do_run_qemu()
+{
+echo Testing: "$@" | _filter_imgfmt
+$QEMU -nographic -qmp-pretty stdio -serial none "$@"
+echo
+}
+
+function run_qemu()
+{
+do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu | _filter_qmp\
+  | _filter_qemu_io | _filter_generated_node_ids
+}
+
+_make_test_img 64M
+test_throttle=$($QEMU_IMG --help|grep throttle)
+[ "$test_throttle" = "" ] && _supported_fmt throttle
+
+echo
+echo "== checking interface =="
+
+run_qemu <