cp -p $(which sleep) $DIR/$tdir/sleep || error "can't copy"
$DIR/$tdir/sleep 60 &
SLEEP_PID=$!
+ # Make sure exec of $tdir/sleep wins race with truncate
+ sleep 1
$MULTIOP $DIR/$tdir/sleep Oc && error "expected error, got success"
kill $SLEEP_PID
}
cp -p $(which sleep) $DIR/$tdir/sleep || error "can't copy"
$DIR/$tdir/sleep 60 &
SLEEP_PID=$!
+ # Make sure exec of $tdir/sleep wins race with truncate
+ sleep 1
$TRUNCATE $DIR/$tdir/sleep 0 && error "expected error, got success"
kill $SLEEP_PID
}