Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/dev/cgd test case for PR kern/44515
details: https://anonhg.NetBSD.org/src/rev/6c7103496255
branches: trunk
changeset: 761669:6c7103496255
user: pooka <pooka%NetBSD.org@localhost>
date: Fri Feb 04 19:58:10 2011 +0000
description:
test case for PR kern/44515
diffstat:
tests/dev/cgd/t_cgd.sh | 31 ++++++++++++++++++++++++++++++-
1 files changed, 30 insertions(+), 1 deletions(-)
diffs (48 lines):
diff -r d9f3a5867d34 -r 6c7103496255 tests/dev/cgd/t_cgd.sh
--- a/tests/dev/cgd/t_cgd.sh Fri Feb 04 19:44:00 2011 +0000
+++ b/tests/dev/cgd/t_cgd.sh Fri Feb 04 19:58:10 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_cgd.sh,v 1.6 2011/02/04 19:44:00 pooka Exp $
+# $NetBSD: t_cgd.sh,v 1.7 2011/02/04 19:58:10 pooka Exp $
#
# Copyright (c) 2010 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -97,9 +97,38 @@
env RUMP_SERVER=unix://csock rump.halt
}
+
+atf_test_case non512 cleanup
+non512_head()
+{
+
+ atf_set "descr" "Write a non-512 block to a raw cgd device"
+}
+
+non512_body()
+{
+ d=$(atf_get_srcdir)
+ atf_check -s exit:0 \
+ ${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 | \
+ rump.cgdconfig -p cgd0 /dev/dk ${d}/paramsfile"
+
+ atf_expect_fail "PR kern/44515"
+ atf_check -s exit:0 -e ignore sh -c \
+ "echo die hard | rump.dd of=${rawcgd} bs=123 conv=sync"
+}
+
+non512_cleanup()
+{
+ env RUMP_SERVER=unix://csock rump.halt
+}
+
atf_init_test_cases()
{
atf_add_test_case basic
atf_add_test_case wrongpass
+ atf_add_test_case non512
}
Home |
Main Index |
Thread Index |
Old Index