#!/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 : 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