summaryrefslogtreecommitdiffstats
path: root/tests/bugs/bug-884452.t
blob: 420b4bc884735683d7d9f20b6ef597ba6bd3106b (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
#!/bin/bash

. $(dirname $0)/../include.rc

cleanup;

TEST glusterd
TEST pidof glusterd

TEST $CLI volume create $V0 $H0:$B0/$V0
TEST $CLI volume start $V0

TEST glusterfs -s $H0 --volfile-id $V0 $M0
TEST touch $M0/{1..10000}

function ls-loop
{
  while true; do
    ls -lR $M0 1>/dev/null 2>&1
  done;
}
ls-loop &
LS_LOOP=$!

function vol-status-loop
{
  for i in {1..1000}; do
    $CLI volume status $V0 clients >/dev/null 2>&1
    if [ $? -ne 0 ]; then
      return 1
    fi
  done;

  return 0
}

TEST vol-status-loop

kill $LS_LOOP >/dev/null 2>&1
sleep 2

TEST umount $M0

cleanup;