oseek="$((ps))" bs=1 count=1 - atf_check -o inline:"0-$((ps-1)),$((ps+1)) foo" \ + atf_check dd status=none if="${file}" of=foo \ + oseek="$((hs))" bs=1 count=1 + atf_check -o inline:"0-$((hs-1)),$((hs+1)) foo" \ stat -hn foo - atf_check truncate -s "$((ps*3))" foo - atf_check -o inline:"0-$((ps-1)),$((ps*2))-$((ps*3-1)) foo" \ + atf_check truncate -s "$((hs*3))" foo + atf_check -o inline:"0-$((hs-1)),$((hs+ps))-$((hs*3-1)) foo" \ stat -hn foo # Test multiple files. - atf_check dd status=none if=/COPYRIGHT of=bar + atf_check dd status=none if="${file}" of=bar sz=$(stat -f%z bar) - atf_check -o inline:"0-$((ps-1)),$((ps*2))-$((ps*3-1)) foo -$((sz)) bar -" \ + atf_check -o inline:"0-$((hs-1)),$((hs+ps))-$((hs*3-1)) foo\n$((sz)) bar\n" \ stat -h foo bar # For a device, fail.