summaryrefslogtreecommitdiffstats
path: root/dvm/764579/testcase
blob: 70b15c10d8c1d9975ddbb77a5b42b64af6aa070a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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