diff options
author | shylesh <shmohan@redhat.com> | 2012-01-09 22:52:40 +0530 |
---|---|---|
committer | shylesh <shmohan@redhat.com> | 2012-01-11 14:37:39 +0530 |
commit | 134266e7d000fb94b32f193fa5025488ed6f1efa (patch) | |
tree | 5393a30dafd93ce5c21935b762f3ece1bfd5a310 /dvm/764579 | |
parent | 51afd69fe39afd61f1ca37c147f44a84bad08d09 (diff) |
BUG-764579:volume creation fails if brick path is long
Change-Id: I02436655614294f025e7b8e5ca81028db226e9a0
BUG: 764579
Signed-off-by: shylesh <shmohan@redhat.com>
Diffstat (limited to 'dvm/764579')
-rwxr-xr-x | dvm/764579/testcase | 22 |
1 files changed, 22 insertions, 0 deletions
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 |