Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

System.Diagnostics.Process has a different behavior on non-Windows platforms - #248

Merged
José Rivero (jorive) merged 3 commits into
microsoft:masterfrom
jorive:dev/scenario-on-linux-bug-fix
Nov 17, 2017
Merged

José Rivero (jorive) merged 3 commits into
microsoft:masterfrom
jorive:dev/scenario-on-linux-bug-fix

Conversation

@jorive

Copy link
Copy Markdown
  • The Process.StartTime throw System.ComponentModel.Win32Exception on Linux because the data is not available once the process exits.

José Rivero added 2 commits November 16, 2017 12:04
…ndows platforms.

- The Process.[StartTime/ExitTime] throw `System.ComponentModel.Win32Exception` on Linux. The API is exposing OS information that is not available once the process exits.
StartTime = process.StartTime;
ExitTime = process.ExitTime;

if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The change here seems reasonable to me, but I think rather than special casing Windows, just do the same thing on all platforms. Otherwise, our methodology is different between operating systems, and that makes both the harness and data interpretation more complicated.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks, makes sense.

@jorive
José Rivero (jorive) merged commit 2090f20 into microsoft:master Nov 17, 2017
@jorive
José Rivero (jorive) deleted the dev/scenario-on-linux-bug-fix branch November 17, 2017 00:16
ghost pushed a commit to dotnet/sdk that referenced this pull request Jan 24, 2018
* First draft enabling performance tests...

* Disabling tests for non-Windows...

* Updates...

* Missing "\"

* Set 'DefaultIterations' to "1"

* Resolved BUG: microsoft/xunit-performance#248

* Fixing typos...

* Formatting, variable names changes.

* Fixing a typo...
ghost pushed a commit to dotnet/sdk that referenced this pull request Jan 30, 2018
* First draft enabling performance tests...

* Resolved BUG: microsoft/xunit-performance#248
ghost pushed a commit to dotnet/sdk that referenced this pull request Feb 7, 2018
* First draft enabling performance tests...

* Disabling tests for non-Windows...

* Updates...

* Missing "\"

* Set 'DefaultIterations' to "1"

* Resolved BUG: microsoft/xunit-performance#248

* Fixing typos...

* Formatting, variable names changes.

* Fixing a typo...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants