#!/bin/bash description="# Updating stats in posix is incorrect" comments="# In POSIX, updating nr_files is not being done right. It is being incremented even before checking return values from open() and close()." source ../../init start_glusterfs --no-servers --no-clients sleep 2 $($GLUSTERFS --run-id regr.c.$BUGID -f $SPECDIR/server1.vol -l $LOGDIR/$(hostname)-server1.log --pid-file=$PWD/server1.pid) sleep 1 $($GLUSTERFS --run-id regr.c.$BUGID -f $SPECDIR/client1.vol $MOUNTDIR/client1 -l $LOGDIR/$(hostname)-client1.log --pid-file=$PWD/client1.pid) dbench -s -S 10 -t 10 -D $MOUNTDIR/client1 >/dev/null cat server1.pid | xargs kill -USR1 >/dev/null NR_FILES=$(grep 'nr_files' /tmp/glusterdump.`cat server1.pid` 2> /dev/null | cut -d"=" -f2 | grep 0 | wc -l) if [ $NR_FILES -ne 0 ] ; then ok $description comment $comments else not_ok $description comment $comments fi rm /tmp/glusterdump.`cat server1.pid` 2> /dev/null cleanup_glusterfs cat server1.pid | xargs kill -9 >/dev/null rm *.pid >/dev/null