diff --git a/generic/tests/ethtool.py b/generic/tests/ethtool.py index 419a45676f043b977d1607f8a7e8297773468e6d..3bea39f4d8080199bc16385bb4ebbcb0a50d3485 100644 --- a/generic/tests/ethtool.py +++ b/generic/tests/ethtool.py @@ -100,7 +100,7 @@ def run(test, params, env): def compare_md5sum(name): txt = "Comparing md5sum of the files on guest and host" error_context.context(txt, logging.info) - host_result = crypto.hash_file(name, method="md5") + host_result = crypto.hash_file(name, algorithm="md5") try: o = session.cmd_output("md5sum %s" % name) guest_result = re.findall(r"\w+", o)[0] diff --git a/generic/tests/nicdriver_unload.py b/generic/tests/nicdriver_unload.py index f2afad287aaccb70262d9a306c874e1d702e304c..192ae25535f4e93c7fb3dfd510a22150e2a96c20 100644 --- a/generic/tests/nicdriver_unload.py +++ b/generic/tests/nicdriver_unload.py @@ -94,7 +94,7 @@ def run(test, params, env): utils_misc.generate_random_string(8)) cmd = "dd if=/dev/zero of=%s bs=1M count=%d" % (host_path, filesize) process.run(cmd) - file_checksum = crypto.hash_file(host_path, "md5") + file_checksum = crypto.hash_file(host_path, algorithm="md5") error_context.context("Guest test file prepare, Copy file %s from host to " "guest" % host_path, logging.info) diff --git a/qemu/tests/live_snapshot_base.py b/qemu/tests/live_snapshot_base.py index 79d2a5f1038b1c45fc476cf892f620e5690f6c8b..8e5beab21849baa098b064028f36f89fd120d760 100644 --- a/qemu/tests/live_snapshot_base.py +++ b/qemu/tests/live_snapshot_base.py @@ -45,7 +45,7 @@ def run(test, params, env): logging.info) cmd = params.get("dd_cmd") % src process.system(cmd, timeout=dd_timeout, shell=True) - md5 = crypto.hash_file(src, method="md5") + md5 = crypto.hash_file(src, algorithm="md5") vm.copy_files_to(src, dst, timeout=copy_timeout) process.system("rm -f %s" % src) error_context.context("create live snapshot", logging.info) @@ -60,7 +60,7 @@ def run(test, params, env): error_context.context("copy file to host, check content not changed", logging.info) vm.copy_files_from(dst, src, timeout=copy_timeout) - if md5 and (md5 != crypto.hash_file(src, method="md5")): + if md5 and (md5 != crypto.hash_file(src, algorithm="md5")): test.fail("diff md5 before/after create snapshot") session.cmd(params.get("alive_check_cmd", "dir")) finally: