From 8ddf8b7df07c7c06ec7e39d0fc29d873ef2311e3 Mon Sep 17 00:00:00 2001 From: Jeffrey Stuhr <110697945+fadwen@users.noreply.github.com> Date: Tue, 24 Nov 2026 11:52:54 -0800 Subject: [PATCH 1/3] test(whatif): run the confirm test in the device's own host The test of the confirm preference inside a run started the 32-bit host with a timeout of 60 seconds. On the ARM64 runner that host is emulated, and twice the run took longer than the timeout and came back without an exit code. The test is about the preference, not the architecture, so it runs the native 64-bit host now. Closes #98. --- Tests/Unit/Module.WhatIf.Tests.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tests/Unit/Module.WhatIf.Tests.ps1 b/Tests/Unit/Module.WhatIf.Tests.ps1 index 82b2227..e1da043 100644 --- a/Tests/Unit/Module.WhatIf.Tests.ps1 +++ b/Tests/Unit/Module.WhatIf.Tests.ps1 @@ -229,13 +229,14 @@ Describe 'What -WhatIf does across the module' -Tag 'Unit', 'Contract' { # After a Yes to -Confirm the preference is still Low in the command's scope, and the # functions it calls see it. With only -WhatIf pinned, the run folder and the copy each # asked again; here, where nobody can answer, they failed, and the host was started on - # a copy that was never made + # a copy that was never made. The device's own host: on the ARM64 runner x86 is + # emulated, and its first start there took longer than the timeout (#98) $probe = New-MarkerScript -Name 'ConfirmLow' $run = Invoke-CallerScript -Statement @( "`$result = & (Get-Module IntuneScriptLab) {" " param(`$Path)" " `$ConfirmPreference = 'Low'" - " `$runSplat = @{ Path = `$Path; Architecture = 'x86'; Context = 'User'; Phase = 'detect' }" + " `$runSplat = @{ Path = `$Path; Architecture = (Get-IslHostArchitecture); Phase = 'detect' }" " Invoke-IslScriptRun @runSplat -TimeoutSeconds 60" "} '$($probe.Script)'" "'exit code: ' + `$result.ExitCode" From b3bc2ae91462941508c70353579ddda8128bd3fa Mon Sep 17 00:00:00 2001 From: Jeffrey Stuhr <110697945+fadwen@users.noreply.github.com> Date: Tue, 24 Nov 2026 11:53:06 -0800 Subject: [PATCH 2/3] docs(changelog): record the ARM64 test fix --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33b2038..f959dea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -100,6 +100,9 @@ entries are carried over from the manifest's release notes. ### Fixed +- A test of the confirm preference inside a run started the 32-bit host, which is emulated on + the ARM64 runner, and the run there sometimes took longer than the test's timeout of 60 + seconds. It runs the device's own 64-bit host now. - A test of `Get-IslAgentLogEvent` read the event table before anything had built it, so it failed whenever the shuffled order of the CI run put it first in its file. It builds the table first. - With `$WhatIfPreference` set in the caller's session, the runtime harness did neither a preview From 97961da0becf663a98961fe170e7926229d6061f Mon Sep 17 00:00:00 2001 From: Jeffrey Stuhr <110697945+fadwen@users.noreply.github.com> Date: Tue, 24 Nov 2026 12:50:23 -0800 Subject: [PATCH 3/3] test(whatif): keep the emulated x86 host and give it the default time The previous change moved the test to the native host. But the ARM64 job runs the unit suites only, and this is the one unit test that starts the emulated x86 host for real: the others mock the launch. The test goes back to x86, which keeps that host covered on the runner, and the run has 300 seconds, the default of the commands, where it had 60. --- CHANGELOG.md | 6 +++--- Tests/Unit/Module.WhatIf.Tests.ps1 | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f959dea..8cac9a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -100,9 +100,9 @@ entries are carried over from the manifest's release notes. ### Fixed -- A test of the confirm preference inside a run started the 32-bit host, which is emulated on - the ARM64 runner, and the run there sometimes took longer than the test's timeout of 60 - seconds. It runs the device's own 64-bit host now. +- A test of the confirm preference inside a run starts the 32-bit host, which is emulated on the + ARM64 runner, and the run there sometimes took longer than the test's timeout of 60 seconds. + The run has 300 seconds now, the default of the commands. - A test of `Get-IslAgentLogEvent` read the event table before anything had built it, so it failed whenever the shuffled order of the CI run put it first in its file. It builds the table first. - With `$WhatIfPreference` set in the caller's session, the runtime harness did neither a preview diff --git a/Tests/Unit/Module.WhatIf.Tests.ps1 b/Tests/Unit/Module.WhatIf.Tests.ps1 index e1da043..0b09251 100644 --- a/Tests/Unit/Module.WhatIf.Tests.ps1 +++ b/Tests/Unit/Module.WhatIf.Tests.ps1 @@ -229,15 +229,16 @@ Describe 'What -WhatIf does across the module' -Tag 'Unit', 'Contract' { # After a Yes to -Confirm the preference is still Low in the command's scope, and the # functions it calls see it. With only -WhatIf pinned, the run folder and the copy each # asked again; here, where nobody can answer, they failed, and the host was started on - # a copy that was never made. The device's own host: on the ARM64 runner x86 is - # emulated, and its first start there took longer than the timeout (#98) + # a copy that was never made. The run stays in the 32-bit host: on the ARM64 runner + # it is emulated, and this is the one unit test that starts it for real. Its start + # there took longer than 60 seconds, so the run has the commands' default of 300 (#98) $probe = New-MarkerScript -Name 'ConfirmLow' $run = Invoke-CallerScript -Statement @( "`$result = & (Get-Module IntuneScriptLab) {" " param(`$Path)" " `$ConfirmPreference = 'Low'" - " `$runSplat = @{ Path = `$Path; Architecture = (Get-IslHostArchitecture); Phase = 'detect' }" - " Invoke-IslScriptRun @runSplat -TimeoutSeconds 60" + " `$runSplat = @{ Path = `$Path; Architecture = 'x86'; Context = 'User'; Phase = 'detect' }" + " Invoke-IslScriptRun @runSplat -TimeoutSeconds 300" "} '$($probe.Script)'" "'exit code: ' + `$result.ExitCode" )