Module Name:    src
Committed By:   pooka
Date:           Mon Dec  6 16:43:26 UTC 2010

Modified Files:
        src/tests/util: t_dd.sh

Log Message:
In the seek test also check that files end up with expected size.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/util/t_dd.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/util/t_dd.sh
diff -u src/tests/util/t_dd.sh:1.3 src/tests/util/t_dd.sh:1.4
--- src/tests/util/t_dd.sh:1.3	Mon Dec  6 15:54:00 2010
+++ src/tests/util/t_dd.sh	Mon Dec  6 16:43:26 2010
@@ -1,4 +1,4 @@
-# $NetBSD: t_dd.sh,v 1.3 2010/12/06 15:54:00 pooka Exp $
+# $NetBSD: t_dd.sh,v 1.4 2010/12/06 16:43:26 pooka Exp $
 #
 # Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -111,11 +111,15 @@
 	atf_check -s exit:0 -e ignore \
 	    dd if=/dev/zero of=testfile seek=1 bs=8k count=1
 	atf_check -s exit:0 -e ignore -o match:'^TEST1234$' dd if=testfile
+	eval $(stat -s testfile)
+	atf_check_equal $st_size $((2*8192))
 
-	echo TEST1234 > tf2
+	echo -n TEST1234 > tf2
 	atf_check -s exit:0 -e ignore -x \
 	    'dd bs=4 if=/dev/zero count=1 | tr \\0 \\n | dd of=tf2 bs=4 seek=1'
 	atf_check -s exit:0 -e ignore -o match:'^TEST$' dd if=tf2
+	eval $(stat -s tf2)
+	atf_check_equal $st_size 8
 }
 
 atf_init_test_cases()

Reply via email to