summaryrefslogtreecommitdiffstats
path: root/241/regr/testcase
blob: 2633a3025a4214c35d4a368c0a1f63329cc56d35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash

description="# (241) GlusterFS not honouring SETGID flag"
comments="# setgid problem on glusterfs mount"

version=$1
bugid=$(pwd | cut -d '/' -f 4)

exportdir=/jbod/regr/$bugid
mountdir=/mnt/regr/$bugid/$version

function ok () {
  desc=$@
  echo "ok - $desc"
}

function not_ok () {
  desc=$@
  echo "not ok - $desc"
}


function comment () {
  desc=$@
  echo "$desc"
}

[ $# -ne 1 ] && {
  not_ok "#<Usage: $(basename $0) <glusterfs_version>"
  exit 
}


/opt/qa/regr/setup $version $bugid

sleep 5
cd $mountdir/client1
mkdir 1
chgrp avahi 1
chmod g+s 1
var1=$(ls -ld 1 | cut -d " " -f 4)
cd 1
mkdir 2
var2=$(ls -ld 2 | cut  -d " " -f 4)

#echo $var1
#echo $var2

if [ $var1 = $var2 ];then
	ok $description
else
	not_ok $description
	comment $comments
fi

rmdir $mountdir/client1/1/2
cd ..
rmdir $mountdir/client1/1


/opt/qa/regr/cleanup $version $bugid