code: mafs

ref: fb53d7e68bcb2108fb304c81dccb1d7ff50ffa1f
dir: /tests/chkflush.rc/

View raw version
#!/bin/rc

# test flush and sync

dd -if /dev/zero -of flush/disk -bs 512 -count 64
mount -c <{disk/mafs -s -r test.flush flush/disk <[0=1]} /n/mfs_test.flush
> /n/mfs_test.flush/4blocks.file {
	# cat /n/mfs_test.flush/adm/ctl >/tmp//test.flush.file
	cat flush/2_blocks.file
	sleep 15
	cat flush/2_blocks.file
	sleep 15
}
# cat /tmp//test.flush.file
# cat /n/mfs_test.flush/adm/ctl
echo sync >> /n/mfs_test.flush/adm/ctl
cat /n/mfs_test.flush/adm/ctl
sleep 1
echo '-------sending halt------------'
echo halt >> /n/mfs_test.flush/adm/ctl