ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/src/trunk/tests/sys/geom/class/raid3/4_test.sh
Revision: 11980
Committed: Sun Jul 29 19:14:46 2018 UTC (5 years, 9 months ago) by laffer1
Content type: text/plain
File size: 865 byte(s)
Log Message:
add tests

File Contents

# Content
1 #!/bin/sh
2 # $MidnightBSD$
3
4 . `dirname $0`/conf.sh
5
6 echo "1..1"
7
8 ddbs=2048
9 nblocks1=1024
10 nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)`
11 src=`mktemp $base.XXXXXX` || exit 1
12 dst=`mktemp $base.XXXXXX` || exit 1
13
14 us0=$(attach_md -t malloc -s $(expr $nblocks1 + 1)) || exit 1
15 us1=$(attach_md -t malloc -s $(expr $nblocks1 + 1)) || exit 1
16 us2=$(attach_md -t malloc -s $(expr $nblocks1 + 1)) || exit 1
17
18 dd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1
19
20 graid3 label $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1
21 devwait
22
23 #
24 # Writing without one DATA component.
25 #
26 graid3 remove -n 1 $name
27 dd if=${src} of=/dev/raid3/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1
28
29 dd if=/dev/raid3/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1
30 if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then
31 echo "not ok 1"
32 else
33 echo "ok 1"
34 fi
35
36 rm -f ${src} ${dst}

Properties

Name Value
svn:eol-style native
svn:keywords MidnightBSD=%H
svn:mime-type text/plain