blob: 996248d4116e923ef529d9a6eb999ee0583cebbb (
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
|
#!/bin/bash
. $(dirname $0)/../../include.rc
. $(dirname $0)/../../volume.rc
cleanup;
TEST glusterd
TEST pidof glusterd
TEST $CLI volume info;
TEST $CLI volume create $V0 $H0:$B0/brick1 $H0:$B0/brick2;
EXPECT 'Created' volinfo_field $V0 'Status';
TEST $CLI volume start $V0;
EXPECT 'Started' volinfo_field $V0 'Status';
MOUNTDIR=$M0;
#memory-accounting is enabled by default
TEST glusterfs --volfile-server=$H0 --volfile-id=$V0 $MOUNTDIR;
sdump1=$(generate_mount_statedump $V0);
nalloc1=0
grep -A3 "fuse - usage-type gf_common_mt_fd_lk_ctx_node_t" $sdump1
if [ $? -eq '0' ]
then
nalloc1=`grep -A3 "fuse - usage-type gf_common_mt_fd_lk_ctx_node_t" $sdump1 | grep -E "^num_allocs" | cut -d '=' -f2`
fi
build_tester $(dirname $0)/bug-834465.c
TEST $(dirname $0)/bug-834465 $M0/testfile
sdump2=$(generate_mount_statedump $V0);
nalloc2=0
grep -A3 "fuse - usage-type gf_common_mt_fd_lk_ctx_node_t" $sdump2
if [ $? -eq '0' ]
then
nalloc2=`grep -A3 "fuse - usage-type gf_common_mt_fd_lk_ctx_node_t" $sdump2 | grep -E "^num_allocs" | cut -d '=' -f2`
fi
TEST [ $nalloc1 -eq $nalloc2 ];
TEST rm -rf $MOUNTDIR/*
TEST rm -rf $(dirname $0)/bug-834465
cleanup_mount_statedump $V0
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $MOUNTDIR
cleanup;
|