diff --git a/qemu/tests/cfg/enable_scatter_windows.cfg b/qemu/tests/cfg/enable_scatter_windows.cfg index d14236bde8..977d842939 100644 --- a/qemu/tests/cfg/enable_scatter_windows.cfg +++ b/qemu/tests/cfg/enable_scatter_windows.cfg @@ -10,13 +10,14 @@ driver_verifier = netkvm Win2016, Win2019, Win8..1, Win2012..r2: driver_verifier += " ndis" - installed_path = "C:\Program Files\Wireshark\tshark.exe" - check_installed_cmd = 'dir "${installed_path}"|findstr /I tshark.exe' + WinDump_name = "WinDump.exe" + installed_path = "C:\${WinDump_name}" + check_installed_cmd = 'dir "${installed_path}" | findstr /I "${WinDump_name}"' x86_64: wireshark_name = "Wireshark-win64-1.10.1.exe" i386, i686: wireshark_name = "Wireshark-win32-1.10.1.exe" - install_wireshark_cmd = "xcopy WIN_UTILS:\${wireshark_name} c:\ /y && c:\${wireshark_name} /S" + installation_cmd = "xcopy WIN_UTILS:\${WinDump_name} c:\ /y && xcopy WIN_UTILS:\${wireshark_name} c:\ /y && c:\${wireshark_name} /S" autoit_name = "AutoIt3_%PROCESSOR_ARCHITECTURE%.exe" install_winpcap_cmd = "WIN_UTILS:\${autoit_name} WIN_UTILS:\install_winpcap.au3" @@ -27,6 +28,6 @@ query_version_cmd += "where (DeviceName like 'Red Hat VirtIO Ethernet Adapter') " query_version_cmd += "get DriverVersion /format:list" - run_wireshark_temp = 'start "" "${installed_path}" -n -w c:\temp.pcapng tcp and dst %s and src %s' - stop_wireshark_cmd = "taskkill /im tshark.exe /f" - parse_log_temp = '"${installed_path}" -2 -r c:\temp.pcapng -R "%s"' + run_windump_temp = 'start "" "${installed_path}" -n -w c:\temp.pcap tcp and dst %s and src %s' + stop_windump_cmd = "taskkill /im WinDump.exe /f" + parse_log_temp = '"C:\Program Files\Wireshark\tshark.exe" -2 -r c:\temp.pcap -R "%s"' diff --git a/qemu/tests/enable_scatter_windows.py b/qemu/tests/enable_scatter_windows.py index 2027a717cf..0edb2e9ac6 100644 --- a/qemu/tests/enable_scatter_windows.py +++ b/qemu/tests/enable_scatter_windows.py @@ -49,7 +49,7 @@ def _start_wireshark_session(): session_serial = vm.wait_for_serial_login(timeout=timeout) guest_ip = vm.get_address() try: - run_wireshark_cmd = run_wireshark_temp % (host_ip, guest_ip) + run_wireshark_cmd = run_windump_temp % (host_ip, guest_ip) status, output = session_serial.cmd_status_output(run_wireshark_cmd, timeout=timeout) @@ -57,7 +57,7 @@ def _start_wireshark_session(): test.error("Failed to start wireshark session, " "status=%s, output=%s" % (status, output)) is_started = utils_misc.wait_for( - lambda: not _is_process_finished(session_serial, "tshark.exe"), 20, 5, 1) + lambda: not _is_process_finished(session_serial, "WinDump.exe"), 20, 5, 1) if not is_started: test.error("Timeout when wait for wireshark start") finally: @@ -68,7 +68,7 @@ def _stop_wireshark_session(): Stop the running wireshark session """ error_context.context("Stop wireshark", test.log.info) - status, output = session.cmd_status_output(stop_wireshark_cmd, + status, output = session.cmd_status_output(stop_windump_cmd, timeout=timeout) if status: test.error("Failed to stop wireshark: status=%s, output=%s" @@ -128,9 +128,10 @@ def _get_driver_version(session): timeout = params.get("timeout", 360) driver_verifier = params["driver_verifier"] + WinDump_name = params.get("WinDump_name") wireshark_name = params.get("wireshark_name") - run_wireshark_temp = params.get("run_wireshark_temp") - stop_wireshark_cmd = params.get("stop_wireshark_cmd") + run_windump_temp = params.get("run_windump_temp") + stop_windump_cmd = params.get("stop_windump_cmd") check_proc_temp = params.get("check_proc_temp") parse_log_temp = params.get("parse_log_temp") param_names = params.get("param_names").split() @@ -174,12 +175,12 @@ def _get_driver_version(session): error_context.context("Check if wireshark is installed", test.log.info) check_installed_cmd = params.get("check_installed_cmd") check_result = session.cmd_output(check_installed_cmd) - if "tshark" not in check_result: + if "WinDump" not in check_result: error_context.context("Install wireshark", test.log.info) - install_wireshark_cmd = params.get("install_wireshark_cmd") - install_wireshark_cmd = utils_misc.set_winutils_letter( - session, install_wireshark_cmd) - status, output = session.cmd_status_output(install_wireshark_cmd, + installation_cmd = params.get("installation_cmd") + installation_cmd = utils_misc.set_winutils_letter( + session, installation_cmd) + status, output = session.cmd_status_output(installation_cmd, timeout=timeout) if status: test.error("Failed to install wireshark, status=%s, output=%s"