Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add testcase for PR/46743
details: https://anonhg.NetBSD.org/src/rev/c1776057ec96
branches: trunk
changeset: 780536:c1776057ec96
user: njoly <njoly%NetBSD.org@localhost>
date: Sat Jul 28 16:08:39 2012 +0000
description:
Add testcase for PR/46743
diffstat:
distrib/sets/lists/tests/mi | 5 +++-
etc/mtree/NetBSD.dist.tests | 3 +-
tests/sbin/Makefile | 4 +-
tests/sbin/newfs_msdos/Makefile | 9 +++++++
tests/sbin/newfs_msdos/t_create.sh | 43 ++++++++++++++++++++++++++++++++++++++
5 files changed, 60 insertions(+), 4 deletions(-)
diffs (112 lines):
diff -r afb2ea238655 -r c1776057ec96 distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi Sat Jul 28 15:12:42 2012 +0000
+++ b/distrib/sets/lists/tests/mi Sat Jul 28 16:08:39 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.480 2012/07/23 04:21:39 pgoyette Exp $
+# $NetBSD: mi,v 1.481 2012/07/28 16:08:39 njoly Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -2896,6 +2896,9 @@
./usr/tests/sbin/newfs tests-sbin-tests
./usr/tests/sbin/newfs/Atffile tests-sbin-tests atf
./usr/tests/sbin/newfs/t_enable_quotas tests-sbin-tests atf
+./usr/tests/sbin/newfs_msdos tests-sbin-tests
+./usr/tests/sbin/newfs_msdos/Atffile tests-sbin-tests atf
+./usr/tests/sbin/newfs_msdos/t_create tests-sbin-tests atf
./usr/tests/sbin/resize_ffs tests-sbin-tests
./usr/tests/sbin/resize_ffs/Atffile tests-sbin-tests atf
./usr/tests/sbin/resize_ffs/t_grow tests-sbin-tests atf
diff -r afb2ea238655 -r c1776057ec96 etc/mtree/NetBSD.dist.tests
--- a/etc/mtree/NetBSD.dist.tests Sat Jul 28 15:12:42 2012 +0000
+++ b/etc/mtree/NetBSD.dist.tests Sat Jul 28 16:08:39 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: NetBSD.dist.tests,v 1.79 2012/07/22 21:04:44 joerg Exp $
+# $NetBSD: NetBSD.dist.tests,v 1.80 2012/07/28 16:08:40 njoly Exp $
./usr/libdata/debug/usr/tests
./usr/libdata/debug/usr/tests/atf
@@ -261,6 +261,7 @@
./usr/tests/sbin/fsck_ffs
./usr/tests/sbin/ifconfig
./usr/tests/sbin/newfs
+./usr/tests/sbin/newfs_msdos
./usr/tests/sbin/resize_ffs
./usr/tests/sbin/route
./usr/tests/sbin/sysctl
diff -r afb2ea238655 -r c1776057ec96 tests/sbin/Makefile
--- a/tests/sbin/Makefile Sat Jul 28 15:12:42 2012 +0000
+++ b/tests/sbin/Makefile Sat Jul 28 16:08:39 2012 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.5 2011/05/09 17:53:54 jruoho Exp $
+# $NetBSD: Makefile,v 1.6 2012/07/28 16:08:40 njoly Exp $
#
.include <bsd.own.mk>
TESTSDIR= ${TESTSBASE}/sbin
-TESTS_SUBDIRS+= fsck_ffs ifconfig newfs resize_ffs route sysctl
+TESTS_SUBDIRS+= fsck_ffs ifconfig newfs newfs_msdos resize_ffs route sysctl
.include <bsd.test.mk>
diff -r afb2ea238655 -r c1776057ec96 tests/sbin/newfs_msdos/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/sbin/newfs_msdos/Makefile Sat Jul 28 16:08:39 2012 +0000
@@ -0,0 +1,9 @@
+# $NetBSD: Makefile,v 1.1 2012/07/28 16:08:40 njoly Exp $
+
+.include <bsd.own.mk>
+
+TESTSDIR= ${TESTSBASE}/sbin/newfs_msdos
+
+TESTS_SH= t_create
+
+.include <bsd.test.mk>
diff -r afb2ea238655 -r c1776057ec96 tests/sbin/newfs_msdos/t_create.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/sbin/newfs_msdos/t_create.sh Sat Jul 28 16:08:39 2012 +0000
@@ -0,0 +1,43 @@
+# $NetBSD: t_create.sh,v 1.1 2012/07/28 16:08:40 njoly Exp $
+#
+# Copyright (c) 2012 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+atf_test_case validfat32
+validfat32_head() {
+ atf_set "descr" "Verifies that fat32 created filesystems are valid"
+}
+validfat32_body() {
+
+ atf_check -s eq:0 -o ignore -e ignore newfs_msdos -C 5m -F 32 msdos.img
+ atf_expect_fail "PR bin/46743"
+ atf_check -s eq:0 -o not-match:FIXED -e empty fsck_msdos -p msdos.img
+ atf_expect_pass
+}
+
+
+atf_init_test_cases() {
+ atf_add_test_case validfat32
+}
Home |
Main Index |
Thread Index |
Old Index