Source-Changes-HG archive

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

[src/trunk]: src/tests/util In the seek test also check that files end up wit...



details:   https://anonhg.NetBSD.org/src/rev/5ca539af39f6
branches:  trunk
changeset: 759352:5ca539af39f6
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Dec 06 16:43:26 2010 +0000

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

diffstat:

 tests/util/t_dd.sh |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 9891dbd45e8c -r 5ca539af39f6 tests/util/t_dd.sh
--- a/tests/util/t_dd.sh        Mon Dec 06 16:37:25 2010 +0000
+++ b/tests/util/t_dd.sh        Mon Dec 06 16:43:26 2010 +0000
@@ -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()



Home | Main Index | Thread Index | Old Index