11.3Sriastrad# $NetBSD: t_io_assist.sh,v 1.3 2023/08/05 13:05:14 riastradh Exp $ 21.1Smaxv# 31.2Smaxv# Copyright (c) 2019-2020 Maxime Villard, m00nbsd.net 41.1Smaxv# All rights reserved. 51.1Smaxv# 61.2Smaxv# This code is part of the NVMM hypervisor. 71.2Smaxv# 81.1Smaxv# Redistribution and use in source and binary forms, with or without 91.1Smaxv# modification, are permitted provided that the following conditions 101.1Smaxv# are met: 111.1Smaxv# 1. Redistributions of source code must retain the above copyright 121.1Smaxv# notice, this list of conditions and the following disclaimer. 131.1Smaxv# 2. Redistributions in binary form must reproduce the above copyright 141.1Smaxv# notice, this list of conditions and the following disclaimer in the 151.1Smaxv# documentation and/or other materials provided with the distribution. 161.1Smaxv# 171.2Smaxv# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 181.2Smaxv# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 191.2Smaxv# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 201.2Smaxv# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 211.2Smaxv# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 221.2Smaxv# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 231.2Smaxv# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 241.2Smaxv# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 251.2Smaxv# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 261.2Smaxv# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 271.2Smaxv# SUCH DAMAGE. 281.1Smaxv# 291.1Smaxv 301.1Smaxvatf_test_case io_assist 311.1Smaxvio_assist_head() 321.1Smaxv{ 331.1Smaxv atf_set "descr" "Check the I/O Assist provided in libnvmm" 341.3Sriastrad atf_set "require.user" "root" 351.1Smaxv} 361.1Smaxv 371.1Smaxvio_assist_body() 381.1Smaxv{ 391.1Smaxv $(atf_get_srcdir)/h_io_assist 401.1Smaxv 411.1Smaxv exitcode=$? 421.1Smaxv 431.1Smaxv if [ $exitcode -eq 6 ] ; then 441.1Smaxv atf_skip "NVMM driver not loaded" 451.1Smaxv elif [ $exitcode -ne 0 ] ; then 461.1Smaxv atf_fail "I/O Assist failed with errno $exitcode" 471.1Smaxv fi 481.1Smaxv} 491.1Smaxv 501.1Smaxvatf_init_test_cases() 511.1Smaxv{ 521.1Smaxv atf_add_test_case io_assist 531.1Smaxv} 54