Linux: Correctly count the number of open file descriptors.

The initial implementation of ProcessMetrics::GetOpenFdCount() counted
"." and ".." as well.

Add a unit test to verify the counting is correct.

BUG=496957

Review URL: https://codereview.chromium.org/1526253003

Cr-Commit-Position: refs/heads/master@{#365504}


CrOS-Libchrome-Original-Commit: cf4c85b1897bf9b1f62e4c48a4faf122958c3790
4 files changed
tree: 33dabe05f797763d5146f1e6c516c10f2e55d41f
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/