From b665de65cd7125bc2aee171f78d2d7628a8bd8b4 Mon Sep 17 00:00:00 2001 From: Takuto Ikuta Date: Fri, 26 May 2023 06:24:45 +0000 Subject: [PATCH] reclient_helper: fix path for unix domain socket Bug: b/278846515 Change-Id: Ic836b9e62b30eb2dd4fd8d692cdf7001d8eb90ec Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4570164 Commit-Queue: Junji Watanabe Reviewed-by: Junji Watanabe Auto-Submit: Takuto Ikuta Commit-Queue: Takuto Ikuta --- reclient_helper.py | 2 +- tests/ninja_reclient_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reclient_helper.py b/reclient_helper.py index 44614e77c..108343df1 100644 --- a/reclient_helper.py +++ b/reclient_helper.py @@ -137,7 +137,7 @@ def set_reproxy_path_flags(out_dir, make_dirs=True): # unix domain socket has path length limit, so use fixed size path here. # ref: https://www.man7.org/linux/man-pages/man7/unix.7.html os.environ.setdefault( - "RBE_server_address", "unix://tmp/reproxy_%s.sock" % + "RBE_server_address", "unix:///tmp/reproxy_%s.sock" % hashlib.sha256(tmp_dir.encode()).hexdigest()) diff --git a/tests/ninja_reclient_test.py b/tests/ninja_reclient_test.py index a2680600b..78f131ce3 100755 --- a/tests/ninja_reclient_test.py +++ b/tests/ninja_reclient_test.py @@ -87,7 +87,7 @@ class NinjaReclientTest(trial_dir.TestCase): else: self.assertEqual( os.environ.get('RBE_server_address'), - "unix://tmp/reproxy_%s.sock" % hashlib.sha256( + "unix:///tmp/reproxy_%s.sock" % hashlib.sha256( os.path.join(self.root_dir, "out", "a", ".reproxy_tmp").encode()).hexdigest())