[common/system/filesystem] common ancestor fixes and more tests.

Some cases weren't well tested in the previous CL. This one adds some
tests and fixes some revealed bugs.

  * slashesMatch was incorrect due to an off by one error (it would
    compare [0, 12] vs [0, 12] for whichSlash==2, but really should have
    compared [0, 12, 15] vs [0, 12, 19].
  * We now explicitly check that all paths share the same Volume. If
    they do not, then they cannot have a common ancestor.

R=rgw, vadimsh

Change-Id: I06b22e0358879f613a40ab298c8beb43b7a2cd96
Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/4062996
Reviewed-by: Riley Wong <rgw@google.com>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
2 files changed
tree: c86901194dbe8b766fd37df2412836ae825bb36e
  1. analysis/
  2. appengine/
  3. auth/
  4. auth_service/
  5. bisection/
  6. build/
  7. buildbucket/
  8. casviewer/
  9. cipd/
  10. client/
  11. cmdrunner/
  12. common/
  13. config/
  14. cv/
  15. deploy/
  16. examples/
  17. gae/
  18. gce/
  19. grpc/
  20. hardcoded/
  21. led/
  22. logdog/
  23. luci_notify/
  24. lucicfg/
  25. lucictx/
  26. luciexe/
  27. mailer/
  28. milo/
  29. mmutex/
  30. provenance/
  31. resultdb/
  32. scheduler/
  33. scripts/
  34. server/
  35. standalone/
  36. starlark/
  37. swarming/
  38. tokenserver/
  39. tools/
  40. vpython/
  41. web/
  42. .gitallowed
  43. .gitattributes
  44. .golangci.yml
  45. AUTHORS
  46. codereview.settings
  47. CONTRIBUTING.md
  48. CONTRIBUTORS
  49. go.mod
  50. go.sum
  51. LICENSE
  52. OWNERS
  53. PRESUBMIT.py
  54. README.md
  55. tools.go
  56. WATCHLISTS
README.md

luci-go: LUCI services and tools in Go

GoReference

Installing

LUCI Go code is meant to be worked on from an Chromium infra.git checkout, which enforces packages versions and Go toolchain version. First get fetch via depot_tools.git then run:

fetch infra
cd infra/go
eval `./env.py`
cd src/go.chromium.org/luci

It is now possible to directly install tools with go install:

go install go.chromium.org/luci/auth/client/cmd/...@latest
go install go.chromium.org/luci/buildbucket/cmd/...@latest
go install go.chromium.org/luci/cipd/client/cmd/...@latest
go install go.chromium.org/luci/client/cmd/...@latest
go install go.chromium.org/luci/cv/cmd/...@latest
go install go.chromium.org/luci/gce/cmd/...@latest
go install go.chromium.org/luci/grpc/cmd/...@latest
go install go.chromium.org/luci/logdog/client/cmd/...@latest
go install go.chromium.org/luci/luci_notify/cmd/...@latest
go install go.chromium.org/luci/lucicfg/cmd/...@latest
go install go.chromium.org/luci/luciexe/legacy/cmd/...@latest
go install go.chromium.org/luci/mailer/cmd/...@latest
go install go.chromium.org/luci/mmutex/cmd/...@latest
go install go.chromium.org/luci/resultdb/cmd/...@latest
go install go.chromium.org/luci/server/cmd/...@latest
go install go.chromium.org/luci/swarming/cmd/...@latest
go install go.chromium.org/luci/tokenserver/cmd/...@latest
go install go.chromium.org/luci/tools/cmd/...@latest

Contributing

Contributing uses the same flow as Chromium contributions.