Skip to content

Functest: add sigverif helpers and raise driver sign timeouts - #1103

Open
satishnaidu77 wants to merge 4 commits into
HCK-CI:masterfrom
satishnaidu77:functest-sigverif-helpers-x86
Open

Functest: add sigverif helpers and raise driver sign timeouts#1103
satishnaidu77 wants to merge 4 commits into
HCK-CI:masterfrom
satishnaidu77:functest-sigverif-helpers-x86

Conversation

@satishnaidu77

@satishnaidu77 satishnaidu77 commented Aug 17, 2026

Copy link
Copy Markdown

Summary

  • Add shared Invoke-InteractiveSession.ps1 / Invoke-AutoIt.ps1 functest helpers
  • Add driver_sigverif case (sigverif GUI + AutoIt) with thin Session-0 launcher
  • Native x86 AutoIt: use AutoIt3.exe only (skip AutoIt3_x64.exe / empty ProgramFiles(x86))
  • Launch uploaded helpers with -ExecutionPolicy Bypass from Session 0
  • Raise driver_sign_check timeouts (720/300/180s) for slow guests

find_driver_in_store.ps1 / verify_driver_signed.ps1 (@kkostiuk review)

Addressed in GitLab MR !88 (f02fa01): reverted the MR’s local FileRepository/90s-cap workaround and restored the upstream Get-WindowsDriver scripts. functional-tests no longer diverges from AutoHCK for these synced files.

This AutoHCK PR does not modify those scripts — they already match master. No separate DIRID-12 lookup change is included here; Win10 x86 driver_sign_check passes with upstream logic + raised timeouts in lab testing.

Test evidence (AutoHCK lab, viosock_existing_main_tests)

Win10_22H2x86_bios — 7/7 PASS after helper + Bypass fix

  • Log: /storage/stagiris/HCK-CI/workspace/logs/viosock_existing_main_Win10_22H2x86_bios_bypassfix_20260817_004748.log
PASSED: driver_sign_check, driver_sigverif, driver_version,
        viosock_bridge_connectivity, viosock_disable_enable,
        viosock_reboot_persistence, viosock_hotplug
Total: 7 / Passed: 7 / Failed: 0

Test plan

  • Win10_22H2x86_bios viosock_existing_main_tests — 7/7 PASS (includes driver_sign_check + driver_sigverif)
  • Reviewer: confirm helper upload + Session 0 Bypass pattern on other GUI functests

Add Invoke-InteractiveSession/Invoke-AutoIt common helpers, driver_sigverif
case (sigverif GUI + AutoIt), and platform-aware AutoIt path selection for
native x86. Launch uploaded helpers with -ExecutionPolicy Bypass from Session 0.
Raise driver_sign_check timeouts for slow guests.

Signed-off-by: Satish Tagirisapu <stagiris@redhat.com>
Comment thread lib/auxiliary/command_execution_manager.rb Fixed
Comment thread lib/auxiliary/command_execution_manager.rb Fixed
@satishnaidu77
satishnaidu77 force-pushed the functest-sigverif-helpers-x86 branch 4 times, most recently from a2c6c6c to 4b370be Compare August 17, 2026 06:57
@kostyanf14
kostyanf14 requested a balanced review from Copilot August 17, 2026 11:19
@kostyanf14

Copy link
Copy Markdown
Contributor

ok to test

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds reusable interactive GUI helpers and a driver_sigverif functional test, while increasing signature-check timeouts for slower guests.

Changes:

  • Adds Session 0, AutoIt, and SigVerif automation.
  • Adds the driver_sigverif test case.
  • Raises driver_sign_check timeouts.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
scripts/sigverif.au3 Automates the SigVerif GUI.
scripts/sigverif_worker.ps1 Validates the SigVerif report.
scripts/run_sigverif_gui.ps1 Launches the interactive worker.
scripts/common/README.md Documents shared GUI helpers.
scripts/common/Invoke-InteractiveSession.ps1 Runs workers in an interactive session.
scripts/common/Invoke-AutoIt.ps1 Locates and executes AutoIt scripts.
cases/driver_sigverif.json Defines the new SigVerif test.
cases/driver_sign_check.json Increases signature-check timeouts.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Run("sigverif.exe")
WinWaitActive("File Signature Verification", "&Start")
Send("!s")
if WinWaitActive("SigVerif", "Your files have been scanned and verified as digitally signed.", 60) then
Add-Content -Path $workerLog -Value ("Matched: $driverSys ... Signed")
} else {
foreach ($line in ($logText -split [Environment]::NewLine)) {
if (($line -match [regex]::Escape($driverSys)) -and ($line -match '\bSigned\b')) {
Comment thread lib/engines/functest/tests/cases/driver_sigverif.json
AutoIt Version: 3.3.14.5
Author: Li Jin <lijin@redhat.com>
Script Function:
Drive File Signature Verification (sigverif.exe): Start scan, dismiss
Comment on lines +100 to +124
while ((Get-Date) -lt $deadline) {
if ($WaitForFile -and (Test-Path $WaitForFile)) { break }
if ($p.HasExited -and -not $WaitForFile) { break }
# With -WaitForFile: keep polling until the file appears or deadline,
# even if AutoIt has already exited.
Start-Sleep -Seconds 2
}

if (-not $p.HasExited) {
Stop-Process -Id $p.Id -Force -ErrorAction SilentlyContinue
Write-AutoItLog 'WARN: AutoIt still running after timeout; killed'
$killedOnTimeout = $true
} else {
Write-AutoItLog ("AutoIt exit code=$($p.ExitCode)")
}

if ($WaitForFile) {
if (-not (Test-Path $WaitForFile)) {
Write-Output "FAIL: expected output file not created: $WaitForFile"
exit 1
}
} elseif ($killedOnTimeout) {
Write-Output "FAIL: AutoIt killed after timeout (${TimeoutSec}s) with no -WaitForFile"
exit 1
}
Comment on lines +1 to +13
# Common functest helpers (guest scripts)
#
# Upload the scripts you need via the test case `files_action` step, for example:
#
# local_path: lib/engines/functest/tests/scripts/common/Invoke-InteractiveSession.ps1
# remote_path: C:\AutoHCK\common\Invoke-InteractiveSession.ps1
#
# Typical GUI flow:
# Session 0 launcher -> Invoke-InteractiveSession.ps1 (-TaskName unique per test)
# -> worker.ps1 on interactive desktop
# -> Invoke-AutoIt.ps1 (-Au3Path ..., optional -WaitForFile)
#
# Requires suite extra_software: ["autoit"] when using Invoke-AutoIt.ps1.
Pass the 900s scan timeout into AutoIt, match the complete driver
filename and reject Not Signed, wait for AutoIt exit and fail killed
or nonzero runs, declare case extra_software autoit, and fix README
headings.

Signed-off-by: Satish Tagirisapu <stagiris@redhat.com>
@kostyanf14

Copy link
Copy Markdown
Contributor

@satishnaidu77, please clean up commits. There should be no "merge commit" in the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants