ctdb-event: Force script directory to be absolute
authorMartin Schwenke <martin@meltin.net>
Fri, 7 Sep 2018 03:39:49 +0000 (13:39 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Tue, 18 Dec 2018 02:36:47 +0000 (13:36 +1100)
If TEST_VAR_DIR is relative then symbolic link targets will be
incorrect.

Don't force TEST_VAR_DIR to be absolute because this can result in
Unix domain socket names that are too long.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/cunit/event_script_test_001.sh

index 9a26412..0ef9365 100755 (executable)
@@ -5,6 +5,8 @@
 scriptdir="${TEST_VAR_DIR}/cunit/scriptdir"
 mkdir -p "${scriptdir}"
 
+scriptdir=$(cd "$scriptdir" && echo "$PWD")
+
 test_cleanup "rm -rf ${scriptdir}"
 
 # Invalid path