From: Loic Dachary Date: Fri, 18 Nov 2016 07:06:02 +0000 (+0100) Subject: tests: save 9 characters for asok paths X-Git-Tag: v10.2.6~30^2~4^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4df1b9c54b454e764f0503f4732e5025b33d3c04;p=ceph.git tests: save 9 characters for asok paths For vstart.sh powered tests, save 9 characters in the path name by replacing testdir/test- with td/t- 60 characters imposed by jenkins 9 characters for src/test 5 characters for td/t- 33 left (instead of 24) for the test to create asok such as out/client.admin.25327.asok Moving these files outside of the build directory is a bad idea because tests should only create/use files within the builddir and not write outside of this directory. Doing so would make things more complicated for cleanup in case the test fail and create other problems as a consequence (filling out disk space, conflicting directories between runs etc.). For ceph-helpers.sh tests replace testdir with td, saving 5 characters. This is not strictly necessary but keeps the directory names consistent: if the developer wants to get rid of all the test leftovers, it is enough to remove the a single directory: td. Fixes: http://tracker.ceph.com/issues/16014 Signed-off-by: Loic Dachary (cherry picked from commit cd72ff9f746fe13a245324dce2aa457d3c876331) Conflicts: .gitignore : test directories are not ignored in jewel src/test/vstart_wrapper.sh : trivial context resolution --- diff --git a/qa/workunits/ceph-helpers.sh b/qa/workunits/ceph-helpers.sh index 4f5f8f802621..994721759114 100755 --- a/qa/workunits/ceph-helpers.sh +++ b/qa/workunits/ceph-helpers.sh @@ -1442,7 +1442,7 @@ function test_wait_background() { # @return 0 on success, 1 on error # function main() { - local dir=testdir/$1 + local dir=td/$1 shift shopt -s -o xtrace @@ -1481,7 +1481,7 @@ function run_tests() { export CEPH_CONF=/dev/null local funcs=${@:-$(set | sed -n -e 's/^\(test_[0-9a-z_]*\) .*/\1/p')} - local dir=testdir/ceph-helpers + local dir=td/ceph-helpers for func in $funcs ; do $func $dir || return 1 diff --git a/src/test/vstart_wrapper.sh b/src/test/vstart_wrapper.sh index 5c5a3501e928..a555855c4ef6 100755 --- a/src/test/vstart_wrapper.sh +++ b/src/test/vstart_wrapper.sh @@ -19,7 +19,7 @@ source $CEPH_ROOT/qa/workunits/ceph-helpers.sh export CEPH_VSTART_WRAPPER=1 -export CEPH_DIR="$PWD/testdir/test-$CEPH_PORT" +export CEPH_DIR="$PWD/td/t-$CEPH_PORT" export CEPH_DEV_DIR="$CEPH_DIR/dev" export CEPH_OUT_DIR="$CEPH_DIR/out"