This is an automated email from the ASF dual-hosted git repository. awong pushed a commit to branch branch-1.13.x in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 2acc4d66d5fefff42f532b0e10899c66920c46f0 Author: Grant Henke <[email protected]> AuthorDate: Wed Dec 2 10:55:43 2020 -0600 [test] Use /tmp for mini-chronyd sockets To ensure the path is less than 100 bytes this patch uses /tmp instead of the test directory for chronyd sockets. Change-Id: I567ff640fca5c56fef3f4400216fc8b23532713e Reviewed-on: http://gerrit.cloudera.org:8080/16809 Reviewed-by: Alexey Serbin <[email protected]> Tested-by: Andrew Wong <[email protected]> --- src/kudu/clock/test/mini_chronyd.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/kudu/clock/test/mini_chronyd.cc b/src/kudu/clock/test/mini_chronyd.cc index 0d2cf78..5f4cf6d 100644 --- a/src/kudu/clock/test/mini_chronyd.cc +++ b/src/kudu/clock/test/mini_chronyd.cc @@ -422,10 +422,8 @@ $0 // The path to Unix domain socket file cannot be longer than ~100 bytes, // so it's necessary to create a directory with shorter absolute path. // TODO(aserbin): use some synthetic mount point instead? - string dir; - RETURN_NOT_OK(Env::Default()->GetTestDirectory(&dir)); - dir = JoinPathSegments(dir, Substitute("$0.$1", Env::Default()->NowMicros(), - getpid())); + string dir = JoinPathSegments("/tmp", Substitute("$0.$1", + Env::Default()->NowMicros(), getpid())); const auto s = Env::Default()->CreateDir(dir); if (!s.ok() && !s.IsAlreadyPresent()) { return s; @@ -433,6 +431,7 @@ $0 RETURN_NOT_OK(CorrectOwnership(dir)); options_.bindcmdaddress = Substitute("$0/chronyd.$1.sock", dir, options_.index); + // Set cmd_socket_dir_ so we can cleanup the unix domain sockets. cmd_socket_dir_ = std::move(dir); } string username;
