summaryrefslogtreecommitdiff
path: root/tests/dev
diff options
context:
space:
mode:
authorpooka <pooka@NetBSD.org>2011-02-04 19:58:10 +0000
committerpooka <pooka@NetBSD.org>2011-02-04 19:58:10 +0000
commitf8dbd5dfe6fa0872b4a8121389c7a79bdbd56d06 (patch)
tree02b897d2f5c9472bf58ae981e89c3de466bd6b4b /tests/dev
parentdfc77447cd50f0d7c6cd4a8497ba74b8ff8418bd (diff)
test case for PR kern/44515
Diffstat (limited to 'tests/dev')
-rw-r--r--tests/dev/cgd/t_cgd.sh31
1 files changed, 30 insertions, 1 deletions
diff --git a/tests/dev/cgd/t_cgd.sh b/tests/dev/cgd/t_cgd.sh
index c7dd97b82fb..80f21478f28 100644
--- a/tests/dev/cgd/t_cgd.sh
+++ b/tests/dev/cgd/t_cgd.sh
@@ -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 @@ wrongpass_cleanup()
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
}