t_vmstat.sh revision 1.1
11.1Sgson# $NetBSD: t_vmstat.sh,v 1.1 2014/01/07 16:47:13 gson Exp $
21.1Sgson#
31.1Sgson# Copyright (c) 2013 The NetBSD Foundation, Inc.
41.1Sgson# All rights reserved.
51.1Sgson#
61.1Sgson# Redistribution and use in source and binary forms, with or without
71.1Sgson# modification, are permitted provided that the following conditions
81.1Sgson# are met:
91.1Sgson# 1. Redistributions of source code must retain the above copyright
101.1Sgson#    notice, this list of conditions and the following disclaimer.
111.1Sgson# 2. Redistributions in binary form must reproduce the above copyright
121.1Sgson#    notice, this list of conditions and the following disclaimer in the
131.1Sgson#    documentation and/or other materials provided with the distribution.
141.1Sgson#
151.1Sgson# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
161.1Sgson# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
171.1Sgson# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
181.1Sgson# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
191.1Sgson# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
201.1Sgson# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
211.1Sgson# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
221.1Sgson# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
231.1Sgson# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
241.1Sgson# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
251.1Sgson# POSSIBILITY OF SUCH DAMAGE.
261.1Sgson#
271.1Sgson
281.1Sgsonatf_test_case default
291.1Sgsondefault_head() {
301.1Sgson	atf_set "descr" "Test that vmstat(1) returns success when run with no arguments"
311.1Sgson}
321.1Sgsondefault_body() {
331.1Sgson	atf_check -s exit:0 -o ignore -e empty vmstat
341.1Sgson}
351.1Sgson
361.1Sgsonatf_test_case opt_s
371.1Sgsonopt_s_head() {
381.1Sgson	atf_set "descr" "Test that vmstat(1) returns success when run with -s (PR 44518)"
391.1Sgson}
401.1Sgsonopt_s_body() {
411.1Sgson	atf_check -s exit:0 -o ignore -e empty vmstat -s
421.1Sgson}
431.1Sgson
441.1Sgsonatf_init_test_cases()
451.1Sgson{
461.1Sgson	atf_add_test_case default
471.1Sgson	atf_add_test_case opt_s
481.1Sgson}
49