summaryrefslogtreecommitdiffstats
path: root/277/regr/testcase
blob: 10ad25a083e09009efc2b825c338a3a4d75a4cfe (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
#!/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