Source-Changes-HG archive

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

[src/trunk]: src/tests/usr.bin/rump_server Test the -d type parameter of rump...



details:   https://anonhg.NetBSD.org/src/rev/2f5f41ad4122
branches:  trunk
changeset: 762207:2f5f41ad4122
user:      pooka <pooka%NetBSD.org@localhost>
date:      Thu Feb 17 16:08:48 2011 +0000

description:
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

diffstat:

 tests/usr.bin/rump_server/t_disk.sh |  34 +++++++++++++++++++++++++++++++++-
 1 files changed, 33 insertions(+), 1 deletions(-)

diffs (53 lines):

diff -r 0ba0ce5c27a7 -r 2f5f41ad4122 tests/usr.bin/rump_server/t_disk.sh
--- a/tests/usr.bin/rump_server/t_disk.sh       Thu Feb 17 16:03:05 2011 +0000
+++ b/tests/usr.bin/rump_server/t_disk.sh       Thu Feb 17 16:08:48 2011 +0000
@@ -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
 }



Home | Main Index | Thread Index | Old Index