echo "QA output created by $seq"
here=`pwd`
-tmp=/tmp/$$
status=1 # failure is the default!
_cleanup()
function run_qemu()
{
- do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu
+ do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu | _filter_hmp
}
size=128M
# cache.direct is supposed to be inherited by both bs->file and
# bs->backing
- echo -e "cache.direct=on on none0"
+ printf "cache.direct=on on none0\n"
echo "$hmp_cmds" | run_qemu -drive "$files","$ids",cache.direct=on | grep -e "Cache" -e "[Cc]annot|[Cc]ould not|[Cc]an't"
- echo -e "\ncache.direct=on on file"
+ printf "\ncache.direct=on on file\n"
echo "$hmp_cmds" | run_qemu -drive "$files","$ids",file.cache.direct=on | grep -e "Cache" -e "[Cc]annot|[Cc]ould not|[Cc]an't"
- echo -e "\ncache.direct=on on backing"
+ printf "\ncache.direct=on on backing\n"
echo "$hmp_cmds" | run_qemu -drive "$files","$ids",backing.cache.direct=on | grep -e "Cache" -e "[Cc]annot|[Cc]ould not|[Cc]an't"
- echo -e "\ncache.direct=on on backing-file"
+ printf "\ncache.direct=on on backing-file\n"
echo "$hmp_cmds" | run_qemu -drive "$files","$ids",backing.file.cache.direct=on | grep -e "Cache" -e "[Cc]annot|[Cc]ould not|[Cc]an't"
# cache.writeback is supposed to be inherited by bs->backing; bs->file
# always gets cache.writeback=on
- echo -e "\n\ncache.writeback=off on none0"
+ printf "\n\ncache.writeback=off on none0\n"
echo "$hmp_cmds" | run_qemu -drive "$files","$ids",cache.writeback=off | grep -e "Cache" -e "[Cc]annot\|[Cc]ould not\|[Cc]an't"
- echo -e "\ncache.writeback=off on file"
+ printf "\ncache.writeback=off on file\n"
echo "$hmp_cmds" | run_qemu -drive "$files","$ids",file.cache.writeback=off | grep -e "doesn't" -e "does not"
- echo -e "\ncache.writeback=off on backing"
+ printf "\ncache.writeback=off on backing\n"
echo "$hmp_cmds" | run_qemu -drive "$files","$ids",backing.cache.writeback=off | grep -e "doesn't" -e "does not"
- echo -e "\ncache.writeback=off on backing-file"
+ printf "\ncache.writeback=off on backing-file\n"
echo "$hmp_cmds" | run_qemu -drive "$files","$ids",backing.file.cache.writeback=off | grep -e "doesn't" -e "does not"
# cache.no-flush is supposed to be inherited by both bs->file and bs->backing
- echo -e "\n\ncache.no-flush=on on none0"
+ printf "\n\ncache.no-flush=on on none0\n"
echo "$hmp_cmds" | run_qemu -drive "$files","$ids",cache.no-flush=on | grep -e "Cache" -e "[Cc]annot\|[Cc]ould not\|[Cc]an't"
- echo -e "\ncache.no-flush=on on file"
+ printf "\ncache.no-flush=on on file\n"
echo "$hmp_cmds" | run_qemu -drive "$files","$ids",file.cache.no-flush=on | grep -e "Cache" -e "[Cc]annot\|[Cc]ould not\|[Cc]an't"
- echo -e "\ncache.no-flush=on on backing"
+ printf "\ncache.no-flush=on on backing\n"
echo "$hmp_cmds" | run_qemu -drive "$files","$ids",backing.cache.no-flush=on | grep -e "Cache" -e "[Cc]annot\|[Cc]ould not\|[Cc]an't"
- echo -e "\ncache.no-flush=on on backing-file"
+ printf "\ncache.no-flush=on on backing-file\n"
echo "$hmp_cmds" | run_qemu -drive "$files","$ids",backing.file.cache.no-flush=on | grep -e "Cache" -e "[Cc]annot\|[Cc]ould not\|[Cc]an't"
}
{
# Check cache.direct
- echo -e "cache.direct=on on blk"
+ printf "cache.direct=on on blk\n"
echo "$hmp_cmds" | run_qemu -drive "$drv_bkfile" -drive "$drv_bk" -drive "$drv_file" -drive "$drv_img",cache.direct=on | grep -e "Cache" -e "[Cc]annot\|[Cc]ould not\|[Cc]an't"
- echo -e "\ncache.direct=on on file"
+ printf "\ncache.direct=on on file\n"
echo "$hmp_cmds" | run_qemu -drive "$drv_bkfile" -drive "$drv_bk" -drive "$drv_file",cache.direct=on -drive "$drv_img" | grep -e "Cache" -e "[Cc]annot\|[Cc]ould not\|[Cc]an't"
- echo -e "\ncache.direct=on on backing"
+ printf "\ncache.direct=on on backing\n"
echo "$hmp_cmds" | run_qemu -drive "$drv_bkfile" -drive "$drv_bk",cache.direct=on -drive "$drv_file" -drive "$drv_img" | grep -e "Cache" -e "[Cc]annot\|[Cc]ould not\|[Cc]an't"
- echo -e "\ncache.direct=on on backing-file"
+ printf "\ncache.direct=on on backing-file\n"
echo "$hmp_cmds" | run_qemu -drive "$drv_bkfile",cache.direct=on -drive "$drv_bk" -drive "$drv_file" -drive "$drv_img" | grep -e "Cache" -e "[Cc]annot\|[Cc]ould not\|[Cc]an't"
# Check cache.writeback
- echo -e "\n\ncache.writeback=off on blk"
+ printf "\n\ncache.writeback=off on blk\n"
echo "$hmp_cmds" | run_qemu -drive "$drv_bkfile" -drive "$drv_bk" -drive "$drv_file" -drive "$drv_img",cache.writeback=off | grep -e "Cache" -e "[Cc]annot\|[Cc]ould not\|[Cc]an't"
- echo -e "\ncache.writeback=off on file"
+ printf "\ncache.writeback=off on file\n"
echo "$hmp_cmds" | run_qemu -drive "$drv_bkfile" -drive "$drv_bk" -drive "$drv_file",cache.writeback=off -drive "$drv_img" | grep -e "Cache" -e "[Cc]annot\|[Cc]ould not\|[Cc]an't"
- echo -e "\ncache.writeback=off on backing"
+ printf "\ncache.writeback=off on backing\n"
echo "$hmp_cmds" | run_qemu -drive "$drv_bkfile" -drive "$drv_bk",cache.writeback=off -drive "$drv_file" -drive "$drv_img" | grep -e "Cache" -e "[Cc]annot\|[Cc]ould not\|[Cc]an't"
- echo -e "\ncache.writeback=off on backing-file"
+ printf "\ncache.writeback=off on backing-file\n"
echo "$hmp_cmds" | run_qemu -drive "$drv_bkfile",cache.writeback=off -drive "$drv_bk" -drive "$drv_file" -drive "$drv_img" | grep -e "Cache" -e "[Cc]annot\|[Cc]ould not\|[Cc]an't"
# Check cache.no-flush
- echo -e "\n\ncache.no-flush=on on blk"
+ printf "\n\ncache.no-flush=on on blk\n"
echo "$hmp_cmds" | run_qemu -drive "$drv_bkfile" -drive "$drv_bk" -drive "$drv_file" -drive "$drv_img",cache.no-flush=on | grep -e "Cache" -e "[Cc]annot\|[Cc]ould not\|[Cc]an't"
- echo -e "\ncache.no-flush=on on file"
+ printf "\ncache.no-flush=on on file\n"
echo "$hmp_cmds" | run_qemu -drive "$drv_bkfile" -drive "$drv_bk" -drive "$drv_file",cache.no-flush=on -drive "$drv_img" | grep -e "Cache" -e "[Cc]annot\|[Cc]ould not\|[Cc]an't"
- echo -e "\ncache.no-flush=on on backing"
+ printf "\ncache.no-flush=on on backing\n"
echo "$hmp_cmds" | run_qemu -drive "$drv_bkfile" -drive "$drv_bk",cache.no-flush=on -drive "$drv_file" -drive "$drv_img" | grep -e "Cache" -e "[Cc]annot\|[Cc]ould not\|[Cc]an't"
- echo -e "\ncache.no-flush=on on backing-file"
+ printf "\ncache.no-flush=on on backing-file\n"
echo "$hmp_cmds" | run_qemu -drive "$drv_bkfile",cache.no-flush=on -drive "$drv_bk" -drive "$drv_file" -drive "$drv_img" | grep -e "Cache" -e "[Cc]annot\|[Cc]ould not\|[Cc]an't"
}