#!/bin/sh
# $Id$

if test "X$FAST" != "X" ; then echo "Not running $0" ;  exit 0 ; fi

FS=${FS:-${objdir}/../appl/fs/fs}

touch file
for i in `awk 'BEGIN {for(i=0; i < 1000; ++i) printf "%d\n", i}' /dev/null`; do
 ln file file$i
done

# now trigger bulkstatus
for i in `awk 'BEGIN {for(i=0; i < 1000; ++i) printf "%d\n", i}' /dev/null`; do
 ls -l file > /dev/null 2>&1 || exit 1
 ${FS} flush file 
done

# just stat them all
for i in `awk 'BEGIN {for(i=0; i < 1000; ++i) printf "%d\n", i}' /dev/null`; do
 ls -l file$i > /dev/null 2>&1  || exit 1
done

#clean up
for i in `awk 'BEGIN {for(i=0; i < 1000; ++i) printf "%d\n", i}' /dev/null`; do
 rm file$i > /dev/null 2>&1  || exit 1
done
rm file