diff --git a/qemu/deps/performance/fio-2.2.9.tar.gz b/qemu/deps/performance/fio-2.2.9.tar.gz deleted file mode 100644 index 3cfedebfacdf95a66732efa92b35a5c63527e765..0000000000000000000000000000000000000000 Binary files a/qemu/deps/performance/fio-2.2.9.tar.gz and /dev/null differ diff --git a/qemu/deps/performance/fio-3.11.tar.gz b/qemu/deps/performance/fio-3.11.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..9cef917751b747b0fd63f8be53c6fb237034e49d Binary files /dev/null and b/qemu/deps/performance/fio-3.11.tar.gz differ diff --git a/qemu/tests/cfg/fio_perf.cfg b/qemu/tests/cfg/fio_perf.cfg index 07f3af15b371c6e14c36b7c59493c04e6e3dd2db..e26b89f6003ab699fc0894f3c55edba743859a3a 100644 --- a/qemu/tests/cfg/fio_perf.cfg +++ b/qemu/tests/cfg/fio_perf.cfg @@ -11,12 +11,12 @@ kvm_ver_chk_cmd = "rpm -q qemu-kvm-rhev || rpm -q qemu-kvm" Linux: no ide - pattern = ".*[read|write].*bw=(\d+(?:\.\d+)?[\w|\s]B/s),\siops=(\d+).*" + pattern = ".*[read|write].*IOPS=(\d+(?:\.\d+)?[\w|\s]),\sBW=(\d+(?:\.\d+)?[\w|\s]*B/s)" order_list = "Block_size Iodepth Threads BW(MB/S) IOPS Latency(ms) Host_CPU BW/CPU KVM_Exits Util%" guest_ver_cmd = "uname -r" check_install_fio = "which fio" - tarball = "performance/fio-2.2.9.tar.gz" - fio_path = "/tmp/fio-2.2.9" + tarball = "performance/fio-3.11.tar.gz" + fio_path = "/tmp/fio-3.11" compile_cmd = "make && make install" pre_cmd = "i=`/bin/ls /dev/[vs]db` && mkfs.xfs $i > /dev/null; partprobe; umount /mnt; mount $i /mnt" ppc64, ppc64le: diff --git a/qemu/tests/fio_perf.py b/qemu/tests/fio_perf.py index fdfb2c88d04968e47c437ce646234b9318abbe78..3e173dded64fe705dcd57e1bb3e9bc28ec996da5 100644 --- a/qemu/tests/fio_perf.py +++ b/qemu/tests/fio_perf.py @@ -7,7 +7,7 @@ import logging from avocado.utils import process -from virttest import utils_misc, utils_test +from virttest import utils_misc, utils_test, utils_numeric from virttest import data_dir @@ -248,20 +248,25 @@ def run(test, params, env): io_exits_a = int(process.system_output("cat /sys/kernel/debug/kvm/exits")) vm.copy_files_from(guest_result_file, data_dir.get_tmp_dir()) fio_result_file = os.path.join(data_dir.get_tmp_dir(), "fio_result") - o = process.system_output("egrep '(read|write)' %s" % fio_result_file) + o = process.system_output("egrep '(read|write)' %s" % + fio_result_file).decode() results = re.findall(pattern, o) - o = process.system_output("egrep 'lat' %s" % fio_result_file) + o = process.system_output("egrep 'lat' %s" % + fio_result_file).decode() laten = re.findall(r"\s{5}lat\s\((\wsec)\).*?avg=[\s]?(\d+(?:[\.][\d]+)?).*?", o) - bw = float(utils_misc.normalize_data_size(results[0][0])) - iops = int(results[0][1]) + bw = float(utils_numeric.normalize_data_size(results[0][1])) + iops = float(utils_numeric.normalize_data_size(results[0][0], + order_magnitude="B", factor=1000)) if os_type == "linux": - o = process.system_output("egrep 'util' %s" % fio_result_file) + o = process.system_output("egrep 'util' %s" % + fio_result_file).decode() util = float(re.findall(r".*?util=(\d+(?:[\.][\d]+))%", o)[0]) lat = float(laten[0][1]) / 1000 if laten[0][0] == "usec" else float(laten[0][1]) if re.findall("rw", io_pattern): - bw = bw + float(utils_misc.normalize_data_size(results[1][0])) - iops = iops + int(results[1][1]) + bw = bw + float(utils_numeric.normalize_data_size(results[1][1])) + iops = iops + float(utils_numeric.normalize_data_size(results[1][0], + order_magnitude="B", factor=1000)) lat1 = float(laten[1][1]) / 1000 if laten[1][0] == "usec" else float(laten[1][1]) lat = lat + lat1