Module Name:    src
Committed By:   jmmv
Date:           Sat May 14 17:42:29 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/lib/librumphijack: t_tcpip.sh
        src/tests/net/route: t_change.sh
        src/tests/usr.bin/rump_server: t_disk.sh
        src/tests/util/grep: t_grep.sh

Log Message:
Instead of doing 'atf_check ... sh -c foo', just do 'atf_check ... -x foo'.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/dev/cgd/t_cgd.sh
cvs rdiff -u -r1.6 -r1.7 src/tests/dev/md/t_md.sh
cvs rdiff -u -r1.7 -r1.8 src/tests/dev/raidframe/t_raid.sh
cvs rdiff -u -r1.10 -r1.11 src/tests/lib/librumphijack/t_tcpip.sh
cvs rdiff -u -r1.2 -r1.3 src/tests/net/route/t_change.sh
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/rump_server/t_disk.sh
cvs rdiff -u -r1.4 -r1.5 src/tests/util/grep/t_grep.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.8 src/tests/dev/cgd/t_cgd.sh:1.9
--- src/tests/dev/cgd/t_cgd.sh:1.8	Tue Mar 22 16:16:30 2011
+++ src/tests/dev/cgd/t_cgd.sh	Sat May 14 17:42:28 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: t_cgd.sh,v 1.8 2011/03/22 16:16:30 jmmv Exp $
+#	$NetBSD: t_cgd.sh,v 1.9 2011/05/14 17:42:28 jmmv Exp $
 #
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -45,9 +45,9 @@
 	    ${cgdserver} -d key=/dev/dk,hostpath=dk.img,size=1m unix://csock
 
 	export RUMP_SERVER=unix://csock
-	atf_check -s exit:0 sh -c "echo 12345 | \
+	atf_check -s exit:0 -x "echo 12345 | \
 	    rump.cgdconfig -p cgd0 /dev/dk ${d}/paramsfile"
-	atf_check -s exit:0 -e ignore sh -c \
+	atf_check -s exit:0 -e ignore -x \
 	    "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 \
@@ -76,14 +76,14 @@
 	    ${cgdserver} -d key=/dev/dk,hostpath=dk.img,size=1m unix://csock
 
 	export RUMP_SERVER=unix://csock
-	atf_check -s exit:0 sh -c "echo 12345 | \
+	atf_check -s exit:0 -x "echo 12345 | \
 	    rump.cgdconfig -p cgd0 /dev/dk ${d}/paramsfile"
-	atf_check -s exit:0 -e ignore sh -c \
+	atf_check -s exit:0 -e ignore -x \
 	    "dd if=${d}/t_cgd | rump.dd of=${rawcgd} count=2"
 
 	# unconfig and reconfig cgd
 	atf_check -s exit:0 rump.cgdconfig -u cgd0
-	atf_check -s exit:0 sh -c "echo 54321 | \
+	atf_check -s exit:0 -x "echo 54321 | \
 	    rump.cgdconfig -p cgd0 /dev/dk ${d}/paramsfile"
 
 	atf_check -s exit:0 -e ignore dd if=${d}/t_cgd of=testfile count=2
@@ -112,11 +112,11 @@
 	    ${cgdserver} -d key=/dev/dk,hostpath=dk.img,size=1m unix://csock
 
 	export RUMP_SERVER=unix://csock
-	atf_check -s exit:0 sh -c "echo 12345 | \
+	atf_check -s exit:0 -x "echo 12345 | \
 	    rump.cgdconfig -p cgd0 /dev/dk ${d}/paramsfile"
 
 	atf_expect_fail "PR kern/44515"
-	atf_check -s exit:0 -e ignore sh -c \
+	atf_check -s exit:0 -e ignore -x \
 	    "echo die hard | rump.dd of=${rawcgd} bs=123 conv=sync"
 }
 

Index: src/tests/dev/md/t_md.sh
diff -u src/tests/dev/md/t_md.sh:1.6 src/tests/dev/md/t_md.sh:1.7
--- src/tests/dev/md/t_md.sh:1.6	Fri Feb  4 19:44:00 2011
+++ src/tests/dev/md/t_md.sh	Sat May 14 17:42:28 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: t_md.sh,v 1.6 2011/02/04 19:44:00 pooka Exp $
+#	$NetBSD: t_md.sh,v 1.7 2011/05/14 17:42:28 jmmv Exp $
 #
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -45,9 +45,9 @@
 	atf_check -s exit:0 $(atf_get_srcdir)/h_mdserv ${rawmd}
 
 	export RUMP_SERVER=unix://commsock
-	atf_check -s exit:0 -e ignore sh -c \
+	atf_check -s exit:0 -e ignore -x \
 	    "dd if=/bin/ls count=10 | rump.dd of=${rawmd} seek=100"
-	atf_check -s exit:0 -e ignore sh -c \
+	atf_check -s exit:0 -e ignore -x \
 	    "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.7 src/tests/dev/raidframe/t_raid.sh:1.8
--- src/tests/dev/raidframe/t_raid.sh:1.7	Tue Mar  1 22:52:54 2011
+++ src/tests/dev/raidframe/t_raid.sh	Sat May 14 17:42:28 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: t_raid.sh,v 1.7 2011/03/01 22:52:54 riz Exp $
+#	$NetBSD: t_raid.sh,v 1.8 2011/05/14 17:42:28 jmmv Exp $
 #
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -96,7 +96,7 @@
 	# 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 sh -c \
+	atf_check -s exit:0 -e ignore -x \
 	    "dd if=testfile | rump.dd of=${rawraid} conv=sync"
 
 	# restart server with failed component
@@ -183,7 +183,7 @@
 	# 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 sh -c \
+	atf_check -s exit:0 -e ignore -x \
 	    "dd if=testfile | rump.dd of=${rawraid} conv=sync"
 
 	# restart server with failed component

Index: src/tests/lib/librumphijack/t_tcpip.sh
diff -u src/tests/lib/librumphijack/t_tcpip.sh:1.10 src/tests/lib/librumphijack/t_tcpip.sh:1.11
--- src/tests/lib/librumphijack/t_tcpip.sh:1.10	Tue Mar 29 16:03:32 2011
+++ src/tests/lib/librumphijack/t_tcpip.sh	Sat May 14 17:42:28 2011
@@ -1,4 +1,4 @@
-#       $NetBSD: t_tcpip.sh,v 1.10 2011/03/29 16:03:32 jmmv Exp $
+#       $NetBSD: t_tcpip.sh,v 1.11 2011/05/14 17:42:28 jmmv Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -173,12 +173,12 @@
 	atf_check -s exit:0 mkdir /rump/etc
 	atf_check -s exit:0 mkdir /rump/export
 
-	atf_check -s exit:0 sh -c	\
+	atf_check -s exit:0 -x \
 	    'echo "/export -noresvport -noresvmnt 10.1.1.100" | \
 		dd of=/rump/etc/exports 2> /dev/null'
 
 	atf_check -s exit:0 -e ignore mount_ffs /dk /rump/export
-	atf_check -s exit:0 sh -c "echo ${magicstr} > /rump/export/im_alive"
+	atf_check -s exit:0 -x "echo ${magicstr} > /rump/export/im_alive"
 
 	# start rpcbind.  we want /var/run/rpcbind.sock
 	export RUMPHIJACK='blanket=/var/run,socket=all' 

Index: src/tests/net/route/t_change.sh
diff -u src/tests/net/route/t_change.sh:1.2 src/tests/net/route/t_change.sh:1.3
--- src/tests/net/route/t_change.sh:1.2	Thu Feb 10 07:47:50 2011
+++ src/tests/net/route/t_change.sh	Sat May 14 17:42:28 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: t_change.sh,v 1.2 2011/02/10 07:47:50 kefren Exp $
+#	$NetBSD: t_change.sh,v 1.3 2011/05/14 17:42:28 jmmv Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -43,12 +43,12 @@
 
 	atf_check -s exit:0 -o ignore \
 	    rump.route add 207.46.197.32 127.0.0.1 -reject
-	atf_check -s exit:0 -o match:UGHR sh -c \
+	atf_check -s exit:0 -o match:UGHR -x \
 	    "rump.route -n show -inet | grep ^207.46"
 	atf_check -s exit:0 -o ignore \
 	    rump.route change 207.46.197.32 127.0.0.1 -blackhole
-	atf_check -s exit:0 -o match:' UGHBS ' -e ignore \
-	    sh -c "rump.netstat -rn -f inet | grep ^207.46| grep ^207.46"
+	atf_check -s exit:0 -o match:' UGHBS ' -e ignore -x \
+	    "rump.netstat -rn -f inet | grep ^207.46| grep ^207.46"
 }
 
 reject2blackhole_cleanup()

Index: src/tests/usr.bin/rump_server/t_disk.sh
diff -u src/tests/usr.bin/rump_server/t_disk.sh:1.3 src/tests/usr.bin/rump_server/t_disk.sh:1.4
--- src/tests/usr.bin/rump_server/t_disk.sh:1.3	Thu Feb 17 16:08:48 2011
+++ src/tests/usr.bin/rump_server/t_disk.sh	Sat May 14 17:42:28 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: t_disk.sh,v 1.3 2011/02/17 16:08:48 pooka Exp $
+#	$NetBSD: t_disk.sh,v 1.4 2011/05/14 17:42:28 jmmv Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -76,7 +76,7 @@
 data()
 {
 	echo 'test string' | dd of=testfile ibs=512 count=1 conv=sync
-	atf_check -s exit:0 -e ignore sh -c \
+	atf_check -s exit:0 -e ignore -x \
 	    "dd if=testfile | rump.dd of=/img bs=512 count=1"
 
 	# cheap fsync

Index: src/tests/util/grep/t_grep.sh
diff -u src/tests/util/grep/t_grep.sh:1.4 src/tests/util/grep/t_grep.sh:1.5
--- src/tests/util/grep/t_grep.sh:1.4	Sun Nov  7 17:51:23 2010
+++ src/tests/util/grep/t_grep.sh	Sat May 14 17:42:29 2011
@@ -1,4 +1,4 @@
-# $NetBSD: t_grep.sh,v 1.4 2010/11/07 17:51:23 jmmv Exp $
+# $NetBSD: t_grep.sh,v 1.5 2011/05/14 17:42:29 jmmv Exp $
 #
 # Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -32,8 +32,8 @@
 }
 basic_body()
 { 
-	atf_check -o file:"$(atf_get_srcdir)/d_basic.out" \
-	    sh -c 'jot 10000 | grep 123'
+	atf_check -o file:"$(atf_get_srcdir)/d_basic.out" -x \
+	    'jot 10000 | grep 123'
 }
 
 atf_test_case binary
@@ -166,8 +166,8 @@
 }
 file_exp_body()
 {
-	atf_check -o file:"$(atf_get_srcdir)/d_file_exp.out" \
-	    sh -c 'jot 21 -1 1.00 | grep -f '"$(atf_get_srcdir)"'/d_file_exp.in'
+	atf_check -o file:"$(atf_get_srcdir)/d_file_exp.out" -x \
+	    'jot 21 -1 1.00 | grep -f '"$(atf_get_srcdir)"'/d_file_exp.in'
 }
 
 atf_test_case egrep

Reply via email to