ref: 390e726c64ee2aca967617ac7f7fd2a44f27646b
dir: /tests/test.7/check.rc/
#!/bin/rc t=$1 disk=$2 nblocks=$3 # check the contents for(b in 0){ file=$t/blocks/^$b test -f $file && @{ # to avoid warning: process exceeds 200 file descriptors > /tmp/^$t^.out >[2]/tmp/^$t^.err \ diff <{grep -v '^mtime' $file} \ <{disk/block $disk $b | grep -v '^mtime'} || { echo $file cat /tmp/^$t^.out cat /tmp/^$t^.err } } } rm /tmp/^$t^* # reconcile the used and free blocks echo reconcile $disk $nblocks disk/reconcile -u <{disk/used $disk} -F <{disk/free $disk} $nblocks