Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable on Server Core 3 tests that use Notepad #44972

Merged
merged 1 commit into from
Nov 20, 2020

Conversation

danmoseley
Copy link
Member

@danmoseley danmoseley commented Nov 19, 2020

Fixes #26231
Fixes #44239

Since a207c7f 3 Process tests still fail consistently, and only on Server Core:

StartInfo_TextFile_ShellExecute

This means ShellExecuteExW succeeded, but even though we passed SEE_MASK_NOCLOSEPROCESS it did not fill in the hProcess. The docs say

Even if fMask is set to SEE_MASK_NOCLOSEPROCESS, hProcess will be NULL if no process was launched. For example, if a document to be launched is a URL and an instance of Internet Explorer is already running, it will display the document. No new process is launched, and hProcess will be NULL.

Yet it does launch notepad. Although the failure is consistent I am not able to repro locally on a Server Core container, ie the following works

PS C:\Users\danmose> $psi = new-object System.Diagnostics.ProcessStartInfo
PS C:\Users\danmose> $psi.UseShellExecute = $true
PS C:\Users\danmose> dir >c:\temp\foo.txt
PS C:\Users\danmose> $psi.FileName = "c:\temp\foo.txt"
PS C:\Users\danmose> $ps = [System.Diagnostics.Process]::Start($psi)
PS C:\Users\danmose> $ps -eq $null
False

So I am just disabling this test for Server Core.

StartInfo_NotepadWithContent_withArgumentList
StartInfo_NotepadWithContent

I tried both notepad and regedit on Server Core -- the process launches, but GetWindowText always returns blank. So, disabling checking the title on Server Core.

@ghost
Copy link

ghost commented Nov 19, 2020

Tagging subscribers to this area: @eiriktsarpalis, @jeffhandley
See info in area-owners.md if you want to be subscribed.

Issue Details

Since a207c7f 3 Process tests still fail consistently, and only on Server Core:

StartInfo_TextFile_ShellExecute

This means ShellExecuteExW succeeded, but even though we passed SEE_MASK_NOCLOSEPROCESS it did not fill in the hProcess. The docs say

Even if fMask is set to SEE_MASK_NOCLOSEPROCESS, hProcess will be NULL if no process was launched. For example, if a document to be launched is a URL and an instance of Internet Explorer is already running, it will display the document. No new process is launched, and hProcess will be NULL.

Yet it does launch notepad. Although the failure is consistent I am not able to repro locally on a Server Core container, ie the following works

PS C:\Users\danmose> $psi = new-object System.Diagnostics.ProcessStartInfo
PS C:\Users\danmose> $psi.UseShellExecute = $true
PS C:\Users\danmose> dir >c:\temp\foo.txt
PS C:\Users\danmose> $psi.FileName = "c:\temp\foo.txt"
PS C:\Users\danmose> $ps = [System.Diagnostics.Process]::Start($psi)
PS C:\Users\danmose> $ps -eq $null
False

So I am just disabling this test for Server Core.

StartInfo_NotepadWithContent_withArgumentList
StartInfo_NotepadWithContent

I tried both notepad and regedit on Server Core -- the process launches, but GetWindowText always returns blank. So, disabling checking the title on Server Core.

Author: danmosemsft
Assignees: -
Labels:

area-System.Diagnostics.Process

Milestone: -

Copy link
Member

@eiriktsarpalis eiriktsarpalis left a comment

Choose a reason for hiding this comment

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

LGTM. Should we be closing the linked issues?

@danmoseley danmoseley merged commit 38c9b98 into dotnet:master Nov 20, 2020
@danmoseley danmoseley deleted the servercore branch November 20, 2020 15:50
@danmoseley
Copy link
Member Author

I closed them as realistically I don't think there is further action we are going to take and I think that's OK. We are still testing shellexec on this OS.

@adamsitnik adamsitnik added this to the 6.0.0 milestone Dec 16, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jan 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants