1*543143cfSjruoho# $NetBSD: t_nonexistent.sh,v 1.4 2012/03/18 09:46:50 jruoho Exp $ 2b76e0d98Sjruoho# 3b76e0d98Sjruoho# Copyright (c) 2011 The NetBSD Foundation, Inc. 4b76e0d98Sjruoho# All rights reserved. 5b76e0d98Sjruoho# 6b76e0d98Sjruoho# This code is derived from software contributed to The NetBSD Foundation 7b76e0d98Sjruoho# by Jukka Ruohonen. 8b76e0d98Sjruoho# 9b76e0d98Sjruoho# Redistribution and use in source and binary forms, with or without 10b76e0d98Sjruoho# modification, are permitted provided that the following conditions 11b76e0d98Sjruoho# are met: 12b76e0d98Sjruoho# 1. Redistributions of source code must retain the above copyright 13b76e0d98Sjruoho# notice, this list of conditions and the following disclaimer. 14b76e0d98Sjruoho# 2. Redistributions in binary form must reproduce the above copyright 15b76e0d98Sjruoho# notice, this list of conditions and the following disclaimer in the 16b76e0d98Sjruoho# documentation and/or other materials provided with the distribution. 17b76e0d98Sjruoho# 18b76e0d98Sjruoho# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19b76e0d98Sjruoho# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20b76e0d98Sjruoho# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21b76e0d98Sjruoho# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22b76e0d98Sjruoho# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23b76e0d98Sjruoho# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24b76e0d98Sjruoho# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25b76e0d98Sjruoho# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26b76e0d98Sjruoho# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27b76e0d98Sjruoho# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28b76e0d98Sjruoho# POSSIBILITY OF SUCH DAMAGE. 29b76e0d98Sjruoho# 30b76e0d98Sjruoho 31b76e0d98Sjruohoatf_test_case nonexistent 32b76e0d98Sjruohononexistent_head() { 33*543143cfSjruoho atf_set "descr" "Check ifconfig(8) with " \ 34*543143cfSjruoho "a nonexistent interface (PR bin/43141)" 35b76e0d98Sjruoho} 36b76e0d98Sjruoho 37b76e0d98Sjruohononexistent_body() { 38b76e0d98Sjruoho 39d2d68b21Sjruoho atf_check -s not-exit:0 -e ignore \ 40d2d68b21Sjruoho ifconfig nonexistent0 1.2.3.4/24 41b76e0d98Sjruoho} 42b76e0d98Sjruoho 43b76e0d98Sjruohoatf_init_test_cases() { 44b76e0d98Sjruoho atf_add_test_case nonexistent 45b76e0d98Sjruoho} 46