+log "comparing previously copied files"
+cat $FILES | tr "\0" "\n" | ( rc=0; while read f; do
+ [ $V ] && log "verifying $DST/$f"
+ diff -q "$f" "$DST/$f" || rc=22
+done
+[ "$rc" = 0 ] || error_exit "old and new files are different: rc=$rc" )
+
+stopall || exit 21
+setupall || exit 22
+
+log "removing $DST"
+rm -r $V $DST || error "can't remove $DST" 37
+
+if [ $COUNT -gt 10 -o $COUNT -eq 0 ]; then
+ log "renaming $HOSTS.ren to $HOSTS"
+ mv $HOSTS.ren $HOSTS || error "can't rename $HOSTS.ren to $HOSTS" 32
+ log "truncating $HOSTS"
+ > $HOSTS || error "can't truncate $HOSTS" 34
+ log "removing $HOSTS"
+ rm $HOSTS || error "can't remove $HOSTS again" 36
+ log "verifying $HOSTS.2 is $TRUNCSIZE bytes"
+ checkstat -s $TRUNCSIZE $HOSTS.2 || \
+ error "$HOSTS.2 isn't $TRUNCSIZE bytes" 37
+ rm $HOSTS.2 || error "can't remove $HOSTS.2" 38
+fi
+
+# mkdirmany test (bug 589)
+log "running $MKDIRMANY $MOUNT/base$$ 100"
+$MKDIRMANY $MOUNT/base$$ 100 || error "mkdirmany failed"
+log "removing mkdirmany directories"
+rmdir $MOUNT/base$$* || error "mkdirmany cleanup failed"
+
+log "done"
+
+NOWUSED=`df | awk "/$OSCTMP/ { print \\$3 }" | tail -n 1`
+if [ `expr $NOWUSED - $USED` -gt 1024 ]; then
+ echo "Space not all freed: now ${NOWUSED}kB, was ${USED}kB." 1>&2
+fi
+
+complete $(basename $0) $SECONDS
+rm -f $FILES
+check_and_cleanup_lustre
+exit_status