From 134266e7d000fb94b32f193fa5025488ed6f1efa Mon Sep 17 00:00:00 2001 From: shylesh Date: Mon, 9 Jan 2012 22:52:40 +0530 Subject: BUG-764579:volume creation fails if brick path is long Change-Id: I02436655614294f025e7b8e5ca81028db226e9a0 BUG: 764579 Signed-off-by: shylesh --- dvm/764579/testcase | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 dvm/764579/testcase diff --git a/dvm/764579/testcase b/dvm/764579/testcase new file mode 100755 index 0000000..70b15c1 --- /dev/null +++ b/dvm/764579/testcase @@ -0,0 +1,22 @@ +#!/bin/bash + +source $cwd/regression_helpers + +brick=`perl -e 'print "thisisbrickname"x40'` +longpath=`perl -e 'print "/reallylong/"x50'` + +mkdir -p $EXPORT_DIR/$global_bug_id/$longpath + +# This check is for NAME_MAX +name_status=$($GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/$brick\ + |grep 'too long'|wc -l ) + +# This check is for PATH_MAX +path_status=$($GLUSTERFSDIR/gluster volume create $global_bug_id \ + $(hostname):$EXPORT_DIR/$global_bug_id/$longpath/brick1|grep 'too long'|wc -l) + +if [ $name_status -ne 1 -o $path_status -ne 1 ]; then + exit 1 +else + exit 0 +fi -- cgit