From cfca748fef28170377b868871b0dd980c1f151f6 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Sat, 16 May 2015 17:57:37 +0200 Subject: tests: write log for glupy.t to the standard log directory There is (or was) a spurious test in glupy.t for which a separate log file was setup. The directory where the log is saved, is not available on NetBSD and this causes glupy.t to always fail, without a log. Instead of hard-coding the path to the log, use "gluster --print-logdir" to provide a LOGDIR environment variable. glupy.t now writes the log to an existing directory. BUG: 1163543 Change-Id: Ifa73198d06fa267856d0da9d25a4380329909124 Signed-off-by: Niels de Vos Reviewed-on: http://review.gluster.org/10801 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- run-tests.sh | 3 +-- tests/features/glupy.t | 2 +- tests/include.rc | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/run-tests.sh b/run-tests.sh index 398efcf0c18..dc53e364c5e 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -215,7 +215,6 @@ function is_bad_test () ./tests/basic/ec/ec-5-1.t \ ./tests/basic/ec/ec-12-4.t \ ./tests/bugs/quota/bug-1035576.t \ - ./tests/features/glupy.t \ ./tests/basic/uss.t \ ./tests/bugs/glusterfs/bug-867253.t \ ./tests/bugs/glusterd/bug-974007.t \ @@ -225,7 +224,7 @@ function is_bad_test () ./tests/bugs/disperse/bug-1187474.t \ ./tests/basic/afr/sparse-file-self-heal.t \ ./tests/basic/afr/data-self-heal.t \ - ./tests/features/glupy.t; do + ; do [ x"$name" = x"$bt" ] && return 0 # bash: zero means true/success done return 1 # bash: non-zero means false/failure diff --git a/tests/features/glupy.t b/tests/features/glupy.t index 2ff6430ec6a..faa4cf33a14 100755 --- a/tests/features/glupy.t +++ b/tests/features/glupy.t @@ -20,7 +20,7 @@ volume vol-glupy end-volume EOF -TEST glusterfs -f $B0/glupytest.vol -l /var/log/glusterfs/glupy.log $M0; +TEST glusterfs -f $B0/glupytest.vol -l $LOGDIR/glupy.log $M0; TEST touch $M0/filename; EXPECT "filename" ls $M0 diff --git a/tests/include.rc b/tests/include.rc index 65fe0cc9c81..2c45873aec0 100644 --- a/tests/include.rc +++ b/tests/include.rc @@ -67,6 +67,8 @@ CONFIG_UPDATE_TIMEOUT=5 AUTH_REFRESH_INTERVAL=10 GRAPH_SWITCH_TIMEOUT=10 +LOGDIR=$(gluster --print-logdir) + statedumpdir=`gluster --print-statedumpdir`; # Default directory for statedump CLI="gluster --mode=script --wignore"; -- cgit