This is an automated email from the ASF dual-hosted git repository.

awong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git


The following commit(s) were added to refs/heads/master by this push:
     new ef5b5ab  [test] Use /tmp for mini-chronyd sockets
ef5b5ab is described below

commit ef5b5abdcefbc5b7d7edb7170d55b82843926b25
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/16808
    Tested-by: Kudu Jenkins
    Reviewed-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;

Reply via email to