Skip to content

Commit 0d85e37

Browse files
add debug output for test case
1 parent 9eeec31 commit 0d85e37

2 files changed

Lines changed: 19 additions & 5 deletions

File tree

.github/workflows/windows-cert-store-test.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,10 +1247,14 @@ jobs:
12471247
Write-Host "=== Starting echoserver with cert store (detached, debug logs) ==="
12481248
$argStr = ($echoArgs | ForEach-Object { $_ }) -join " "
12491249
Write-Host "Command: $echoserverPath $argStr"
1250-
# cmd /c start /B runs the exe in background; working dir set so it finds wolfssl.dll
1251-
$cmdArgs = @("/c", "start", "/B", $exeName) + $echoArgs
1250+
# Redirect stdout+stderr to a log file so we can inspect debug output later.
1251+
# Use cmd /c with output redirection to run the echoserver detached.
1252+
$echoLogFile = Join-Path $wolfsshRoot "echoserver_debug.log"
1253+
Add-Content -Path $env:GITHUB_ENV -Value "ECHOSERVER_LOG=$echoLogFile"
1254+
Write-Host "Debug log: $echoLogFile"
1255+
$cmdLine = "`"$echoserverPath`" $argStr > `"$echoLogFile`" 2>&1"
12521256
Start-Process -FilePath "cmd.exe" `
1253-
-ArgumentList $cmdArgs `
1257+
-ArgumentList "/c", "start", "/B", "cmd", "/c", $cmdLine `
12541258
-WorkingDirectory $exeDir -NoNewWindow -Wait:$false
12551259
Start-Sleep -Seconds 2
12561260
$proc = Get-Process -Name "echoserver" -ErrorAction SilentlyContinue | Select-Object -First 1
@@ -1799,14 +1803,22 @@ jobs:
17991803
Get-Content sftp_error.txt
18001804
}
18011805
1806+
# Dump echoserver debug log (if running echoserver instead of wolfsshd)
1807+
$echoLog = $env:ECHOSERVER_LOG
1808+
if (-not [string]::IsNullOrEmpty($echoLog) -and (Test-Path $echoLog)) {
1809+
Write-Host "=== Echoserver Debug Log ==="
1810+
Get-Content $echoLog
1811+
Write-Host "=== End Echoserver Debug Log ==="
1812+
}
1813+
18021814
# For X509 tests: check server logs for certificate verification errors
18031815
if ("${{ matrix.client_key_source }}" -eq "x509" -or "${{ matrix.client_key_source }}" -eq "store") {
18041816
Write-Host "=== Checking server logs for X509 certificate verification ==="
18051817
$serviceName = $env:SSHD_SERVICE_NAME
18061818
if ($serviceName) {
18071819
# Check Application event log for wolfSSH errors
1808-
Get-EventLog -LogName Application -Newest 50 -ErrorAction SilentlyContinue |
1809-
Where-Object { $_.Source -like "*wolf*" -or $_.Message -like "*wolf*" -or $_.Message -like "*cert*" -or $_.Message -like "*CA*" } |
1820+
Get-EventLog -LogName Application -Newest 50 -ErrorAction SilentlyContinue |
1821+
Where-Object { $_.Source -like "*wolf*" -or $_.Message -like "*wolf*" -or $_.Message -like "*cert*" -or $_.Message -like "*CA*" } |
18101822
Select-Object TimeGenerated, Source, EntryType, Message | Format-List
18111823
}
18121824
}

ide/winvs/user_settings.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
#define WOLFSSL_PUBLIC_MP
2727
#define WC_NO_HARDEN
2828

29+
#define DEBUG_WOLFSSH
30+
2931
#define WOLFSSH_TERM
3032
#ifndef WOLFSSH_TERM
3133
/* Threading is needed for opening a psuedo terminal in the examples */

0 commit comments

Comments
 (0)