1*ce489a5eSPatrick Mooney#! /usr/bin/ksh 2*ce489a5eSPatrick Mooney# 3*ce489a5eSPatrick Mooney# 4*ce489a5eSPatrick Mooney# This file and its contents are supplied under the terms of the 5*ce489a5eSPatrick Mooney# Common Development and Distribution License ("CDDL"), version 1.0. 6*ce489a5eSPatrick Mooney# You may only use this file in accordance with the terms of version 7*ce489a5eSPatrick Mooney# 1.0 of the CDDL. 8*ce489a5eSPatrick Mooney# 9*ce489a5eSPatrick Mooney# A full copy of the text of the CDDL should have accompanied this 10*ce489a5eSPatrick Mooney# source. A copy of the CDDL is also available via the Internet at 11*ce489a5eSPatrick Mooney# http://www.illumos.org/license/CDDL. 12*ce489a5eSPatrick Mooney# 13*ce489a5eSPatrick Mooney 14*ce489a5eSPatrick Mooney# 15*ce489a5eSPatrick Mooney# Copyright 2024 Oxide Computer Company 16*ce489a5eSPatrick Mooney# 17*ce489a5eSPatrick Mooney 18*ce489a5eSPatrick MooneySTF_TOOLS="/opt/test-runner/stf" 19*ce489a5eSPatrick Mooney. ${STF_TOOLS}/contrib/include/logapi.shlib 20*ce489a5eSPatrick Mooney 21*ce489a5eSPatrick MooneyTEST_NIC="bhyvetest_viona0" 22*ce489a5eSPatrick Mooney 23*ce489a5eSPatrick Mooneyif dladm show-simnet ${TEST_NIC} > /dev/null 2>&1; then 24*ce489a5eSPatrick Mooney log_must dladm delete-simnet ${TEST_NIC} 25*ce489a5eSPatrick Mooney exit ${STF_PASS} 26*ce489a5eSPatrick Mooneyelse 27*ce489a5eSPatrick Mooney log_pass "simnet link ${TEST_NIC} already absent" 28*ce489a5eSPatrick Mooneyfi 29