xref: /netbsd-src/tests/sbin/route/t_missing.sh (revision a43eb6ed049cf4aaead8400b6c843bb45ea33c6f)
1*a43eb6edSjruoho# $NetBSD: t_missing.sh,v 1.3 2012/03/17 08:34:55 jruoho Exp $
2765b090aSjruoho#
3765b090aSjruoho# Copyright (c) 2011 The NetBSD Foundation, Inc.
4765b090aSjruoho# All rights reserved.
5765b090aSjruoho#
6765b090aSjruoho# This code is derived from software contributed to The NetBSD Foundation
7765b090aSjruoho# by Jukka Ruohonen.
8765b090aSjruoho#
9765b090aSjruoho# Redistribution and use in source and binary forms, with or without
10765b090aSjruoho# modification, are permitted provided that the following conditions
11765b090aSjruoho# are met:
12765b090aSjruoho# 1. Redistributions of source code must retain the above copyright
13765b090aSjruoho#    notice, this list of conditions and the following disclaimer.
14765b090aSjruoho# 2. Redistributions in binary form must reproduce the above copyright
15765b090aSjruoho#    notice, this list of conditions and the following disclaimer in the
16765b090aSjruoho#    documentation and/or other materials provided with the distribution.
17765b090aSjruoho#
18765b090aSjruoho# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19765b090aSjruoho# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20765b090aSjruoho# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21765b090aSjruoho# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22765b090aSjruoho# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23765b090aSjruoho# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24765b090aSjruoho# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25765b090aSjruoho# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26765b090aSjruoho# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27765b090aSjruoho# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28765b090aSjruoho# POSSIBILITY OF SUCH DAMAGE.
29765b090aSjruoho#
30765b090aSjruoho
31765b090aSjruohoatf_test_case missing
32765b090aSjruohomissing_head() {
33*a43eb6edSjruoho	atf_set "descr" "Check route(8) with a missing argument (PR bin/42179)"
34765b090aSjruoho}
35765b090aSjruoho
36765b090aSjruohomissing_body() {
37765b090aSjruoho
38765b090aSjruoho	atf_check -s exit:1 \
39765b090aSjruoho	-e not-inline:"route: writing to routing socket: Invalid argument\n" \
40765b090aSjruoho	route -n get
41765b090aSjruoho}
42765b090aSjruoho
43765b090aSjruohoatf_init_test_cases() {
44765b090aSjruoho	atf_add_test_case missing
45765b090aSjruoho}
46