Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests convert tests from oldstyle dd rif/rof to newstyle dd ...



details:   https://anonhg.NetBSD.org/src/rev/d9f3a5867d34
branches:  trunk
changeset: 761668:d9f3a5867d34
user:      pooka <pooka%NetBSD.org@localhost>
date:      Fri Feb 04 19:44:00 2011 +0000

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

diffstat:

 tests/dev/cgd/t_cgd.sh              |  13 ++++++++-----
 tests/dev/md/t_md.sh                |   8 +++++---
 tests/dev/raidframe/t_raid.sh       |  14 +++++++++-----
 tests/usr.bin/rump_server/t_disk.sh |   5 +++--
 4 files changed, 25 insertions(+), 15 deletions(-)

diffs (132 lines):

diff -r 8661d3129042 -r d9f3a5867d34 tests/dev/cgd/t_cgd.sh
--- a/tests/dev/cgd/t_cgd.sh    Fri Feb 04 19:42:12 2011 +0000
+++ b/tests/dev/cgd/t_cgd.sh    Fri Feb 04 19:44:00 2011 +0000
@@ -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()
diff -r 8661d3129042 -r d9f3a5867d34 tests/dev/md/t_md.sh
--- a/tests/dev/md/t_md.sh      Fri Feb 04 19:42:12 2011 +0000
+++ b/tests/dev/md/t_md.sh      Fri Feb 04 19:44:00 2011 +0000
@@ -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
 }
 
diff -r 8661d3129042 -r d9f3a5867d34 tests/dev/raidframe/t_raid.sh
--- a/tests/dev/raidframe/t_raid.sh     Fri Feb 04 19:42:12 2011 +0000
+++ b/tests/dev/raidframe/t_raid.sh     Fri Feb 04 19:44:00 2011 +0000
@@ -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()
diff -r 8661d3129042 -r d9f3a5867d34 tests/usr.bin/rump_server/t_disk.sh
--- a/tests/usr.bin/rump_server/t_disk.sh       Fri Feb 04 19:42:12 2011 +0000
+++ b/tests/usr.bin/rump_server/t_disk.sh       Fri Feb 04 19:44:00 2011 +0000
@@ -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



Home | Main Index | Thread Index | Old Index