Module Name: src Committed By: njoly Date: Sat Jul 28 16:08:40 UTC 2012
Modified Files: src/distrib/sets/lists/tests: mi src/etc/mtree: NetBSD.dist.tests src/tests/sbin: Makefile Added Files: src/tests/sbin/newfs_msdos: Makefile t_create.sh Log Message: Add testcase for PR/46743 To generate a diff of this commit: cvs rdiff -u -r1.480 -r1.481 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.79 -r1.80 src/etc/mtree/NetBSD.dist.tests cvs rdiff -u -r1.5 -r1.6 src/tests/sbin/Makefile cvs rdiff -u -r0 -r1.1 src/tests/sbin/newfs_msdos/Makefile \ src/tests/sbin/newfs_msdos/t_create.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.480 src/distrib/sets/lists/tests/mi:1.481 --- src/distrib/sets/lists/tests/mi:1.480 Mon Jul 23 04:21:39 2012 +++ src/distrib/sets/lists/tests/mi Sat Jul 28 16:08:39 2012 @@ -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 Index: src/etc/mtree/NetBSD.dist.tests diff -u src/etc/mtree/NetBSD.dist.tests:1.79 src/etc/mtree/NetBSD.dist.tests:1.80 --- src/etc/mtree/NetBSD.dist.tests:1.79 Sun Jul 22 21:04:44 2012 +++ src/etc/mtree/NetBSD.dist.tests Sat Jul 28 16:08:40 2012 @@ -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 Index: src/tests/sbin/Makefile diff -u src/tests/sbin/Makefile:1.5 src/tests/sbin/Makefile:1.6 --- src/tests/sbin/Makefile:1.5 Mon May 9 17:53:54 2011 +++ src/tests/sbin/Makefile Sat Jul 28 16:08:40 2012 @@ -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> Added files: Index: src/tests/sbin/newfs_msdos/Makefile diff -u /dev/null src/tests/sbin/newfs_msdos/Makefile:1.1 --- /dev/null Sat Jul 28 16:08:40 2012 +++ src/tests/sbin/newfs_msdos/Makefile Sat Jul 28 16:08:40 2012 @@ -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> Index: src/tests/sbin/newfs_msdos/t_create.sh diff -u /dev/null src/tests/sbin/newfs_msdos/t_create.sh:1.1 --- /dev/null Sat Jul 28 16:08:40 2012 +++ src/tests/sbin/newfs_msdos/t_create.sh Sat Jul 28 16:08:40 2012 @@ -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 +}