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

[WIP] Fix Linux process names - #35809

Closed
2E0PGS wants to merge 3 commits into
dotnet:masterfrom
2E0PGS:b/linux-proc-names
Closed

2E0PGS wants to merge 3 commits into
dotnet:masterfrom
2E0PGS:b/linux-proc-names

Conversation

@2E0PGS

@2E0PGS 2E0PGS commented Mar 6, 2019 •

Copy link
Copy Markdown
Contributor

Fix for Process.GetProcesses returns truncated 15 char string on Linux.

Fixes #34437

@danmoseley

Copy link
Copy Markdown

Thanks @2E0PGS . As mentioned in the issue the next step is a test. You can probably copy and modify the ProcessStart_DirectoryNameInCurDirectorySameAsFileNameInExecDirectory_Success test.

I suggest you use sleep as the test program, suitably renamed to a long name. You can use the logic in IsProgramInstalled to find it (perhaps extract a GetProgramPath). On some distros it doens't exist by default: I would skip the test in that case, unless you thnk of some other scheme. The test should run for macOS as well as Linux.

@danmoseley

Copy link
Copy Markdown

BTW recent github feature - when you click the button to create a PR, you have the option of making it a "draft" PR so it can't be merged.

@danmoseley danmoseley changed the title Fix Linux process names [WIP] Fix Linux process names Mar 6, 2019
@krwq

krwq commented Mar 18, 2019

Copy link
Copy Markdown
Member

codewise looks good but as @danmosemsft mentioned this is missing a test

@karelz

karelz commented Apr 1, 2019

Copy link
Copy Markdown
Member

@2E0PGS do you plan to add test as suggested above in #35809 (comment)?

@karelz karelz added this to the 3.0 milestone Apr 1, 2019
@2E0PGS

2E0PGS commented Apr 13, 2019

Copy link
Copy Markdown
Contributor Author

Hi chaps,

Sorry I have been very busy with work related activities (programming).

I suggest someone else take a look into writing some tests for this because I would need to mock a lot more than just my section of code. There is a few other objects in that method I modified which I haven't studied enough to mock yet.

I would look into it if I had more free time. So if no one does I may eventually pick this back up. However in the meantime if there is a release goal I suggest someone take ownership of the tests.

Perhaps someone who has written unit tests for this project previously is ideal.

@karelz

karelz commented Apr 13, 2019

Copy link
Copy Markdown
Member

Thanks @2E0PGS! @wtgodbe @krwq any thoughts on this? Do you want to take the PR as is, or close it and wait for a new one with tests?

@2E0PGS

2E0PGS commented Apr 13, 2019

Copy link
Copy Markdown
Contributor Author

Given the current class has no test's against it. It does seem odd it's only suddenly become a issue that it's missing tests. Since my code changes are minimal and quite obvious I would suggest the benefit is high and the changes are not a large risk.

I personally would wait and see if somone takes charge of writing a test. If no response before deadline then merge.

However if the latter occured then it would be a new issue opened for someone to write tests against various methods. Perhaps make the issue blocking of other new submissions.

@danmoseley

Copy link
Copy Markdown

@MarcoRossignoli might be interested in finishing this.

@MarcoRossignoli

Copy link
Copy Markdown
Member

Sure I'll work on it next days!

@danmoseley

Copy link
Copy Markdown

Thanks @MarcoRossignoli

@2E0PGS

2E0PGS commented Apr 16, 2019

Copy link
Copy Markdown
Contributor Author

See new PR: #36913

@karelz

karelz commented Apr 16, 2019

Copy link
Copy Markdown
Member

@2E0PGS stupid question: Does the new PR replace this one? If yes, can we close this one. If not ... please ignore my comment :)

@MarcoRossignoli

Copy link
Copy Markdown
Member

Yes we can close this one

@karelz

karelz commented Apr 16, 2019

Copy link
Copy Markdown
Member

Replaced by #36913

Thanks @MarcoRossignoli for confirmation!

@karelz karelz closed this Apr 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Process.GetProcesses returns truncated 15 char string on Linux

6 participants