aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/134
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qemu-iotests/134')
-rwxr-xr-xtests/qemu-iotests/13419
1 files changed, 13 insertions, 6 deletions
diff --git a/tests/qemu-iotests/134 b/tests/qemu-iotests/134
index 99144151b8..b2c3c03f08 100755
--- a/tests/qemu-iotests/134
+++ b/tests/qemu-iotests/134
@@ -1,6 +1,7 @@
-#!/bin/bash
+#!/usr/bin/env bash
+# group: rw auto quick
#
-# Test encrypted read/write using plain bdrv_read/bdrv_write
+# Test encrypted read/write using plain bdrv_pread/bdrv_pwrite
#
# Copyright (C) 2015 Red Hat, Inc.
#
@@ -24,7 +25,6 @@ owner=berrange@redhat.com
seq=`basename $0`
echo "QA output created by $seq"
-here=`pwd`
status=1 # failure is the default!
_cleanup()
@@ -38,9 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow qcow2
-_supported_proto generic
-_unsupported_proto vxhs
-_supported_os Linux
+_supported_proto file
size=128M
@@ -59,6 +57,15 @@ echo "== reading whole image =="
$QEMU_IO --object $SECRET -c "read 0 $size" --image-opts $IMGSPEC | _filter_qemu_io | _filter_testdir
echo
+echo "== rewriting cluster part =="
+$QEMU_IO --object $SECRET -c "write -P 0xb 512 512" --image-opts $IMGSPEC | _filter_qemu_io | _filter_testdir
+
+echo
+echo "== verify pattern =="
+$QEMU_IO --object $SECRET -c "read -P 0 0 512" --image-opts $IMGSPEC | _filter_qemu_io | _filter_testdir
+$QEMU_IO --object $SECRET -c "read -P 0xb 512 512" --image-opts $IMGSPEC | _filter_qemu_io | _filter_testdir
+
+echo
echo "== rewriting whole image =="
$QEMU_IO --object $SECRET -c "write -P 0xa 0 $size" --image-opts $IMGSPEC | _filter_qemu_io | _filter_testdir