1153187Spjd#!/bin/sh 2153187Spjd# $FreeBSD: releng/11.0/tests/sys/geom/class/raid3/11_test.sh 293821 2016-01-13 09:14:27Z ngie $ 3153187Spjd 4153187Spjd. `dirname $0`/conf.sh 5153187Spjd 6153187Spjdecho "1..1" 7153187Spjd 8153187Spjdddbs=2048 9153187Spjdnblocks1=1024 10153187Spjdnblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` 11293438Sngiesrc=`mktemp $base.XXXXXX` || exit 1 12293438Sngiedst=`mktemp $base.XXXXXX` || exit 1 13153187Spjd 14293438Sngieus0=$(attach_md -t malloc -s $(expr $nblocks1 + 1)) || exit 1 15293438Sngieus1=$(attach_md -t malloc -s $(expr $nblocks1 + 1)) || exit 1 16293438Sngieus2=$(attach_md -t malloc -s $(expr $nblocks1 + 1)) || exit 1 17293438Sngie 18153187Spjddd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 19153187Spjd 20293438Sngiegraid3 label -w $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 21153187Spjddevwait 22153187Spjd 23153187Spjddd if=${src} of=/dev/raid3/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 24153187Spjd 25153187Spjddd if=/dev/raid3/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 26153187Spjdif [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then 27153187Spjd echo "not ok 1" 28153187Spjdelse 29153187Spjd echo "ok 1" 30153187Spjdfi 31153187Spjd 32153187Spjdrm -f ${src} ${dst} 33