Module Name:    src
Committed By:   pooka
Date:           Thu Feb 17 16:08:48 UTC 2011

Modified Files:
        src/tests/usr.bin/rump_server: t_disk.sh

Log Message:
Test the -d type parameter of rump_server(1).
XXX: these tests only work with a dynamic userland, dunno how to
specify a "skip" clause for that


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/rump_server/t_disk.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/usr.bin/rump_server/t_disk.sh
diff -u src/tests/usr.bin/rump_server/t_disk.sh:1.2 src/tests/usr.bin/rump_server/t_disk.sh:1.3
--- src/tests/usr.bin/rump_server/t_disk.sh:1.2	Fri Feb  4 19:44:00 2011
+++ src/tests/usr.bin/rump_server/t_disk.sh	Thu Feb 17 16:08:48 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: t_disk.sh,v 1.2 2011/02/04 19:44:00 pooka Exp $
+#	$NetBSD: t_disk.sh,v 1.3 2011/02/17 16:08:48 pooka Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -86,6 +86,34 @@
 	    dd if=the.img iseek=16k bs=1 count=512
 }
 
+test_case type_chr -d key=/img,hostpath=the.img,size=32k,type=chr
+type_chr()
+{
+	atf_check -s exit:0 -o inline:'Character Device\n' \
+	    env LD_PRELOAD=/usr/lib/librumphijack.so stat -f %HT /rump/img
+}
+
+test_case type_reg -d key=/img,hostpath=the.img,size=32k,type=reg
+type_reg()
+{
+	atf_check -s exit:0 -o inline:'Regular File\n' \
+	    env LD_PRELOAD=/usr/lib/librumphijack.so stat -f %HT /rump/img
+}
+
+test_case type_blk -d key=/img,hostpath=the.img,size=32k,type=blk
+type_blk()
+{
+	atf_check -s exit:0 -o inline:'Block Device\n' \
+	    env LD_PRELOAD=/usr/lib/librumphijack.so stat -f %HT /rump/img
+}
+
+test_case type_blk_default -d key=/img,hostpath=the.img,size=32k
+type_blk_default()
+{
+	atf_check -s exit:0 -o inline:'Block Device\n' \
+	    env LD_PRELOAD=/usr/lib/librumphijack.so stat -f %HT /rump/img
+}
+
 atf_init_test_cases()
 {
 
@@ -93,4 +121,8 @@
 	atf_add_test_case offset
 	atf_add_test_case notrunc
 	atf_add_test_case data
+	atf_add_test_case type_chr
+	atf_add_test_case type_reg
+	atf_add_test_case type_blk
+	atf_add_test_case type_blk_default
 }

Reply via email to