#!/bin/sh
# $Id: part-files,v 1.5 2002/10/20 17:19:41 tol Exp $

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

(yes | dd count=512 bs=1024 of=one 2>&4) || exit 1
(yes | dd count=512 bs=1024 of=two 2>&4) || exit 1

${FS} flush two || exit 1

# check that utimes, which triggers write_attr() or truncate_file(),
# doesn't do bad things
touch two || exit 1

cmp one two || exit 1

${FS} flush two || exit 1

# check that write to the beginning of the file doesn't do bad things
(yes | dd count=1 bs=1024 of=two conv=notrunc 2>&4) || exit 1

cmp one two || exit 1

exit 0
