Revert "iotests: Use configured python"
This reverts commit f915db07ef9c368ea6db6430256de064fdd1525f. This commit is broken because it does not account for the build tree and the source tree being different, and can cause build failures for out-of-tree builds. Revert it until we can identify a better solution to the problem. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1400153676-30180-1-git-send-email-peter.maydell@linaro.org Acked-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
f30d56e7d6
commit
7d983531c6
6
configure
vendored
6
configure
vendored
@ -4768,12 +4768,6 @@ if test "$gcov" = "yes" ; then
|
|||||||
echo "GCOV=$gcov_tool" >> $config_host_mak
|
echo "GCOV=$gcov_tool" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
|
|
||||||
iotests_common_env="tests/qemu-iotests/common.env"
|
|
||||||
|
|
||||||
echo "# Automatically generated by configure - do not modify" > $iotests_common_env
|
|
||||||
echo >> $iotests_common_env
|
|
||||||
echo "PYTHON='$python'" >> $iotests_common_env
|
|
||||||
|
|
||||||
# use included Linux headers
|
# use included Linux headers
|
||||||
if test "$linux" = "yes" ; then
|
if test "$linux" = "yes" ; then
|
||||||
mkdir -p linux-headers
|
mkdir -p linux-headers
|
||||||
|
@ -35,7 +35,6 @@ _cleanup()
|
|||||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||||
|
|
||||||
# get standard environment, filters and checks
|
# get standard environment, filters and checks
|
||||||
. ./common.env
|
|
||||||
. ./common.rc
|
. ./common.rc
|
||||||
. ./common.filter
|
. ./common.filter
|
||||||
. ./common.pattern
|
. ./common.pattern
|
||||||
@ -57,22 +56,22 @@ for IMGOPTS in "compat=0.10" "compat=1.1"; do
|
|||||||
echo === Create image with unknown header extension ===
|
echo === Create image with unknown header extension ===
|
||||||
echo
|
echo
|
||||||
_make_test_img 64M
|
_make_test_img 64M
|
||||||
$PYTHON qcow2.py "$TEST_IMG" add-header-ext 0x12345678 "This is a test header extension"
|
./qcow2.py "$TEST_IMG" add-header-ext 0x12345678 "This is a test header extension"
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
./qcow2.py "$TEST_IMG" dump-header
|
||||||
_check_test_img
|
_check_test_img
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo === Rewrite header with no backing file ===
|
echo === Rewrite header with no backing file ===
|
||||||
echo
|
echo
|
||||||
$QEMU_IMG rebase -u -b "" "$TEST_IMG"
|
$QEMU_IMG rebase -u -b "" "$TEST_IMG"
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
./qcow2.py "$TEST_IMG" dump-header
|
||||||
_check_test_img
|
_check_test_img
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo === Add a backing file and format ===
|
echo === Add a backing file and format ===
|
||||||
echo
|
echo
|
||||||
$QEMU_IMG rebase -u -b "/some/backing/file/path" -F host_device "$TEST_IMG"
|
$QEMU_IMG rebase -u -b "/some/backing/file/path" -F host_device "$TEST_IMG"
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
./qcow2.py "$TEST_IMG" dump-header
|
||||||
done
|
done
|
||||||
|
|
||||||
# success, all done
|
# success, all done
|
||||||
|
@ -38,7 +38,6 @@ _cleanup()
|
|||||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||||
|
|
||||||
# get standard environment, filters and checks
|
# get standard environment, filters and checks
|
||||||
. ./common.env
|
|
||||||
. ./common.rc
|
. ./common.rc
|
||||||
. ./common.filter
|
. ./common.filter
|
||||||
. ./common.pattern
|
. ./common.pattern
|
||||||
@ -54,15 +53,15 @@ IMGOPTS="compat=1.1"
|
|||||||
echo === Create image with unknown autoclear feature bit ===
|
echo === Create image with unknown autoclear feature bit ===
|
||||||
echo
|
echo
|
||||||
_make_test_img 64M
|
_make_test_img 64M
|
||||||
$PYTHON qcow2.py "$TEST_IMG" set-feature-bit autoclear 63
|
./qcow2.py "$TEST_IMG" set-feature-bit autoclear 63
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
./qcow2.py "$TEST_IMG" dump-header
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo === Repair image ===
|
echo === Repair image ===
|
||||||
echo
|
echo
|
||||||
_check_test_img -r all
|
_check_test_img -r all
|
||||||
|
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
./qcow2.py "$TEST_IMG" dump-header
|
||||||
|
|
||||||
# success, all done
|
# success, all done
|
||||||
echo "*** done"
|
echo "*** done"
|
||||||
|
@ -38,7 +38,6 @@ _cleanup()
|
|||||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||||
|
|
||||||
# get standard environment, filters and checks
|
# get standard environment, filters and checks
|
||||||
. ./common.env
|
|
||||||
. ./common.rc
|
. ./common.rc
|
||||||
. ./common.filter
|
. ./common.filter
|
||||||
|
|
||||||
@ -59,7 +58,7 @@ _make_test_img $size
|
|||||||
$QEMU_IO -c "write -P 0x5a 0 512" "$TEST_IMG" | _filter_qemu_io
|
$QEMU_IO -c "write -P 0x5a 0 512" "$TEST_IMG" | _filter_qemu_io
|
||||||
|
|
||||||
# The dirty bit must not be set
|
# The dirty bit must not be set
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
./qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||||
_check_test_img
|
_check_test_img
|
||||||
|
|
||||||
echo
|
echo
|
||||||
@ -74,7 +73,7 @@ $QEMU_IO -c "write -P 0x5a 0 512" -c "abort" "$TEST_IMG" | _filter_qemu_io
|
|||||||
ulimit -c "$old_ulimit"
|
ulimit -c "$old_ulimit"
|
||||||
|
|
||||||
# The dirty bit must be set
|
# The dirty bit must be set
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
./qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||||
_check_test_img
|
_check_test_img
|
||||||
|
|
||||||
echo
|
echo
|
||||||
@ -83,7 +82,7 @@ echo "== Read-only access must still work =="
|
|||||||
$QEMU_IO -r -c "read -P 0x5a 0 512" "$TEST_IMG" | _filter_qemu_io
|
$QEMU_IO -r -c "read -P 0x5a 0 512" "$TEST_IMG" | _filter_qemu_io
|
||||||
|
|
||||||
# The dirty bit must be set
|
# The dirty bit must be set
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
./qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "== Repairing the image file must succeed =="
|
echo "== Repairing the image file must succeed =="
|
||||||
@ -91,7 +90,7 @@ echo "== Repairing the image file must succeed =="
|
|||||||
_check_test_img -r all
|
_check_test_img -r all
|
||||||
|
|
||||||
# The dirty bit must not be set
|
# The dirty bit must not be set
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
./qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "== Data should still be accessible after repair =="
|
echo "== Data should still be accessible after repair =="
|
||||||
@ -110,12 +109,12 @@ $QEMU_IO -c "write -P 0x5a 0 512" -c "abort" "$TEST_IMG" | _filter_qemu_io
|
|||||||
ulimit -c "$old_ulimit"
|
ulimit -c "$old_ulimit"
|
||||||
|
|
||||||
# The dirty bit must be set
|
# The dirty bit must be set
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
./qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||||
|
|
||||||
$QEMU_IO -c "write 0 512" "$TEST_IMG" | _filter_qemu_io
|
$QEMU_IO -c "write 0 512" "$TEST_IMG" | _filter_qemu_io
|
||||||
|
|
||||||
# The dirty bit must not be set
|
# The dirty bit must not be set
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
./qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "== Creating an image file with lazy_refcounts=off =="
|
echo "== Creating an image file with lazy_refcounts=off =="
|
||||||
@ -129,7 +128,7 @@ $QEMU_IO -c "write -P 0x5a 0 512" -c "abort" "$TEST_IMG" | _filter_qemu_io
|
|||||||
ulimit -c "$old_ulimit"
|
ulimit -c "$old_ulimit"
|
||||||
|
|
||||||
# The dirty bit must not be set since lazy_refcounts=off
|
# The dirty bit must not be set since lazy_refcounts=off
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
./qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||||
_check_test_img
|
_check_test_img
|
||||||
|
|
||||||
echo
|
echo
|
||||||
@ -145,8 +144,8 @@ $QEMU_IO -c "write 0 512" "$TEST_IMG" | _filter_qemu_io
|
|||||||
$QEMU_IMG commit "$TEST_IMG"
|
$QEMU_IMG commit "$TEST_IMG"
|
||||||
|
|
||||||
# The dirty bit must not be set
|
# The dirty bit must not be set
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
./qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||||
$PYTHON qcow2.py "$TEST_IMG".base dump-header | grep incompatible_features
|
./qcow2.py "$TEST_IMG".base dump-header | grep incompatible_features
|
||||||
|
|
||||||
_check_test_img
|
_check_test_img
|
||||||
TEST_IMG="$TEST_IMG".base _check_test_img
|
TEST_IMG="$TEST_IMG".base _check_test_img
|
||||||
|
@ -35,7 +35,6 @@ _cleanup()
|
|||||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||||
|
|
||||||
# get standard environment, filters and checks
|
# get standard environment, filters and checks
|
||||||
. ./common.env
|
|
||||||
. ./common.rc
|
. ./common.rc
|
||||||
. ./common.filter
|
. ./common.filter
|
||||||
|
|
||||||
@ -50,7 +49,7 @@ _make_test_img $((1024*1024))T
|
|||||||
echo
|
echo
|
||||||
echo "creating too large image (1 EB) using qcow2.py"
|
echo "creating too large image (1 EB) using qcow2.py"
|
||||||
_make_test_img 4G
|
_make_test_img 4G
|
||||||
$PYTHON qcow2.py "$TEST_IMG" set-header size $((1024 ** 6))
|
./qcow2.py "$TEST_IMG" set-header size $((1024 ** 6))
|
||||||
_check_test_img
|
_check_test_img
|
||||||
|
|
||||||
# success, all done
|
# success, all done
|
||||||
|
@ -35,7 +35,6 @@ _cleanup()
|
|||||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||||
|
|
||||||
# get standard environment, filters and checks
|
# get standard environment, filters and checks
|
||||||
. ./common.env
|
|
||||||
. ./common.rc
|
. ./common.rc
|
||||||
. ./common.filter
|
. ./common.filter
|
||||||
|
|
||||||
@ -69,13 +68,13 @@ poke_file "$TEST_IMG" "$l1_offset" "\x80\x00\x00\x00\x00\x03\x00\x00"
|
|||||||
_check_test_img
|
_check_test_img
|
||||||
|
|
||||||
# The corrupt bit should not be set anyway
|
# The corrupt bit should not be set anyway
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
./qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||||
|
|
||||||
# Try to write something, thereby forcing the corrupt bit to be set
|
# 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
|
$QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io
|
||||||
|
|
||||||
# The corrupt bit must now be set
|
# The corrupt bit must now be set
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
./qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||||
|
|
||||||
# Try to open the image R/W (which should fail)
|
# Try to open the image R/W (which should fail)
|
||||||
$QEMU_IO -c "$OPEN_RW" -c "read 0 512" 2>&1 | _filter_qemu_io \
|
$QEMU_IO -c "$OPEN_RW" -c "read 0 512" 2>&1 | _filter_qemu_io \
|
||||||
@ -100,19 +99,19 @@ poke_file "$TEST_IMG" "$(($rb_offset+8))" "\x00\x01"
|
|||||||
# Redirect new data cluster onto refcount block
|
# Redirect new data cluster onto refcount block
|
||||||
poke_file "$TEST_IMG" "$l2_offset" "\x80\x00\x00\x00\x00\x02\x00\x00"
|
poke_file "$TEST_IMG" "$l2_offset" "\x80\x00\x00\x00\x00\x02\x00\x00"
|
||||||
_check_test_img
|
_check_test_img
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
./qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||||
$QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io
|
$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.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||||
|
|
||||||
# Try to fix it
|
# Try to fix it
|
||||||
_check_test_img -r all
|
_check_test_img -r all
|
||||||
|
|
||||||
# The corrupt bit should be cleared
|
# The corrupt bit should be cleared
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
./qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||||
|
|
||||||
# Look if it's really really fixed
|
# Look if it's really really fixed
|
||||||
$QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io
|
$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.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "=== Testing cluster data reference into inactive L2 table ==="
|
echo "=== Testing cluster data reference into inactive L2 table ==="
|
||||||
@ -125,13 +124,13 @@ $QEMU_IO -c "$OPEN_RW" -c "write -P 2 0 512" | _filter_qemu_io
|
|||||||
poke_file "$TEST_IMG" "$l2_offset_after_snapshot" \
|
poke_file "$TEST_IMG" "$l2_offset_after_snapshot" \
|
||||||
"\x80\x00\x00\x00\x00\x04\x00\x00"
|
"\x80\x00\x00\x00\x00\x04\x00\x00"
|
||||||
_check_test_img
|
_check_test_img
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
./qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||||
$QEMU_IO -c "$OPEN_RW" -c "write -P 3 0 512" | _filter_qemu_io
|
$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.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||||
_check_test_img -r all
|
_check_test_img -r all
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
./qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||||
$QEMU_IO -c "$OPEN_RW" -c "write -P 4 0 512" | _filter_qemu_io
|
$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.py "$TEST_IMG" dump-header | grep incompatible_features
|
||||||
|
|
||||||
# Check data
|
# Check data
|
||||||
$QEMU_IO -c "$OPEN_RO" -c "read -P 4 0 512" | _filter_qemu_io
|
$QEMU_IO -c "$OPEN_RO" -c "read -P 4 0 512" | _filter_qemu_io
|
||||||
|
@ -35,7 +35,6 @@ _cleanup()
|
|||||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||||
|
|
||||||
# get standard environment, filters and checks
|
# get standard environment, filters and checks
|
||||||
. ./common.env
|
|
||||||
. ./common.rc
|
. ./common.rc
|
||||||
. ./common.filter
|
. ./common.filter
|
||||||
|
|
||||||
@ -49,9 +48,9 @@ echo "=== Testing version downgrade with zero expansion ==="
|
|||||||
echo
|
echo
|
||||||
IMGOPTS="compat=1.1,lazy_refcounts=on" _make_test_img 64M
|
IMGOPTS="compat=1.1,lazy_refcounts=on" _make_test_img 64M
|
||||||
$QEMU_IO -c "write -z 0 128k" "$TEST_IMG" | _filter_qemu_io
|
$QEMU_IO -c "write -z 0 128k" "$TEST_IMG" | _filter_qemu_io
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
./qcow2.py "$TEST_IMG" dump-header
|
||||||
$QEMU_IMG amend -o "compat=0.10" "$TEST_IMG"
|
$QEMU_IMG amend -o "compat=0.10" "$TEST_IMG"
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
./qcow2.py "$TEST_IMG" dump-header
|
||||||
$QEMU_IO -c "read -P 0 0 128k" "$TEST_IMG" | _filter_qemu_io
|
$QEMU_IO -c "read -P 0 0 128k" "$TEST_IMG" | _filter_qemu_io
|
||||||
_check_test_img
|
_check_test_img
|
||||||
|
|
||||||
@ -60,9 +59,9 @@ echo "=== Testing dirty version downgrade ==="
|
|||||||
echo
|
echo
|
||||||
IMGOPTS="compat=1.1,lazy_refcounts=on" _make_test_img 64M
|
IMGOPTS="compat=1.1,lazy_refcounts=on" _make_test_img 64M
|
||||||
$QEMU_IO -c "write -P 0x2a 0 128k" -c flush -c abort "$TEST_IMG" | _filter_qemu_io
|
$QEMU_IO -c "write -P 0x2a 0 128k" -c flush -c abort "$TEST_IMG" | _filter_qemu_io
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
./qcow2.py "$TEST_IMG" dump-header
|
||||||
$QEMU_IMG amend -o "compat=0.10" "$TEST_IMG"
|
$QEMU_IMG amend -o "compat=0.10" "$TEST_IMG"
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
./qcow2.py "$TEST_IMG" dump-header
|
||||||
$QEMU_IO -c "read -P 0x2a 0 128k" "$TEST_IMG" | _filter_qemu_io
|
$QEMU_IO -c "read -P 0x2a 0 128k" "$TEST_IMG" | _filter_qemu_io
|
||||||
_check_test_img
|
_check_test_img
|
||||||
|
|
||||||
@ -70,11 +69,11 @@ echo
|
|||||||
echo "=== Testing version downgrade with unknown compat/autoclear flags ==="
|
echo "=== Testing version downgrade with unknown compat/autoclear flags ==="
|
||||||
echo
|
echo
|
||||||
IMGOPTS="compat=1.1" _make_test_img 64M
|
IMGOPTS="compat=1.1" _make_test_img 64M
|
||||||
$PYTHON qcow2.py "$TEST_IMG" set-feature-bit compatible 42
|
./qcow2.py "$TEST_IMG" set-feature-bit compatible 42
|
||||||
$PYTHON qcow2.py "$TEST_IMG" set-feature-bit autoclear 42
|
./qcow2.py "$TEST_IMG" set-feature-bit autoclear 42
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
./qcow2.py "$TEST_IMG" dump-header
|
||||||
$QEMU_IMG amend -o "compat=0.10" "$TEST_IMG"
|
$QEMU_IMG amend -o "compat=0.10" "$TEST_IMG"
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
./qcow2.py "$TEST_IMG" dump-header
|
||||||
_check_test_img
|
_check_test_img
|
||||||
|
|
||||||
echo
|
echo
|
||||||
@ -82,9 +81,9 @@ echo "=== Testing version upgrade and resize ==="
|
|||||||
echo
|
echo
|
||||||
IMGOPTS="compat=0.10" _make_test_img 64M
|
IMGOPTS="compat=0.10" _make_test_img 64M
|
||||||
$QEMU_IO -c "write -P 0x2a 42M 64k" "$TEST_IMG" | _filter_qemu_io
|
$QEMU_IO -c "write -P 0x2a 42M 64k" "$TEST_IMG" | _filter_qemu_io
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
./qcow2.py "$TEST_IMG" dump-header
|
||||||
$QEMU_IMG amend -o "compat=1.1,lazy_refcounts=on,size=128M" "$TEST_IMG"
|
$QEMU_IMG amend -o "compat=1.1,lazy_refcounts=on,size=128M" "$TEST_IMG"
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
./qcow2.py "$TEST_IMG" dump-header
|
||||||
$QEMU_IO -c "read -P 0x2a 42M 64k" "$TEST_IMG" | _filter_qemu_io
|
$QEMU_IO -c "read -P 0x2a 42M 64k" "$TEST_IMG" | _filter_qemu_io
|
||||||
_check_test_img
|
_check_test_img
|
||||||
|
|
||||||
@ -93,9 +92,9 @@ echo "=== Testing dirty lazy_refcounts=off ==="
|
|||||||
echo
|
echo
|
||||||
IMGOPTS="compat=1.1,lazy_refcounts=on" _make_test_img 64M
|
IMGOPTS="compat=1.1,lazy_refcounts=on" _make_test_img 64M
|
||||||
$QEMU_IO -c "write -P 0x2a 0 128k" -c flush -c abort "$TEST_IMG" | _filter_qemu_io
|
$QEMU_IO -c "write -P 0x2a 0 128k" -c flush -c abort "$TEST_IMG" | _filter_qemu_io
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
./qcow2.py "$TEST_IMG" dump-header
|
||||||
$QEMU_IMG amend -o "lazy_refcounts=off" "$TEST_IMG"
|
$QEMU_IMG amend -o "lazy_refcounts=off" "$TEST_IMG"
|
||||||
$PYTHON qcow2.py "$TEST_IMG" dump-header
|
./qcow2.py "$TEST_IMG" dump-header
|
||||||
$QEMU_IO -c "read -P 0x2a 0 128k" "$TEST_IMG" | _filter_qemu_io
|
$QEMU_IO -c "read -P 0x2a 0 128k" "$TEST_IMG" | _filter_qemu_io
|
||||||
_check_test_img
|
_check_test_img
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python2
|
||||||
#
|
#
|
||||||
# Test for additional information emitted by qemu-img info on qcow2
|
# Test for additional information emitted by qemu-img info on qcow2
|
||||||
# images
|
# images
|
||||||
|
@ -29,7 +29,6 @@ tmp=/tmp/$$
|
|||||||
status=1 # failure is the default!
|
status=1 # failure is the default!
|
||||||
|
|
||||||
# get standard environment, filters and checks
|
# get standard environment, filters and checks
|
||||||
. ./common.env
|
|
||||||
. ./common.rc
|
. ./common.rc
|
||||||
. ./common.filter
|
. ./common.filter
|
||||||
|
|
||||||
@ -82,7 +81,7 @@ EOF
|
|||||||
nbd_url="nbd:127.0.0.1:$port:exportname=foo"
|
nbd_url="nbd:127.0.0.1:$port:exportname=foo"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$PYTHON nbd-fault-injector.py $extra_args "127.0.0.1:$port" "$TEST_DIR/nbd-fault-injector.conf" 2>&1 >/dev/null &
|
./nbd-fault-injector.py $extra_args "127.0.0.1:$port" "$TEST_DIR/nbd-fault-injector.conf" 2>&1 >/dev/null &
|
||||||
wait_for_tcp_port "127.0.0.1:$port"
|
wait_for_tcp_port "127.0.0.1:$port"
|
||||||
$QEMU_IO -c "read 0 512" "$nbd_url" 2>&1 | _filter_qemu_io | filter_nbd
|
$QEMU_IO -c "read 0 512" "$nbd_url" 2>&1 | _filter_qemu_io | filter_nbd
|
||||||
|
|
||||||
|
@ -34,13 +34,6 @@ timestamp=${TIMESTAMP:=false}
|
|||||||
# generic initialization
|
# generic initialization
|
||||||
iam=check
|
iam=check
|
||||||
|
|
||||||
# we need common.env
|
|
||||||
if ! . ./common.env
|
|
||||||
then
|
|
||||||
echo "$iam: failed to source common.env"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# we need common.config
|
# we need common.config
|
||||||
if ! . ./common.config
|
if ! . ./common.config
|
||||||
then
|
then
|
||||||
@ -222,16 +215,9 @@ do
|
|||||||
|
|
||||||
start=`_wallclock`
|
start=`_wallclock`
|
||||||
$timestamp && echo -n " ["`date "+%T"`"]"
|
$timestamp && echo -n " ["`date "+%T"`"]"
|
||||||
|
|
||||||
if [ "$(head -n 1 $seq)" == "#!/usr/bin/env python" ]; then
|
|
||||||
run_command="$PYTHON $seq"
|
|
||||||
else
|
|
||||||
[ ! -x $seq ] && chmod u+x $seq # ensure we can run it
|
[ ! -x $seq ] && chmod u+x $seq # ensure we can run it
|
||||||
run_command="./$seq"
|
|
||||||
fi
|
|
||||||
|
|
||||||
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(($RANDOM % 255 + 1))} \
|
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(($RANDOM % 255 + 1))} \
|
||||||
$run_command >$tmp.out 2>&1
|
./$seq >$tmp.out 2>&1
|
||||||
sts=$?
|
sts=$?
|
||||||
$timestamp && _timestamp
|
$timestamp && _timestamp
|
||||||
stop=`_wallclock`
|
stop=`_wallclock`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user