From b1a3eb91bfde0b72409fbab645531d8f5652c35b Mon Sep 17 00:00:00 2001 From: Xiaoling Gao Date: Fri, 15 Nov 2024 16:10:13 +0800 Subject: [PATCH] win_driver_utils: system reboot is needed after remove drivers For viostor and vioscsi, they need system reboot after removing drivers with new pnputil cmd "pnputil /delete-driver %s /uninstall /force" Signed-off-by: Xiaoling Gao --- provider/win_driver_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/provider/win_driver_utils.py b/provider/win_driver_utils.py index ed44dcd9fe..7c6ce03a0b 100644 --- a/provider/win_driver_utils.py +++ b/provider/win_driver_utils.py @@ -100,7 +100,9 @@ def uninstall_driver(session, test, devcon_path, driver_name, device_name, devic else: uninst_store_cmd = "pnputil /f /d %s" % inf_list[0] status, output = session.cmd_status_output(uninst_store_cmd, INSTALL_TIMEOUT) - if status: + # for viostor and vioscsi, they need system reboot + # acceptable status: OK(0), REBOOT(3010) + if status not in (0, 3010): test.error( "Failed to uninstall driver '%s' from store, " "details:\n%s" % (driver_name, output)