Module Name: src
Committed By: pooka
Date: Mon Jan 3 09:37:43 UTC 2011
Modified Files:
src/tests/dev/cgd: t_cgd.sh
Log Message:
make this work when rawpart != d
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/dev/cgd/t_cgd.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/dev/cgd/t_cgd.sh
diff -u src/tests/dev/cgd/t_cgd.sh:1.4 src/tests/dev/cgd/t_cgd.sh:1.5
--- src/tests/dev/cgd/t_cgd.sh:1.4 Thu Dec 30 16:58:07 2010
+++ src/tests/dev/cgd/t_cgd.sh Mon Jan 3 09:37:42 2011
@@ -1,4 +1,4 @@
-# $NetBSD: t_cgd.sh,v 1.4 2010/12/30 16:58:07 pooka Exp $
+# $NetBSD: t_cgd.sh,v 1.5 2011/01/03 09:37:42 pooka Exp $
#
# Copyright (c) 2010 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -25,6 +25,8 @@
# POSSIBILITY OF SUCH DAMAGE.
#
+rawpart=`sysctl -n kern.rawpartition | tr '01234' 'abcde'`
+rawcgd=/dev/rcgd0${rawpart}
cgdserver=\
"rump_server -lrumpvfs -lrumpkern_crypto -lrumpdev -lrumpdev_disk -lrumpdev_cgd"
@@ -45,10 +47,9 @@
export RUMP_SERVER=unix://csock
atf_check -s exit:0 sh -c "echo 12345 | \
rump.cgdconfig -p cgd0 /dev/dk ${d}/paramsfile"
- atf_check -s exit:0 -e ignore dd if=${d}/t_cgd rof=/dev/rcgd0d count=2
+ atf_check -s exit:0 -e ignore dd if=${d}/t_cgd rof=${rawcgd} count=2
atf_check -s exit:0 -e ignore dd if=${d}/t_cgd of=testfile count=2
- atf_check -s exit:0 -e ignore -o file:testfile \
- dd rif=/dev/rcgd0d count=2
+ atf_check -s exit:0 -e ignore -o file:testfile dd rif=${rawcgd} count=2
}
basic_cleanup()
@@ -75,7 +76,7 @@
export RUMP_SERVER=unix://csock
atf_check -s exit:0 sh -c "echo 12345 | \
rump.cgdconfig -p cgd0 /dev/dk ${d}/paramsfile"
- atf_check -s exit:0 -e ignore dd if=${d}/t_cgd rof=/dev/rcgd0d count=2
+ atf_check -s exit:0 -e ignore dd if=${d}/t_cgd rof=${rawcgd} count=2
# unconfig and reconfig cgd
atf_check -s exit:0 rump.cgdconfig -u cgd0
@@ -84,7 +85,7 @@
atf_check -s exit:0 -e ignore dd if=${d}/t_cgd of=testfile count=2
atf_check -s exit:0 -e ignore -o not-file:testfile \
- dd rif=/dev/rcgd0d count=2
+ dd rif=${rawcgd} count=2
}
wrongpass_cleanup()