Module Name:    src
Committed By:   pooka
Date:           Fri Feb  4 19:44:00 UTC 2011

Modified Files:
        src/tests/dev/cgd: t_cgd.sh
        src/tests/dev/md: t_md.sh
        src/tests/dev/raidframe: t_raid.sh
        src/tests/usr.bin/rump_server: t_disk.sh

Log Message:
convert tests from oldstyle dd rif/rof to newstyle dd | rump.dd


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/dev/cgd/t_cgd.sh
cvs rdiff -u -r1.5 -r1.6 src/tests/dev/md/t_md.sh
cvs rdiff -u -r1.5 -r1.6 src/tests/dev/raidframe/t_raid.sh
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/rump_server/t_disk.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.5 src/tests/dev/cgd/t_cgd.sh:1.6
--- src/tests/dev/cgd/t_cgd.sh:1.5	Mon Jan  3 09:37:42 2011
+++ src/tests/dev/cgd/t_cgd.sh	Fri Feb  4 19:44:00 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: t_cgd.sh,v 1.5 2011/01/03 09:37:42 pooka Exp $
+#	$NetBSD: t_cgd.sh,v 1.6 2011/02/04 19:44:00 pooka Exp $
 #
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -47,9 +47,11 @@
 	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=${rawcgd} count=2
+	atf_check -s exit:0 -e ignore sh -c \
+	    "dd if=${d}/t_cgd count=2 | rump.dd of=${rawcgd}"
 	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=${rawcgd} count=2
+	atf_check -s exit:0 -e ignore -o file:testfile \
+	    rump.dd if=${rawcgd} count=2
 }
 
 basic_cleanup()
@@ -76,7 +78,8 @@
 	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=${rawcgd} count=2
+	atf_check -s exit:0 -e ignore sh -c \
+	    "dd if=${d}/t_cgd | rump.dd of=${rawcgd} count=2"
 
 	# unconfig and reconfig cgd
 	atf_check -s exit:0 rump.cgdconfig -u cgd0
@@ -85,7 +88,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=${rawcgd} count=2
+	    rump.dd if=${rawcgd} count=2
 }
 
 wrongpass_cleanup()

Index: src/tests/dev/md/t_md.sh
diff -u src/tests/dev/md/t_md.sh:1.5 src/tests/dev/md/t_md.sh:1.6
--- src/tests/dev/md/t_md.sh:1.5	Mon Jan  3 09:39:46 2011
+++ src/tests/dev/md/t_md.sh	Fri Feb  4 19:44:00 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: t_md.sh,v 1.5 2011/01/03 09:39:46 pooka Exp $
+#	$NetBSD: t_md.sh,v 1.6 2011/02/04 19:44:00 pooka Exp $
 #
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -45,8 +45,10 @@
 	atf_check -s exit:0 $(atf_get_srcdir)/h_mdserv ${rawmd}
 
 	export RUMP_SERVER=unix://commsock
-	atf_check -s exit:0 -e ignore dd if=/bin/ls rof=${rawmd} seek=100 count=10
-	atf_check -s exit:0 -e ignore dd of=testfile rif=${rawmd} skip=100 count=10
+	atf_check -s exit:0 -e ignore sh -c \
+	    "dd if=/bin/ls count=10 | rump.dd of=${rawmd} seek=100"
+	atf_check -s exit:0 -e ignore sh -c \
+	    "rump.dd if=${rawmd} skip=100 count=10 | dd of=testfile"
 	atf_check -s exit:0 -e ignore -o file:testfile dd if=/bin/ls count=10
 }
 

Index: src/tests/dev/raidframe/t_raid.sh
diff -u src/tests/dev/raidframe/t_raid.sh:1.5 src/tests/dev/raidframe/t_raid.sh:1.6
--- src/tests/dev/raidframe/t_raid.sh:1.5	Thu Dec 30 16:58:07 2010
+++ src/tests/dev/raidframe/t_raid.sh	Fri Feb  4 19:44:00 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: t_raid.sh,v 1.5 2010/12/30 16:58:07 pooka Exp $
+#	$NetBSD: t_raid.sh,v 1.6 2011/02/04 19:44:00 pooka Exp $
 #
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -98,7 +98,8 @@
 	# put some data there
 	atf_check -s exit:0 -e ignore \
 	    dd if=$(atf_get_srcdir)/t_raid of=testfile count=4
-	atf_check -s exit:0 -e ignore dd if=testfile rof=${rawraid} conv=sync
+	atf_check -s exit:0 -e ignore sh -c \
+	    "dd if=testfile | rump.dd of=${rawraid} conv=sync"
 
 	# restart server with failed component
 	rump.halt
@@ -111,7 +112,8 @@
 	atf_check -s exit:0 rump.raidctl -c raid.conf raid0
 
 	# check if we we get what we wrote
-	atf_check -s exit:0 -o file:testfile -e ignore dd rif=${rawraid} count=4
+	atf_check -s exit:0 -o file:testfile -e ignore \
+	    rump.dd if=${rawraid} count=4
 }
 
 raid1_compfail_cleanup()
@@ -183,7 +185,8 @@
 	# put some data there
 	atf_check -s exit:0 -e ignore \
 	    dd if=$(atf_get_srcdir)/t_raid of=testfile count=4
-	atf_check -s exit:0 -e ignore dd if=testfile rof=${rawraid} conv=sync
+	atf_check -s exit:0 -e ignore sh -c \
+	    "dd if=testfile | rump.dd of=${rawraid} conv=sync"
 
 	# restart server with failed component
 	rump.halt
@@ -197,7 +200,8 @@
 	atf_check -s exit:0 rump.raidctl -c raid.conf raid0
 
 	# check if we we get what we wrote
-	atf_check -s exit:0 -o file:testfile -e ignore dd rif=${rawraid} count=4
+	atf_check -s exit:0 -o file:testfile -e ignore \
+	    rump.dd if=${rawraid} count=4
 }
 
 raid5_compfail_cleanup()

Index: src/tests/usr.bin/rump_server/t_disk.sh
diff -u src/tests/usr.bin/rump_server/t_disk.sh:1.1 src/tests/usr.bin/rump_server/t_disk.sh:1.2
--- src/tests/usr.bin/rump_server/t_disk.sh:1.1	Thu Feb  3 15:38:18 2011
+++ src/tests/usr.bin/rump_server/t_disk.sh	Fri Feb  4 19:44:00 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: t_disk.sh,v 1.1 2011/02/03 15:38:18 pooka Exp $
+#	$NetBSD: t_disk.sh,v 1.2 2011/02/04 19:44:00 pooka Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -76,7 +76,8 @@
 data()
 {
 	echo 'test string' | dd of=testfile ibs=512 count=1 conv=sync
-	atf_check -s exit:0 -e ignore dd if=testfile rof=/img bs=512 count=1
+	atf_check -s exit:0 -e ignore sh -c \
+	    "dd if=testfile | rump.dd of=/img bs=512 count=1"
 
 	# cheap fsync
 	atf_check -s exit:0 rump.halt

Reply via email to