GetProfileForArgsWithCommandline unit test is failing #16742

Closed
opened 2026-01-31 05:21:23 +00:00 by claunia · 7 comments
Owner

Originally created by @j4james on GitHub (Feb 10, 2022).

Windows Terminal version

Commit 10c963a7db

Windows build number

10.0.19041.1415

Other Software

No response

Steps to reproduce

  1. Checkout the latest code.
  2. Build.
  3. Run the GetProfileForArgsWithCommandline unit test.

Expected Behavior

Test should pass.

Actual Behavior

Test fails with the following log:

StartGroup: SettingsModelLocalTests::TerminalSettingsTests::GetProfileForArgsWithCommandline
Verify: IsNotNull(profile)
Verify: AreEqual(expectedGUID, static_cast<const GUID&>(profile.Guid()))
Verify: IsNotNull(profile)
Error: Verify: AreEqual(expectedGUID, static_cast<const GUID&>(profile.Guid())) - Values ({6239A42C-1111-49A3-80BD-E8FDD045185C}, {6239A42C-0000-49A3-80BD-E8FDD045185C}) [File: C:\Users\James\CPP\terminal\src\cascadia\LocalTests_SettingsModel\TerminalSettingsTests.cpp, Function: SettingsModelLocalTests::TerminalSettingsTests::GetProfileForArgsWithCommandline, Line: 249]
EndGroup: SettingsModelLocalTests::TerminalSettingsTests::GetProfileForArgsWithCommandline [Failed]

I think this is a fairly recent break. I haven't done a bisect, but I'd guess it might have come from PR #12348, just based on the code involved.

Originally created by @j4james on GitHub (Feb 10, 2022). ### Windows Terminal version Commit 10c963a7dbdd0d9e71dd0596e96fa26ab88a76f5 ### Windows build number 10.0.19041.1415 ### Other Software _No response_ ### Steps to reproduce 1. Checkout the latest code. 2. Build. 3. Run the `GetProfileForArgsWithCommandline` unit test. ### Expected Behavior Test should pass. ### Actual Behavior Test fails with the following log: ``` StartGroup: SettingsModelLocalTests::TerminalSettingsTests::GetProfileForArgsWithCommandline Verify: IsNotNull(profile) Verify: AreEqual(expectedGUID, static_cast<const GUID&>(profile.Guid())) Verify: IsNotNull(profile) Error: Verify: AreEqual(expectedGUID, static_cast<const GUID&>(profile.Guid())) - Values ({6239A42C-1111-49A3-80BD-E8FDD045185C}, {6239A42C-0000-49A3-80BD-E8FDD045185C}) [File: C:\Users\James\CPP\terminal\src\cascadia\LocalTests_SettingsModel\TerminalSettingsTests.cpp, Function: SettingsModelLocalTests::TerminalSettingsTests::GetProfileForArgsWithCommandline, Line: 249] EndGroup: SettingsModelLocalTests::TerminalSettingsTests::GetProfileForArgsWithCommandline [Failed] ``` I think this is a fairly recent break. I haven't done a bisect, but I'd guess it might have come from PR #12348, just based on the code involved.
Author
Owner

@zadjii-msft commented on GitHub (Feb 10, 2022):

@lhecker as an fyi

@zadjii-msft commented on GitHub (Feb 10, 2022): @lhecker as an fyi
Author
Owner

@lhecker commented on GitHub (Feb 11, 2022):

I forgot that we don't run these tests in our CI. Uh oh. 😟

@lhecker commented on GitHub (Feb 11, 2022): I forgot that we don't run these tests in our CI. Uh oh. 😟
Author
Owner

@lhecker commented on GitHub (Feb 11, 2022):

I made a off-by-one error in #12348. 😞
The impact is: All command-lines with exactly one additional argument (aka: argc == 2) are normalized to not having any arguments (argc == 1). The good news is that this happens to both profiles and handed off processes symmetrically so the impact is somewhat limited at least (unlike before #12348, where paths with spaces just didn't work at all).

I've got a fix ready, but I'm sad we just now re-released 1.12/1.13. I should look into how we can run those tests as part of our CI in the future, so that this can't happen anymore, even if someone neglects to run those tests - someone like me. 😞

@lhecker commented on GitHub (Feb 11, 2022): I made a off-by-one error in #12348. 😞 The impact is: All command-lines with exactly one additional argument (aka: `argc == 2`) are normalized to not having any arguments (`argc == 1`). The good news is that this happens to both profiles and handed off processes symmetrically so the impact is somewhat limited at least (unlike before #12348, where paths with spaces just didn't work at all). I've got a fix ready, but I'm sad we _just_ now re-released 1.12/1.13. I should look into how we can run those tests as part of our CI in the future, so that this can't happen anymore, even if someone neglects to run those tests - someone like me. 😞
Author
Owner

@zadjii-msft commented on GitHub (Feb 11, 2022):

I should look into how we can run those tests as part of our CI in the future

We started looking into it: #10267

I'm not sure if the pool has updated the machines. IIRC the localtests needed a newer version of the OS than what the CI runs, but that was also two years ago now.

@zadjii-msft commented on GitHub (Feb 11, 2022): > I should look into how we can run those tests as part of our CI in the future We started looking into it: #10267 I'm not sure if the pool has updated the machines. IIRC the localtests needed a newer version of the OS than what the CI runs, but that was also two years ago now.
Author
Owner

@zadjii-msft commented on GitHub (Feb 11, 2022):

Gah, I tried in https://dev.azure.com/ms/terminal/_build/results?buildId=272194&view=logs&j=a9c0e965-911d-5d8d-6a81-36c112a94df3&t=9660b670-796f-5b84-9008-12dc9f750614.

StartGroup: SettingsModelLocalTests::TerminalSettingsTests::TestCommandlineToTitlePromotion
EndGroup: SettingsModelLocalTests::TerminalSettingsTests::TestCommandlineToTitlePromotion [Blocked]
TAEF: Deploying custom AppXManifest... Copying C:\a\_work\1\a\drop\Release\x64\test\TestHostAppXManifest.xml to C:\a\_work\1\a\drop\Release\x64\test\AppXManifest.xml
TAEF: Restoring cached AppXManifest... Copying C:\Users\CLOUDT~1\AppData\Local\Temp\Tfm-4160-0\AppXManifest.xml to C:\a\_work\1\a\drop\Release\x64\test\AppXManifest.xml
Error: TAEF: [HRESULT: 0x8000401A] Failed to create the test host process for out of process test execution. (Failed to enable debugging for 'WindowsTerminal.TestHost_1.0.0.0_x64__aq7gd5554gxm8'.)

Probably the same thing as always. I idly wonder if we can just ship the vclibs sxs in the test like we do for the actual package. #3838 was the thread I was using before, but Helix is probably an easier solution.

@zadjii-msft commented on GitHub (Feb 11, 2022): Gah, I tried in https://dev.azure.com/ms/terminal/_build/results?buildId=272194&view=logs&j=a9c0e965-911d-5d8d-6a81-36c112a94df3&t=9660b670-796f-5b84-9008-12dc9f750614. ``` StartGroup: SettingsModelLocalTests::TerminalSettingsTests::TestCommandlineToTitlePromotion EndGroup: SettingsModelLocalTests::TerminalSettingsTests::TestCommandlineToTitlePromotion [Blocked] TAEF: Deploying custom AppXManifest... Copying C:\a\_work\1\a\drop\Release\x64\test\TestHostAppXManifest.xml to C:\a\_work\1\a\drop\Release\x64\test\AppXManifest.xml TAEF: Restoring cached AppXManifest... Copying C:\Users\CLOUDT~1\AppData\Local\Temp\Tfm-4160-0\AppXManifest.xml to C:\a\_work\1\a\drop\Release\x64\test\AppXManifest.xml Error: TAEF: [HRESULT: 0x8000401A] Failed to create the test host process for out of process test execution. (Failed to enable debugging for 'WindowsTerminal.TestHost_1.0.0.0_x64__aq7gd5554gxm8'.) ``` Probably the same thing as always. I idly wonder if we can just ship the vclibs sxs in the test like we do for the actual package. #3838 was the thread I was using before, but Helix is probably an easier solution.
Author
Owner

@ghost commented on GitHub (Mar 25, 2022):

:tada:This issue was addressed in #12484, which has now been successfully released as Windows Terminal v1.12.1073.🎉

Handy links:

@ghost commented on GitHub (Mar 25, 2022): :tada:This issue was addressed in #12484, which has now been successfully released as `Windows Terminal v1.12.1073`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.12.1073) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@ghost commented on GitHub (Mar 25, 2022):

:tada:This issue was addressed in #12484, which has now been successfully released as Windows Terminal Preview v1.13.1073.🎉

Handy links:

@ghost commented on GitHub (Mar 25, 2022): :tada:This issue was addressed in #12484, which has now been successfully released as `Windows Terminal Preview v1.13.1073`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.13.1073) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16742