Skip to content

Test failures: System.Diagnostics.Tests.ProcessStartInfoTests on windows.11.amd64.clientpre #60191

Open

Description

@CarnaViire

StartInfo_NotepadWithContent and StartInfo_NotepadWithContent_withArgumentList fail with the following

Assert.Equal() Failure
          ↓ (pos 0)
Expected: notepad
Actual:   Notepad
          ↑ (pos 0)
Date Count Branch
4 2021-10-08 PR #60173
4 2021-10-07 PR #59925
4 2021-10-01 PR #59475
4 2021-09-28 PR #59712
4 2021-09-21 PR #59204
4 2021-09-16 PR #51736
4 2021-09-14 PR #57634
4 2021-09-13 PR #58922
8 2021-09-10 PR #58922, PR #57324

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Oct 8, 2021
  2. added
    needs-further-triageIssue has been initially triaged, but needs deeper consideration or reconsideration
    and removed
    untriagedNew issue has not been triaged by the area owner
    on Oct 9, 2021
  3. added this to the Future milestone on Oct 9, 2021
  4. am11 commented on Oct 16, 2021

    @am11
    Member
    --- a/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs
    +++ b/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs
    @@ -1318,7 +1318,7 @@ private void VerifyNotepadMainWindowTitle(Process process, string filename)
                 string expected = Path.GetFileNameWithoutExtension(filename);
    
                 process.WaitForInputIdle(); // Give the file a chance to load
    -            Assert.Equal("notepad", process.ProcessName);
    +            Assert.Equal("notepad", process.ProcessName, ignoreCase: true);
    
                 // Notepad calls CreateWindowEx with pWindowName of empty string, then calls SetWindowTextW
                 // with "Untitled - Notepad" then finally if you're opening a file, calls SetWindowTextW

    while this will fix the assertion failure. As to the reason for the difference, it could be:

    • it is spelled as Notepad.exe under system32 on that particular machine or generally on that version of windows?

    • the underlying Win32 API, NtQuerySystemInformation's documentation seem to provide no version-to-version compatibility guarantees:

      NtQuerySystemInformation may be altered or unavailable in future versions of Windows. Applications should use the alternate functions listed in this topic.

      Issue 55685 processname optimisation #59672 is changing ProcessName to use QueryFullProcessImageName which may (or may not) return the lower case on Windows 11. If someone with rights can run outerloop pipeline on that PR, we will find out.

    • something else?

  5. dotnet-policy-service commented on Apr 17, 2026

    @dotnet-policy-service
    Contributor

    Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

    This process is part of our issue cleanup automation.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions