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

Fix Linux process names #36880

Closed
wants to merge 4 commits into from
Closed

Fix Linux process names #36880

wants to merge 4 commits into from

Conversation

MarcoRossignoli
Copy link
Member

@MarcoRossignoli MarcoRossignoli commented Apr 15, 2019

Replacement of #35809
I moved changes to new PR for convenience(few line of code) and added a test.
If it's not ok (the solution is of @2E0PGS I only added test) please tell me how I can move commit from another forked branch to mine(so I don't waste time scrubbing on internet), I neved did it.

Fixes https://github.com/dotnet/corefx/issues/34437

/cc @2E0PGS @danmosemsft @krwq @wtgodbe

Output without changes:

~/repos/corefx/artifacts/bin/tests/System.Diagnostics.Process.Tests/netcoreapp-Linux-Debug-x64 ~/repos/corefx/src/System.Diagnostics.Process/tests
    Discovering: System.Diagnostics.Process.Tests (method display = ClassAndMethod, method display options = None)
    Discovered:  System.Diagnostics.Process.Tests (found 1 of 273 test case)
    Starting:    System.Diagnostics.Process.Tests (parallel test collections = on, max threads = 4)
      System.Diagnostics.Tests.ProcessTests.GetProcesses_LongProcessName [FAIL]
        Process named '123456789012345678901234567890' not found
        Expected: True
        Actual:   False
        Stack Trace:
          /home/marco/repos/corefx/src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs(95,0): at System.Diagnostics.Tests.ProcessTests.GetProcesses_LongProcessName()
    Finished:    System.Diagnostics.Process.Tests
  === TEST EXECUTION SUMMARY ===
     System.Diagnostics.Process.Tests  Total: 1, Errors: 0, Failed: 1, Skipped: 0, Time: 0.453s
  ~/repos/corefx/src/System.Diagnostics.Process/tests
  ----- end 16:34:01 ----- exit code 1 ----------------------------------------------------------
  Looking around for any Linux dump...
  ... found no dump in /home/marco/repos/corefx/artifacts/bin/tests/System.Diagnostics.Process.Tests/netcoreapp-Linux-Debug-x64

@2E0PGS
Copy link
Contributor

2E0PGS commented Apr 15, 2019 via email

@danmoseley
Copy link
Member

Note that we squash history before committing PR'S to master.

Copy link
Member

@danmoseley danmoseley left a comment

Choose a reason for hiding this comment

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

Looks good except for minor comments. Thanks!

@2E0PGS
Copy link
Contributor

2E0PGS commented Apr 15, 2019 via email

@krwq
Copy link
Member

krwq commented Apr 15, 2019

I agree with @2E0PGS that this should start with his squashed changes and changes on top of that separately - after that we should merge/rebase (not squash) this

@danmoseley
Copy link
Member

So long as we end up with a single (non merge) commit in master, any variation is fine.

@MarcoRossignoli
Copy link
Member Author

MarcoRossignoli commented Apr 15, 2019

@2E0PGS feel free to copy paste my code it's not a problem to me at all!Don't worry!
Test is less important than investigation and solution.

@danmoseley
Copy link
Member

@MarcoRossignoli you should be able to push your change to the existing PR #35809. @2E0PGS might need to give you rights, give it a try.

@MarcoRossignoli
Copy link
Member Author

Ok

@MarcoRossignoli
Copy link
Member Author

@2E0PGS I need permission to write to your branch

remote: Permission to 2E0PGS/corefx.git denied to MarcoRossignoli.
fatal: unable to access 'https://github.com/2E0PGS/corefx.git/': The requested URL returned error: 403

@danmoseley
Copy link
Member

It may also work to cherry-pick the change by @2E0PGS into your own branch (if you want to play more with Git 😄 )

I do not know which person is considered the "author" when we squash to merge. I'm guessing the author of the first commit.

It's fine if authorship works out but as I mentioned, we generally don't pay much attention to that and most folks seem OK with that.

@2E0PGS
Copy link
Contributor

2E0PGS commented Apr 16, 2019

Added Marco's write perms.

push to my new branch https://github.com/2E0PGS/corefx/tree/b/linux-proc-name-char

there is a pr for that now.

@MarcoRossignoli
Copy link
Member Author

@2E0PGS added test, I think you need to login for CLA.

@MarcoRossignoli MarcoRossignoli deleted the finish_34437 branch April 16, 2019 07:58
@2E0PGS
Copy link
Contributor

2E0PGS commented Apr 16, 2019

done.

@karelz karelz added this to the 3.0 milestone May 4, 2019
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.

Process.GetProcesses returns truncated 15 char string on Linux
5 participants