summaryrefslogtreecommitdiffstats
path: root/260/regr/testcase
blob: 5c002e5cec66e9e9ca74955df47d6f7bb04ad6ce (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
#!/bin/bash

description="#ls on booster VMP results in error: File descriptor in bad state"
comments="# ls command on the VMP gives ls: closing directory <VMP> : File descriptor in bad state as the output"

source ../../init

start_glusterfs --no-clients

sleep 5
echo "$SPECDIR/client1.vol $MOUNTDIR/client1 glusterfs subvolume=client,logfile=$LOGDIR/clog,loglevel=DEBUG" > $SPECDIR/booster.conf
export GLUSTERFS_BOOSTER_FSTAB=$SPECDIR/booster.conf
export LD_PRELOAD=$(dirname $GLUSTERFSDIR)/lib/glusterfs/glusterfs-booster.so

touch $MOUNTDIR/client1/a1
ls $MOUNTDIR/client1 2> tmpfile >/dev/null
if [ $(grep "ls: closing directory $MOUNTDIR/client1: File descriptor in bad state" tmpfile | wc -l) -ne 0 ]; then
    not_ok $description
    comment $comments
else
    ok $description
    comment $comments
fi

GLUSTERFS_BOOSTER_FSTAB=
LD_PRELOAD=
rm tmpfile $SPECDIR/booster.conf

cleanup_glusterfs