mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/hreitz-gitlab/tags/pull-block-2022-02-01' into staging
Block patches: - Add support to the iotests to test qcow2's zstd compression mode - Fix post-migration block node permissions - iotests fixes (051 and mirror-ready-cancel-error) - Remove an outdated comment # gpg: Signature made Tue 01 Feb 2022 13:34:54 GMT # gpg: using RSA key CB62D7A0EE3829E45F004D34A1FA40D098019CDF # gpg: issuer "hreitz@redhat.com" # gpg: Good signature from "Hanna Reitz <hreitz@redhat.com>" [marginal] # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: CB62 D7A0 EE38 29E4 5F00 4D34 A1FA 40D0 9801 9CDF * remotes/hreitz-gitlab/tags/pull-block-2022-02-01: (24 commits) block.h: remove outdated comment iotests/migration-permissions: New test block-backend: Retain permissions after migration iotests: declare lack of support for compresion_type in IMGOPTS iotest 214: explicit compression type iotests 60: more accurate set dirty bit in qcow2 header iotests: bash tests: filter compression type iotest 39: use _qcow2_dump_header iotests: massive use _qcow2_dump_header iotests/common.rc: introduce _qcow2_dump_header helper qcow2: simple case support for downgrading of qcow2 images with zstd iotest 302: use img_info_log() helper iotests.py: filter compression type out iotests.py: filter out successful output of qemu-img create iotest 065: explicit compression type iotest 303: explicit compression type iotests.py: rewrite default luks support in qemu_img iotests: drop qemu_img_verbose() helper iotests.py: qemu_img*("create"): support IMGOPTS='compression_type=zstd' iotests: specify some unsupported_imgopts for python iotests ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
@@ -190,6 +190,7 @@ static void blk_root_activate(BdrvChild *child, Error **errp)
|
||||
{
|
||||
BlockBackend *blk = child->opaque;
|
||||
Error *local_err = NULL;
|
||||
uint64_t saved_shared_perm;
|
||||
|
||||
if (!blk->disable_perm) {
|
||||
return;
|
||||
@@ -197,12 +198,22 @@ static void blk_root_activate(BdrvChild *child, Error **errp)
|
||||
|
||||
blk->disable_perm = false;
|
||||
|
||||
/*
|
||||
* blk->shared_perm contains the permissions we want to share once
|
||||
* migration is really completely done. For now, we need to share
|
||||
* all; but we also need to retain blk->shared_perm, which is
|
||||
* overwritten by a successful blk_set_perm() call. Save it and
|
||||
* restore it below.
|
||||
*/
|
||||
saved_shared_perm = blk->shared_perm;
|
||||
|
||||
blk_set_perm(blk, blk->perm, BLK_PERM_ALL, &local_err);
|
||||
if (local_err) {
|
||||
error_propagate(errp, local_err);
|
||||
blk->disable_perm = true;
|
||||
return;
|
||||
}
|
||||
blk->shared_perm = saved_shared_perm;
|
||||
|
||||
if (runstate_check(RUN_STATE_INMIGRATE)) {
|
||||
/* Activation can happen when migration process is still active, for
|
||||
|
||||
+56
-2
@@ -5279,6 +5279,38 @@ static int qcow2_load_vmstate(BlockDriverState *bs, QEMUIOVector *qiov,
|
||||
return bs->drv->bdrv_co_preadv_part(bs, offset, qiov->size, qiov, 0, 0);
|
||||
}
|
||||
|
||||
static int qcow2_has_compressed_clusters(BlockDriverState *bs)
|
||||
{
|
||||
int64_t offset = 0;
|
||||
int64_t bytes = bdrv_getlength(bs);
|
||||
|
||||
if (bytes < 0) {
|
||||
return bytes;
|
||||
}
|
||||
|
||||
while (bytes != 0) {
|
||||
int ret;
|
||||
QCow2SubclusterType type;
|
||||
unsigned int cur_bytes = MIN(INT_MAX, bytes);
|
||||
uint64_t host_offset;
|
||||
|
||||
ret = qcow2_get_host_offset(bs, offset, &cur_bytes, &host_offset,
|
||||
&type);
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (type == QCOW2_SUBCLUSTER_COMPRESSED) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
offset += cur_bytes;
|
||||
bytes -= cur_bytes;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Downgrades an image's version. To achieve this, any incompatible features
|
||||
* have to be removed.
|
||||
@@ -5336,9 +5368,10 @@ static int qcow2_downgrade(BlockDriverState *bs, int target_version,
|
||||
* the first place; if that happens nonetheless, returning -ENOTSUP is the
|
||||
* best thing to do anyway */
|
||||
|
||||
if (s->incompatible_features) {
|
||||
if (s->incompatible_features & ~QCOW2_INCOMPAT_COMPRESSION) {
|
||||
error_setg(errp, "Cannot downgrade an image with incompatible features "
|
||||
"%#" PRIx64 " set", s->incompatible_features);
|
||||
"0x%" PRIx64 " set",
|
||||
s->incompatible_features & ~QCOW2_INCOMPAT_COMPRESSION);
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
@@ -5356,6 +5389,27 @@ static int qcow2_downgrade(BlockDriverState *bs, int target_version,
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (s->incompatible_features & QCOW2_INCOMPAT_COMPRESSION) {
|
||||
ret = qcow2_has_compressed_clusters(bs);
|
||||
if (ret < 0) {
|
||||
error_setg(errp, "Failed to check block status");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (ret) {
|
||||
error_setg(errp, "Cannot downgrade an image with zstd compression "
|
||||
"type and existing compressed clusters");
|
||||
return -ENOTSUP;
|
||||
}
|
||||
/*
|
||||
* No compressed clusters for now, so just chose default zlib
|
||||
* compression.
|
||||
*/
|
||||
s->incompatible_features &= ~QCOW2_INCOMPAT_COMPRESSION;
|
||||
s->compression_type = QCOW2_COMPRESSION_TYPE_ZLIB;
|
||||
}
|
||||
|
||||
assert(s->incompatible_features == 0);
|
||||
|
||||
s->qcow_version = target_version;
|
||||
ret = qcow2_update_header(bs);
|
||||
if (ret < 0) {
|
||||
|
||||
@@ -344,7 +344,6 @@ typedef unsigned int BdrvChildRole;
|
||||
char *bdrv_perm_names(uint64_t perm);
|
||||
uint64_t bdrv_qapi_perm_to_blk_perm(BlockPermission qapi_perm);
|
||||
|
||||
/* disk I/O throttling */
|
||||
void bdrv_init(void);
|
||||
void bdrv_init_with_whitelist(void);
|
||||
bool bdrv_uses_whitelist(void);
|
||||
|
||||
@@ -42,8 +42,9 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
_supported_fmt qcow2
|
||||
_supported_proto file fuse
|
||||
# We want to test compat=0.10, which does not support external data
|
||||
# files or refcount widths other than 16
|
||||
_unsupported_imgopts data_file 'refcount_bits=\([^1]\|.\([^6]\|$\)\)'
|
||||
# files or refcount widths other than 16 or compression type
|
||||
_unsupported_imgopts data_file compression_type \
|
||||
'refcount_bits=\([^1]\|.\([^6]\|$\)\)'
|
||||
|
||||
CLUSTER_SIZE=65536
|
||||
|
||||
@@ -58,21 +59,21 @@ for compat in "compat=0.10" "compat=1.1"; do
|
||||
echo
|
||||
_make_test_img -o $compat 64M
|
||||
$PYTHON qcow2.py "$TEST_IMG" add-header-ext 0x12345678 "This is a test header extension"
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
||||
_qcow2_dump_header
|
||||
_check_test_img
|
||||
|
||||
echo
|
||||
echo === Rewrite header with no backing file ===
|
||||
echo
|
||||
$QEMU_IMG rebase -u -b "" "$TEST_IMG"
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
||||
_qcow2_dump_header
|
||||
_check_test_img
|
||||
|
||||
echo
|
||||
echo === Add a backing file and format ===
|
||||
echo
|
||||
$QEMU_IMG rebase -u -b "/some/backing/file/path" -F host_device "$TEST_IMG"
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
||||
_qcow2_dump_header
|
||||
done
|
||||
|
||||
# success, all done
|
||||
|
||||
@@ -58,7 +58,7 @@ $PYTHON qcow2.py "$TEST_IMG" set-feature-bit incompatible 63
|
||||
|
||||
# Without feature table
|
||||
$PYTHON qcow2.py "$TEST_IMG" del-header-ext 0x6803f857
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep features
|
||||
_qcow2_dump_header | grep features
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header-exts
|
||||
_img_info
|
||||
|
||||
@@ -107,7 +107,7 @@ echo === Create image with unknown autoclear feature bit ===
|
||||
echo
|
||||
_make_test_img 64M
|
||||
$PYTHON qcow2.py "$TEST_IMG" set-feature-bit autoclear 63
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep features
|
||||
_qcow2_dump_header | grep features
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header-exts
|
||||
|
||||
echo
|
||||
@@ -115,7 +115,7 @@ echo === Repair image ===
|
||||
echo
|
||||
_check_test_img -r all
|
||||
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep features
|
||||
_qcow2_dump_header | grep features
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header-exts
|
||||
|
||||
# success, all done
|
||||
|
||||
+11
-11
@@ -59,7 +59,7 @@ _make_test_img -o "compat=1.1,lazy_refcounts=on" $size
|
||||
$QEMU_IO -c "write -P 0x5a 0 512" "$TEST_IMG" | _filter_qemu_io
|
||||
|
||||
# The dirty bit must not be set
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
_check_test_img
|
||||
|
||||
echo
|
||||
@@ -73,7 +73,7 @@ $QEMU_IO -c "write -P 0x5a 0 512" \
|
||||
| _filter_qemu_io
|
||||
|
||||
# The dirty bit must be set
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
_check_test_img
|
||||
|
||||
echo
|
||||
@@ -82,7 +82,7 @@ echo "== Read-only access must still work =="
|
||||
$QEMU_IO -r -c "read -P 0x5a 0 512" "$TEST_IMG" | _filter_qemu_io
|
||||
|
||||
# The dirty bit must be set
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
|
||||
echo
|
||||
echo "== Repairing the image file must succeed =="
|
||||
@@ -90,7 +90,7 @@ echo "== Repairing the image file must succeed =="
|
||||
_check_test_img -r all
|
||||
|
||||
# The dirty bit must not be set
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
|
||||
echo
|
||||
echo "== Data should still be accessible after repair =="
|
||||
@@ -108,12 +108,12 @@ $QEMU_IO -c "write -P 0x5a 0 512" \
|
||||
| _filter_qemu_io
|
||||
|
||||
# The dirty bit must be set
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
|
||||
$QEMU_IO -c "write 0 512" "$TEST_IMG" | _filter_qemu_io
|
||||
|
||||
# The dirty bit must not be set
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
|
||||
echo
|
||||
echo "== Creating an image file with lazy_refcounts=off =="
|
||||
@@ -126,7 +126,7 @@ $QEMU_IO -c "write -P 0x5a 0 512" \
|
||||
| _filter_qemu_io
|
||||
|
||||
# The dirty bit must not be set since lazy_refcounts=off
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
_check_test_img
|
||||
|
||||
echo
|
||||
@@ -141,8 +141,8 @@ $QEMU_IO -c "write 0 512" "$TEST_IMG" | _filter_qemu_io
|
||||
$QEMU_IMG commit "$TEST_IMG"
|
||||
|
||||
# The dirty bit must not be set
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
$PYTHON qcow2.py "$TEST_IMG".base dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
_qcow2_dump_header "$TEST_IMG".base | grep incompatible_features
|
||||
|
||||
_check_test_img
|
||||
TEST_IMG="$TEST_IMG".base _check_test_img
|
||||
@@ -159,7 +159,7 @@ $QEMU_IO -c "reopen -o lazy-refcounts=on" \
|
||||
| _filter_qemu_io
|
||||
|
||||
# The dirty bit must be set
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
_check_test_img
|
||||
|
||||
_make_test_img -o "compat=1.1,lazy_refcounts=on" $size
|
||||
@@ -171,7 +171,7 @@ $QEMU_IO -c "reopen -o lazy-refcounts=off" \
|
||||
| _filter_qemu_io
|
||||
|
||||
# The dirty bit must not be set
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
_check_test_img
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import os
|
||||
import qcow2
|
||||
from qcow2 import QcowHeader
|
||||
import iotests
|
||||
from iotests import qemu_img, qemu_img_verbose, qemu_io
|
||||
from iotests import qemu_img, qemu_img_log, qemu_io
|
||||
import struct
|
||||
import subprocess
|
||||
import sys
|
||||
@@ -112,9 +112,11 @@ class TestRefcountTableGrowth(iotests.QMPTestCase):
|
||||
|
||||
def test_grow_refcount_table(self):
|
||||
qemu_io('-c', 'write 3800M 1M', test_img)
|
||||
qemu_img_verbose('check' , test_img)
|
||||
qemu_img_log('check' , test_img)
|
||||
pass
|
||||
|
||||
if __name__ == '__main__':
|
||||
iotests.activate_logging()
|
||||
iotests.main(supported_fmts=['qcow2'],
|
||||
supported_protocols=['file'])
|
||||
supported_protocols=['file'],
|
||||
unsupported_imgopts=['refcount_bits'])
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
No errors were found on the image.
|
||||
7292415/33554432 = 21.73% allocated, 0.00% fragmented, 0.00% compressed clusters
|
||||
Image end offset: 4296217088
|
||||
|
||||
.
|
||||
----------------------------------------------------------------------
|
||||
Ran 1 tests
|
||||
|
||||
@@ -41,10 +41,15 @@ _supported_fmt qcow2
|
||||
_supported_proto file
|
||||
# A compat=0.10 image is created in this test which does not support anything
|
||||
# other than refcount_bits=16;
|
||||
# it also will not support an external data file
|
||||
_unsupported_imgopts 'refcount_bits=\([^1]\|.\([^6]\|$\)\)' data_file
|
||||
# it also will not support an external data file and compression type
|
||||
_unsupported_imgopts 'refcount_bits=\([^1]\|.\([^6]\|$\)\)' data_file \
|
||||
compression_type
|
||||
_require_drivers nbd
|
||||
|
||||
if [ "$QEMU_DEFAULT_MACHINE" = "pc" ]; then
|
||||
_require_devices lsi53c895a
|
||||
fi
|
||||
|
||||
do_run_qemu()
|
||||
{
|
||||
echo Testing: "$@"
|
||||
|
||||
+11
-11
@@ -80,13 +80,13 @@ poke_file "$TEST_IMG" "$l1_offset" "\x80\x00\x00\x00\x00\x03\x00\x00"
|
||||
_check_test_img
|
||||
|
||||
# The corrupt bit should not be set anyway
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
|
||||
# Try to write something, thereby forcing the corrupt bit to be set
|
||||
$QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io
|
||||
|
||||
# The corrupt bit must now be set
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
|
||||
# This information should be available through qemu-img info
|
||||
_img_info --format-specific
|
||||
@@ -114,19 +114,19 @@ poke_file "$TEST_IMG" "$(($rb_offset+8))" "\x00\x01"
|
||||
# Redirect new data cluster onto refcount block
|
||||
poke_file "$TEST_IMG" "$l2_offset" "\x80\x00\x00\x00\x00\x02\x00\x00"
|
||||
_check_test_img
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
$QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
|
||||
# Try to fix it
|
||||
_check_test_img -r all
|
||||
|
||||
# The corrupt bit should be cleared
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
|
||||
# Look if it's really really fixed
|
||||
$QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
|
||||
echo
|
||||
echo "=== Testing cluster data reference into inactive L2 table ==="
|
||||
@@ -139,13 +139,13 @@ $QEMU_IO -c "$OPEN_RW" -c "write -P 2 0 512" | _filter_qemu_io
|
||||
poke_file "$TEST_IMG" "$l2_offset_after_snapshot" \
|
||||
"\x80\x00\x00\x00\x00\x04\x00\x00"
|
||||
_check_test_img
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
$QEMU_IO -c "$OPEN_RW" -c "write -P 3 0 512" | _filter_qemu_io
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
_check_test_img -r all
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
$QEMU_IO -c "$OPEN_RW" -c "write -P 4 0 512" | _filter_qemu_io
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||
_qcow2_dump_header | grep incompatible_features
|
||||
|
||||
# Check data
|
||||
$QEMU_IO -c "$OPEN_RO" -c "read -P 4 0 512" | _filter_qemu_io
|
||||
@@ -326,7 +326,7 @@ _make_test_img 64M
|
||||
# Let the refblock appear unaligned
|
||||
poke_file "$TEST_IMG" "$rt_offset" "\x00\x00\x00\x00\xff\xff\x2a\x00"
|
||||
# Mark the image dirty, thus forcing an automatic check when opening it
|
||||
poke_file "$TEST_IMG" 72 "\x00\x00\x00\x00\x00\x00\x00\x01"
|
||||
$PYTHON qcow2.py "$TEST_IMG" set-feature-bit incompatible 0
|
||||
# Open the image (qemu should refuse to do so)
|
||||
$QEMU_IO -c close "$TEST_IMG" 2>&1 | _filter_testdir | _filter_imgfmt
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ virtual size: 64 MiB (67108864 bytes)
|
||||
cluster_size: 65536
|
||||
Format specific information:
|
||||
compat: 1.1
|
||||
compression type: zlib
|
||||
compression type: COMPRESSION_TYPE
|
||||
lazy refcounts: false
|
||||
refcount bits: 16
|
||||
corrupt: true
|
||||
|
||||
+23
-19
@@ -48,16 +48,20 @@ _supported_os Linux
|
||||
# not work with it;
|
||||
# we have explicit tests for various cluster sizes, the remaining tests
|
||||
# require the default 64k cluster
|
||||
_unsupported_imgopts 'refcount_bits=\([^1]\|.\([^6]\|$\)\)' data_file cluster_size
|
||||
# we don't have explicit tests for zstd qcow2 compression type, as zstd may be
|
||||
# not compiled in. And we can't create compat images with comression type
|
||||
# extension
|
||||
_unsupported_imgopts 'refcount_bits=\([^1]\|.\([^6]\|$\)\)' data_file \
|
||||
cluster_size compression_type
|
||||
|
||||
echo
|
||||
echo "=== Testing version downgrade with zero expansion ==="
|
||||
echo
|
||||
_make_test_img -o "compat=1.1,lazy_refcounts=on" 64M
|
||||
$QEMU_IO -c "write -z 0 128k" "$TEST_IMG" | _filter_qemu_io
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
||||
_qcow2_dump_header
|
||||
$QEMU_IMG amend -o "compat=0.10" "$TEST_IMG"
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
||||
_qcow2_dump_header
|
||||
$QEMU_IO -c "read -P 0 0 128k" "$TEST_IMG" | _filter_qemu_io
|
||||
_check_test_img
|
||||
|
||||
@@ -68,10 +72,10 @@ _make_test_img -o "compat=1.1,lazy_refcounts=on" 64M
|
||||
$QEMU_IO -c "write -z 0 128k" "$TEST_IMG" | _filter_qemu_io
|
||||
$QEMU_IO -c "write -z 32M 128k" "$TEST_IMG" | _filter_qemu_io
|
||||
$QEMU_IO -c map "$TEST_IMG" | _filter_qemu_io
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
||||
_qcow2_dump_header
|
||||
$QEMU_IMG amend -o "compat=0.10" --image-opts \
|
||||
driver=qcow2,file.filename=$TEST_IMG,l2-cache-entry-size=4096
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
||||
_qcow2_dump_header
|
||||
$QEMU_IO -c "read -P 0 0 128k" "$TEST_IMG" | _filter_qemu_io
|
||||
$QEMU_IO -c "read -P 0 32M 128k" "$TEST_IMG" | _filter_qemu_io
|
||||
$QEMU_IO -c map "$TEST_IMG" | _filter_qemu_io
|
||||
@@ -84,9 +88,9 @@ _make_test_img -o "compat=1.1,lazy_refcounts=on" 64M
|
||||
_NO_VALGRIND \
|
||||
$QEMU_IO -c "write -P 0x2a 0 128k" -c flush \
|
||||
-c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 | _filter_qemu_io
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
||||
_qcow2_dump_header
|
||||
$QEMU_IMG amend -o "compat=0.10" "$TEST_IMG"
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
||||
_qcow2_dump_header
|
||||
$QEMU_IO -c "read -P 0x2a 0 128k" "$TEST_IMG" | _filter_qemu_io
|
||||
_check_test_img
|
||||
|
||||
@@ -96,9 +100,9 @@ echo
|
||||
_make_test_img -o "compat=1.1" 64M
|
||||
$PYTHON qcow2.py "$TEST_IMG" set-feature-bit compatible 42
|
||||
$PYTHON qcow2.py "$TEST_IMG" set-feature-bit autoclear 42
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
||||
_qcow2_dump_header
|
||||
$QEMU_IMG amend -o "compat=0.10" "$TEST_IMG"
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
||||
_qcow2_dump_header
|
||||
_check_test_img
|
||||
|
||||
echo
|
||||
@@ -106,9 +110,9 @@ echo "=== Testing version upgrade and resize ==="
|
||||
echo
|
||||
_make_test_img -o "compat=0.10" 64M
|
||||
$QEMU_IO -c "write -P 0x2a 42M 64k" "$TEST_IMG" | _filter_qemu_io
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
||||
_qcow2_dump_header
|
||||
$QEMU_IMG amend -o "compat=1.1,lazy_refcounts=on,size=128M" "$TEST_IMG"
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
||||
_qcow2_dump_header
|
||||
$QEMU_IO -c "read -P 0x2a 42M 64k" "$TEST_IMG" | _filter_qemu_io
|
||||
_check_test_img
|
||||
|
||||
@@ -120,29 +124,29 @@ $QEMU_IO -c "write -P 0x2a 24M 64k" "$TEST_IMG" | _filter_qemu_io
|
||||
$QEMU_IMG snapshot -c foo "$TEST_IMG"
|
||||
$QEMU_IMG resize "$TEST_IMG" 64M &&
|
||||
echo "unexpected pass"
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep '^\(version\|size\|nb_snap\)'
|
||||
_qcow2_dump_header | grep '^\(version\|size\|nb_snap\)'
|
||||
|
||||
$QEMU_IMG amend -o "compat=1.1,size=128M" "$TEST_IMG" ||
|
||||
echo "unexpected fail"
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep '^\(version\|size\|nb_snap\)'
|
||||
_qcow2_dump_header | grep '^\(version\|size\|nb_snap\)'
|
||||
|
||||
$QEMU_IMG snapshot -c bar "$TEST_IMG"
|
||||
$QEMU_IMG resize --shrink "$TEST_IMG" 64M ||
|
||||
echo "unexpected fail"
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep '^\(version\|size\|nb_snap\)'
|
||||
_qcow2_dump_header | grep '^\(version\|size\|nb_snap\)'
|
||||
|
||||
$QEMU_IMG amend -o "compat=0.10,size=32M" "$TEST_IMG" &&
|
||||
echo "unexpected pass"
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep '^\(version\|size\|nb_snap\)'
|
||||
_qcow2_dump_header | grep '^\(version\|size\|nb_snap\)'
|
||||
|
||||
$QEMU_IMG snapshot -a bar "$TEST_IMG" ||
|
||||
echo "unexpected fail"
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep '^\(version\|size\|nb_snap\)'
|
||||
_qcow2_dump_header | grep '^\(version\|size\|nb_snap\)'
|
||||
|
||||
$QEMU_IMG snapshot -d bar "$TEST_IMG"
|
||||
$QEMU_IMG amend -o "compat=0.10,size=32M" "$TEST_IMG" ||
|
||||
echo "unexpected fail"
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep '^\(version\|size\|nb_snap\)'
|
||||
_qcow2_dump_header | grep '^\(version\|size\|nb_snap\)'
|
||||
|
||||
_check_test_img
|
||||
|
||||
@@ -154,9 +158,9 @@ _make_test_img -o "compat=1.1,lazy_refcounts=on" 64M
|
||||
_NO_VALGRIND \
|
||||
$QEMU_IO -c "write -P 0x2a 0 128k" -c flush \
|
||||
-c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 | _filter_qemu_io
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
||||
_qcow2_dump_header
|
||||
$QEMU_IMG amend -o "lazy_refcounts=off" "$TEST_IMG"
|
||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
||||
_qcow2_dump_header
|
||||
$QEMU_IO -c "read -P 0x2a 0 128k" "$TEST_IMG" | _filter_qemu_io
|
||||
_check_test_img
|
||||
|
||||
|
||||
@@ -525,7 +525,7 @@ virtual size: 64 MiB (67108864 bytes)
|
||||
cluster_size: 65536
|
||||
Format specific information:
|
||||
compat: 1.1
|
||||
compression type: zlib
|
||||
compression type: COMPRESSION_TYPE
|
||||
lazy refcounts: false
|
||||
refcount bits: 16
|
||||
data file: TEST_DIR/t.IMGFMT.data
|
||||
@@ -552,7 +552,7 @@ virtual size: 64 MiB (67108864 bytes)
|
||||
cluster_size: 65536
|
||||
Format specific information:
|
||||
compat: 1.1
|
||||
compression type: zlib
|
||||
compression type: COMPRESSION_TYPE
|
||||
lazy refcounts: false
|
||||
refcount bits: 16
|
||||
data file: foo
|
||||
@@ -567,7 +567,7 @@ virtual size: 64 MiB (67108864 bytes)
|
||||
cluster_size: 65536
|
||||
Format specific information:
|
||||
compat: 1.1
|
||||
compression type: zlib
|
||||
compression type: COMPRESSION_TYPE
|
||||
lazy refcounts: false
|
||||
refcount bits: 16
|
||||
data file raw: false
|
||||
@@ -583,7 +583,7 @@ virtual size: 64 MiB (67108864 bytes)
|
||||
cluster_size: 65536
|
||||
Format specific information:
|
||||
compat: 1.1
|
||||
compression type: zlib
|
||||
compression type: COMPRESSION_TYPE
|
||||
lazy refcounts: false
|
||||
refcount bits: 16
|
||||
data file: TEST_DIR/t.IMGFMT.data
|
||||
@@ -597,7 +597,7 @@ virtual size: 64 MiB (67108864 bytes)
|
||||
cluster_size: 65536
|
||||
Format specific information:
|
||||
compat: 1.1
|
||||
compression type: zlib
|
||||
compression type: COMPRESSION_TYPE
|
||||
lazy refcounts: false
|
||||
refcount bits: 16
|
||||
data file: TEST_DIR/t.IMGFMT.data
|
||||
@@ -612,7 +612,7 @@ virtual size: 64 MiB (67108864 bytes)
|
||||
cluster_size: 65536
|
||||
Format specific information:
|
||||
compat: 1.1
|
||||
compression type: zlib
|
||||
compression type: COMPRESSION_TYPE
|
||||
lazy refcounts: false
|
||||
refcount bits: 16
|
||||
data file: TEST_DIR/t.IMGFMT.data
|
||||
|
||||
+10
-9
@@ -88,7 +88,7 @@ class TestQMP(TestImageInfoSpecific):
|
||||
|
||||
class TestQCow2(TestQemuImgInfo):
|
||||
'''Testing a qcow2 version 2 image'''
|
||||
img_options = 'compat=0.10'
|
||||
img_options = 'compat=0.10,compression_type=zlib'
|
||||
json_compare = { 'compat': '0.10', 'refcount-bits': 16,
|
||||
'compression-type': 'zlib' }
|
||||
human_compare = [ 'compat: 0.10', 'compression type: zlib',
|
||||
@@ -96,17 +96,17 @@ class TestQCow2(TestQemuImgInfo):
|
||||
|
||||
class TestQCow3NotLazy(TestQemuImgInfo):
|
||||
'''Testing a qcow2 version 3 image with lazy refcounts disabled'''
|
||||
img_options = 'compat=1.1,lazy_refcounts=off'
|
||||
img_options = 'compat=1.1,lazy_refcounts=off,compression_type=zstd'
|
||||
json_compare = { 'compat': '1.1', 'lazy-refcounts': False,
|
||||
'refcount-bits': 16, 'corrupt': False,
|
||||
'compression-type': 'zlib', 'extended-l2': False }
|
||||
human_compare = [ 'compat: 1.1', 'compression type: zlib',
|
||||
'compression-type': 'zstd', 'extended-l2': False }
|
||||
human_compare = [ 'compat: 1.1', 'compression type: zstd',
|
||||
'lazy refcounts: false', 'refcount bits: 16',
|
||||
'corrupt: false', 'extended l2: false' ]
|
||||
|
||||
class TestQCow3Lazy(TestQemuImgInfo):
|
||||
'''Testing a qcow2 version 3 image with lazy refcounts enabled'''
|
||||
img_options = 'compat=1.1,lazy_refcounts=on'
|
||||
img_options = 'compat=1.1,lazy_refcounts=on,compression_type=zlib'
|
||||
json_compare = { 'compat': '1.1', 'lazy-refcounts': True,
|
||||
'refcount-bits': 16, 'corrupt': False,
|
||||
'compression-type': 'zlib', 'extended-l2': False }
|
||||
@@ -117,7 +117,7 @@ class TestQCow3Lazy(TestQemuImgInfo):
|
||||
class TestQCow3NotLazyQMP(TestQMP):
|
||||
'''Testing a qcow2 version 3 image with lazy refcounts disabled, opening
|
||||
with lazy refcounts enabled'''
|
||||
img_options = 'compat=1.1,lazy_refcounts=off'
|
||||
img_options = 'compat=1.1,lazy_refcounts=off,compression_type=zlib'
|
||||
qemu_options = 'lazy-refcounts=on'
|
||||
compare = { 'compat': '1.1', 'lazy-refcounts': False,
|
||||
'refcount-bits': 16, 'corrupt': False,
|
||||
@@ -127,11 +127,11 @@ class TestQCow3NotLazyQMP(TestQMP):
|
||||
class TestQCow3LazyQMP(TestQMP):
|
||||
'''Testing a qcow2 version 3 image with lazy refcounts enabled, opening
|
||||
with lazy refcounts disabled'''
|
||||
img_options = 'compat=1.1,lazy_refcounts=on'
|
||||
img_options = 'compat=1.1,lazy_refcounts=on,compression_type=zstd'
|
||||
qemu_options = 'lazy-refcounts=off'
|
||||
compare = { 'compat': '1.1', 'lazy-refcounts': True,
|
||||
'refcount-bits': 16, 'corrupt': False,
|
||||
'compression-type': 'zlib', 'extended-l2': False }
|
||||
'compression-type': 'zstd', 'extended-l2': False }
|
||||
|
||||
TestImageInfoSpecific = None
|
||||
TestQemuImgInfo = None
|
||||
@@ -139,4 +139,5 @@ TestQMP = None
|
||||
|
||||
if __name__ == '__main__':
|
||||
iotests.main(supported_fmts=['qcow2'],
|
||||
supported_protocols=['file'])
|
||||
supported_protocols=['file'],
|
||||
unsupported_imgopts=['refcount_bits'])
|
||||
|
||||
@@ -17,7 +17,7 @@ virtual size: 128 MiB (134217728 bytes)
|
||||
cluster_size: 4096
|
||||
Format specific information:
|
||||
compat: 1.1
|
||||
compression type: zlib
|
||||
compression type: COMPRESSION_TYPE
|
||||
lazy refcounts: true
|
||||
refcount bits: 16
|
||||
corrupt: false
|
||||
@@ -31,7 +31,7 @@ virtual size: 128 MiB (134217728 bytes)
|
||||
cluster_size: 8192
|
||||
Format specific information:
|
||||
compat: 1.1
|
||||
compression type: zlib
|
||||
compression type: COMPRESSION_TYPE
|
||||
lazy refcounts: true
|
||||
refcount bits: 16
|
||||
corrupt: false
|
||||
@@ -329,7 +329,7 @@ virtual size: 128 MiB (134217728 bytes)
|
||||
cluster_size: 4096
|
||||
Format specific information:
|
||||
compat: 1.1
|
||||
compression type: zlib
|
||||
compression type: COMPRESSION_TYPE
|
||||
lazy refcounts: true
|
||||
refcount bits: 16
|
||||
corrupt: false
|
||||
@@ -342,7 +342,7 @@ virtual size: 128 MiB (134217728 bytes)
|
||||
cluster_size: 8192
|
||||
Format specific information:
|
||||
compat: 1.1
|
||||
compression type: zlib
|
||||
compression type: COMPRESSION_TYPE
|
||||
lazy refcounts: true
|
||||
refcount bits: 16
|
||||
corrupt: false
|
||||
@@ -639,7 +639,7 @@ virtual size: 128 MiB (134217728 bytes)
|
||||
cluster_size: 65536
|
||||
Format specific information:
|
||||
compat: 1.1
|
||||
compression type: zlib
|
||||
compression type: COMPRESSION_TYPE
|
||||
lazy refcounts: true
|
||||
refcount bits: 16
|
||||
corrupt: false
|
||||
@@ -652,7 +652,7 @@ virtual size: 130 MiB (136314880 bytes)
|
||||
cluster_size: 65536
|
||||
Format specific information:
|
||||
compat: 1.1
|
||||
compression type: zlib
|
||||
compression type: COMPRESSION_TYPE
|
||||
lazy refcounts: false
|
||||
refcount bits: 16
|
||||
corrupt: false
|
||||
@@ -665,7 +665,7 @@ virtual size: 132 MiB (138412032 bytes)
|
||||
cluster_size: 65536
|
||||
Format specific information:
|
||||
compat: 1.1
|
||||
compression type: zlib
|
||||
compression type: COMPRESSION_TYPE
|
||||
lazy refcounts: true
|
||||
refcount bits: 16
|
||||
corrupt: false
|
||||
|
||||
@@ -43,7 +43,8 @@ _supported_proto file fuse
|
||||
# This test will set refcount_bits on its own which would conflict with the
|
||||
# manual setting; compat will be overridden as well;
|
||||
# and external data files do not work well with our refcount testing
|
||||
_unsupported_imgopts refcount_bits 'compat=0.10' data_file
|
||||
# also, compression type is not supported with compat=0.10 used in test
|
||||
_unsupported_imgopts refcount_bits 'compat=0.10' data_file compression_type
|
||||
|
||||
print_refcount_bits()
|
||||
{
|
||||
|
||||
@@ -140,7 +140,7 @@ $QEMU_IO \
|
||||
|
||||
# The dirty bit must not be set
|
||||
# (Filter the external data file bit)
|
||||
if $PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features \
|
||||
if _qcow2_dump_header | grep incompatible_features \
|
||||
| grep -q '\<0\>'
|
||||
then
|
||||
echo 'ERROR: Dirty bit set'
|
||||
|
||||
@@ -61,7 +61,6 @@ unlink TEST_DIR/luks-aes-256-xts-plain64-sha1.img
|
||||
# ================= qemu-img aes-256-xts-plain64-sha1 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-aes-256-xts-plain64-sha1.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-aes-256-xts-plain64-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha1 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha1.img qiotest-145-aes-256-xts-plain64-sha1
|
||||
@@ -181,7 +180,6 @@ unlink TEST_DIR/luks-twofish-256-xts-plain64-sha1.img
|
||||
# ================= qemu-img twofish-256-xts-plain64-sha1 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=twofish-256,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-twofish-256-xts-plain64-sha1.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-twofish-256-xts-plain64-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=twofish-256 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha1 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-twofish-256-xts-plain64-sha1.img qiotest-145-twofish-256-xts-plain64-sha1
|
||||
@@ -301,7 +299,6 @@ unlink TEST_DIR/luks-serpent-256-xts-plain64-sha1.img
|
||||
# ================= qemu-img serpent-256-xts-plain64-sha1 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=serpent-256,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-serpent-256-xts-plain64-sha1.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-serpent-256-xts-plain64-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=serpent-256 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha1 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-serpent-256-xts-plain64-sha1.img qiotest-145-serpent-256-xts-plain64-sha1
|
||||
@@ -421,7 +418,6 @@ unlink TEST_DIR/luks-cast5-128-cbc-plain64-sha1.img
|
||||
# ================= qemu-img cast5-128-cbc-plain64-sha1 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=cast5-128,cipher-mode=cbc,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-cast5-128-cbc-plain64-sha1.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-cast5-128-cbc-plain64-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=cast5-128 cipher-mode=cbc ivgen-alg=plain64 hash-alg=sha1 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-cast5-128-cbc-plain64-sha1.img qiotest-145-cast5-128-cbc-plain64-sha1
|
||||
@@ -542,7 +538,6 @@ unlink TEST_DIR/luks-aes-256-cbc-plain-sha1.img
|
||||
# ================= qemu-img aes-256-cbc-plain-sha1 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=cbc,ivgen-alg=plain,hash-alg=sha1 TEST_DIR/luks-aes-256-cbc-plain-sha1.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-aes-256-cbc-plain-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=cbc ivgen-alg=plain hash-alg=sha1 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-plain-sha1.img qiotest-145-aes-256-cbc-plain-sha1
|
||||
@@ -662,7 +657,6 @@ unlink TEST_DIR/luks-aes-256-cbc-plain64-sha1.img
|
||||
# ================= qemu-img aes-256-cbc-plain64-sha1 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=cbc,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-aes-256-cbc-plain64-sha1.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-aes-256-cbc-plain64-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=cbc ivgen-alg=plain64 hash-alg=sha1 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-plain64-sha1.img qiotest-145-aes-256-cbc-plain64-sha1
|
||||
@@ -782,7 +776,6 @@ unlink TEST_DIR/luks-aes-256-cbc-essiv-sha256-sha1.img
|
||||
# ================= qemu-img aes-256-cbc-essiv-sha256-sha1 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=cbc,ivgen-alg=essiv,hash-alg=sha1,ivgen-hash-alg=sha256 TEST_DIR/luks-aes-256-cbc-essiv-sha256-sha1.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-aes-256-cbc-essiv-sha256-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=cbc ivgen-alg=essiv ivgen-hash-alg=sha256 hash-alg=sha1 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-essiv-sha256-sha1.img qiotest-145-aes-256-cbc-essiv-sha256-sha1
|
||||
@@ -902,7 +895,6 @@ unlink TEST_DIR/luks-aes-256-xts-essiv-sha256-sha1.img
|
||||
# ================= qemu-img aes-256-xts-essiv-sha256-sha1 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=xts,ivgen-alg=essiv,hash-alg=sha1,ivgen-hash-alg=sha256 TEST_DIR/luks-aes-256-xts-essiv-sha256-sha1.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-aes-256-xts-essiv-sha256-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=xts ivgen-alg=essiv ivgen-hash-alg=sha256 hash-alg=sha1 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-essiv-sha256-sha1.img qiotest-145-aes-256-xts-essiv-sha256-sha1
|
||||
@@ -1022,7 +1014,6 @@ unlink TEST_DIR/luks-aes-128-xts-plain64-sha256-sha1.img
|
||||
# ================= qemu-img aes-128-xts-plain64-sha256-sha1 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-128,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-aes-128-xts-plain64-sha256-sha1.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-aes-128-xts-plain64-sha256-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-128 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha1 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-128-xts-plain64-sha256-sha1.img qiotest-145-aes-128-xts-plain64-sha256-sha1
|
||||
@@ -1142,7 +1133,6 @@ unlink TEST_DIR/luks-aes-192-xts-plain64-sha256-sha1.img
|
||||
# ================= qemu-img aes-192-xts-plain64-sha256-sha1 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-192,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-aes-192-xts-plain64-sha256-sha1.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-aes-192-xts-plain64-sha256-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-192 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha1 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-192-xts-plain64-sha256-sha1.img qiotest-145-aes-192-xts-plain64-sha256-sha1
|
||||
@@ -1262,7 +1252,6 @@ unlink TEST_DIR/luks-twofish-128-xts-plain64-sha1.img
|
||||
# ================= qemu-img twofish-128-xts-plain64-sha1 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=twofish-128,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-twofish-128-xts-plain64-sha1.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-twofish-128-xts-plain64-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=twofish-128 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha1 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-twofish-128-xts-plain64-sha1.img qiotest-145-twofish-128-xts-plain64-sha1
|
||||
@@ -1383,7 +1372,6 @@ unlink TEST_DIR/luks-serpent-128-xts-plain64-sha1.img
|
||||
# ================= qemu-img serpent-128-xts-plain64-sha1 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=serpent-128,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-serpent-128-xts-plain64-sha1.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-serpent-128-xts-plain64-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=serpent-128 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha1 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-serpent-128-xts-plain64-sha1.img qiotest-145-serpent-128-xts-plain64-sha1
|
||||
@@ -1503,7 +1491,6 @@ unlink TEST_DIR/luks-serpent-192-xts-plain64-sha1.img
|
||||
# ================= qemu-img serpent-192-xts-plain64-sha1 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=serpent-192,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-serpent-192-xts-plain64-sha1.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-serpent-192-xts-plain64-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=serpent-192 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha1 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-serpent-192-xts-plain64-sha1.img qiotest-145-serpent-192-xts-plain64-sha1
|
||||
@@ -1625,7 +1612,6 @@ unlink TEST_DIR/luks-aes-256-xts-plain64-sha224.img
|
||||
# ================= qemu-img aes-256-xts-plain64-sha224 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha224 TEST_DIR/luks-aes-256-xts-plain64-sha224.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-aes-256-xts-plain64-sha224.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha224 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha224.img qiotest-145-aes-256-xts-plain64-sha224
|
||||
@@ -1745,7 +1731,6 @@ unlink TEST_DIR/luks-aes-256-xts-plain64-sha256.img
|
||||
# ================= qemu-img aes-256-xts-plain64-sha256 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha256 TEST_DIR/luks-aes-256-xts-plain64-sha256.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-aes-256-xts-plain64-sha256.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha256 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha256.img qiotest-145-aes-256-xts-plain64-sha256
|
||||
@@ -1865,7 +1850,6 @@ unlink TEST_DIR/luks-aes-256-xts-plain64-sha384.img
|
||||
# ================= qemu-img aes-256-xts-plain64-sha384 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha384 TEST_DIR/luks-aes-256-xts-plain64-sha384.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-aes-256-xts-plain64-sha384.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha384 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha384.img qiotest-145-aes-256-xts-plain64-sha384
|
||||
@@ -1985,7 +1969,6 @@ unlink TEST_DIR/luks-aes-256-xts-plain64-sha512.img
|
||||
# ================= qemu-img aes-256-xts-plain64-sha512 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha512 TEST_DIR/luks-aes-256-xts-plain64-sha512.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-aes-256-xts-plain64-sha512.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha512 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha512.img qiotest-145-aes-256-xts-plain64-sha512
|
||||
@@ -2105,7 +2088,6 @@ unlink TEST_DIR/luks-aes-256-xts-plain64-ripemd160.img
|
||||
# ================= qemu-img aes-256-xts-plain64-ripemd160 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=xts,ivgen-alg=plain64,hash-alg=ripemd160 TEST_DIR/luks-aes-256-xts-plain64-ripemd160.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-aes-256-xts-plain64-ripemd160.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=xts ivgen-alg=plain64 hash-alg=ripemd160 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-ripemd160.img qiotest-145-aes-256-xts-plain64-ripemd160
|
||||
@@ -2299,7 +2281,6 @@ unlink TEST_DIR/luks-aes-256-xts-plain-sha1-pwallslots.img
|
||||
# ================= qemu-img aes-256-xts-plain-sha1-pwallslots =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=c2xvdDE=,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=xts,ivgen-alg=plain,hash-alg=sha1 TEST_DIR/luks-aes-256-xts-plain-sha1-pwallslots.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-aes-256-xts-plain-sha1-pwallslots.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=xts ivgen-alg=plain hash-alg=sha1 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain-sha1-pwallslots.img qiotest-145-aes-256-xts-plain-sha1-pwallslots
|
||||
@@ -2419,7 +2400,6 @@ unlink TEST_DIR/luks-aes-256-cbc-essiv-auto-sha1.img
|
||||
# ================= qemu-img aes-256-cbc-essiv-auto-sha1 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=cbc,ivgen-alg=essiv,hash-alg=sha1 TEST_DIR/luks-aes-256-cbc-essiv-auto-sha1.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-aes-256-cbc-essiv-auto-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=cbc ivgen-alg=essiv hash-alg=sha1 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-essiv-auto-sha1.img qiotest-145-aes-256-cbc-essiv-auto-sha1
|
||||
@@ -2539,7 +2519,6 @@ unlink TEST_DIR/luks-aes-256-cbc-plain64-sha256-sha1.img
|
||||
# ================= qemu-img aes-256-cbc-plain64-sha256-sha1 =================
|
||||
# Create image
|
||||
qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=cbc,ivgen-alg=plain64,hash-alg=sha1,ivgen-hash-alg=sha256 TEST_DIR/luks-aes-256-cbc-plain64-sha256-sha1.img 4194304M
|
||||
Formatting 'TEST_DIR/luks-aes-256-cbc-plain64-sha256-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=cbc ivgen-alg=plain64 ivgen-hash-alg=sha256 hash-alg=sha1 iter-time=10
|
||||
|
||||
# Open dev
|
||||
sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-plain64-sha256-sha1.img qiotest-145-aes-256-cbc-plain64-sha256-sha1
|
||||
|
||||
@@ -169,4 +169,5 @@ ShrinkBaseClass = None
|
||||
|
||||
if __name__ == '__main__':
|
||||
iotests.main(supported_fmts=['raw', 'qcow2'],
|
||||
supported_protocols=['file'])
|
||||
supported_protocols=['file'],
|
||||
unsupported_imgopts=['compat'])
|
||||
|
||||
@@ -157,4 +157,5 @@ class TestPersistentDirtyBitmap(iotests.QMPTestCase):
|
||||
|
||||
if __name__ == '__main__':
|
||||
iotests.main(supported_fmts=['qcow2'],
|
||||
supported_protocols=['file'])
|
||||
supported_protocols=['file'],
|
||||
unsupported_imgopts=['compat'])
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user