summaryrefslogtreecommitdiffstats
path: root/dvm/3747/testcase
blob: 12c25538b769d048abfe9d171c82f020e10e25cd (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
#!/bin/bash

function _init ()
{
    source $cwd/regression_helpers;
}

function backend_data ()
{
    $GLUSTERFSDIR/gluster volume create --mode=script $global_bug_id replica 2  $(hostname):$EXPORT_DIR/$global_bug_id/export1\
         $(hostname):$EXPORT_DIR/$global_bug_id/export2 2>/dev/null 1>/dev/null;

    $GLUSTERFSDIR/gluster volume start $global_bug_id &>/dev/null;

    mount_glusterfs $global_bug_id;

    sleep 1;

    $GLUSTERFSDIR/gluster --mode=script volume stop $global_bug_id &>/dev/null;

    touch $EXPORT_DIR/$global_bug_id/export1/{1..10} ;

    $GLUSTERFSDIR/gluster volume start $global_bug_id &>/dev/null;

    sleep 2;

    find $FUSE_MOUNT | xargs stat &>/dev/null;

    $GLUSTERFSDIR/gluster --mode=script volume stop $global_bug_id &>/dev/null;

    rm -rf /$EXPORT_DIR/$global_bug_id/export{1,2}/*;

    touch $EXPORT_DIR/$global_bug_id/export1/{1..10} ;

    $GLUSTERFSDIR/gluster volume start $global_bug_id &>/dev/null;

    sleep 2;

    find $FUSE_MOUNT | xargs stat &>/dev/null;

    stat $FUSE_MOUNT &>/dev/null;

         return $?;
}

_init ; backend_data