Add testcase for PR/46743

This commit is contained in:
njoly 2012-07-28 16:08:39 +00:00
parent 8f23e66316
commit 734339d201
5 changed files with 60 additions and 4 deletions

View File

@ -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. # 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 tests-sbin-tests
./usr/tests/sbin/newfs/Atffile tests-sbin-tests atf ./usr/tests/sbin/newfs/Atffile tests-sbin-tests atf
./usr/tests/sbin/newfs/t_enable_quotas 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 tests-sbin-tests
./usr/tests/sbin/resize_ffs/Atffile tests-sbin-tests atf ./usr/tests/sbin/resize_ffs/Atffile tests-sbin-tests atf
./usr/tests/sbin/resize_ffs/t_grow tests-sbin-tests atf ./usr/tests/sbin/resize_ffs/t_grow tests-sbin-tests atf

View File

@ -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
./usr/libdata/debug/usr/tests/atf ./usr/libdata/debug/usr/tests/atf
@ -261,6 +261,7 @@
./usr/tests/sbin/fsck_ffs ./usr/tests/sbin/fsck_ffs
./usr/tests/sbin/ifconfig ./usr/tests/sbin/ifconfig
./usr/tests/sbin/newfs ./usr/tests/sbin/newfs
./usr/tests/sbin/newfs_msdos
./usr/tests/sbin/resize_ffs ./usr/tests/sbin/resize_ffs
./usr/tests/sbin/route ./usr/tests/sbin/route
./usr/tests/sbin/sysctl ./usr/tests/sbin/sysctl

View File

@ -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> .include <bsd.own.mk>
TESTSDIR= ${TESTSBASE}/sbin 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> .include <bsd.test.mk>

View File

@ -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>

View File

@ -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
}