1#! /bin/ksh -p 2# SPDX-License-Identifier: CDDL-1.0 3# 4# CDDL HEADER START 5# 6# The contents of this file are subject to the terms of the 7# Common Development and Distribution License (the "License"). 8# You may not use this file except in compliance with the License. 9# 10# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 11# or https://opensource.org/licenses/CDDL-1.0. 12# See the License for the specific language governing permissions 13# and limitations under the License. 14# 15# When distributing Covered Code, include this CDDL HEADER in each 16# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 17# If applicable, add the following below this CDDL HEADER, with the 18# fields enclosed by brackets "[]" replaced with your own identifying 19# information: Portions Copyright [yyyy] [name of copyright owner] 20# 21# CDDL HEADER END 22# 23 24# 25# Copyright (c) 2015 by Lawrence Livermore National Security, LLC. 26# All rights reserved. 27# 28 29. $STF_SUITE/include/libtest.shlib 30 31is_freebsd && ! python3 -c 'import sysctl' 2>/dev/null && log_unsupported "python3 sysctl module missing" 32 33log_assert "arc_summary generates output and doesn't return an error code" 34 35# Without this, the below checks aren't going to work the way we hope... 36set -o pipefail 37 38for arg in "" "-a" "-d" "-p 1" "-g" "-s arc" "-r"; do 39 log_must eval "arc_summary $arg > /dev/null" 40done 41 42log_must eval "arc_summary | head > /dev/null" 43log_must eval "arc_summary | head -1 > /dev/null" 44 45log_pass "arc_summary generates output and doesn't return an error code" 46