#!/bin/bash description="# fcntl system with F_DUPFD command fails on booster" comments="# when fcntl system call is executed with the F_DUPFD command the call fails with EINVAL as the error status" 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 sleep 2 gcc $SPECDIR/fcntl.c -o $SPECDIR/fcntl $SPECDIR/fcntl $MOUNTDIR/client1/a1 if [ $? -eq 22 ]; then not_ok $description comment $comments else ok $description comment $comments fi rm $SPECDIR/fcntl $SPECDIR/booster.conf GLUSTERFS_BOOSTER_FSTAB= LD_PRELOAD= cleanup_glusterfs