1*1a2d662aSRobert Mustacchi#!/usr/bin/ksh 2*1a2d662aSRobert Mustacchi# 3*1a2d662aSRobert Mustacchi# 4*1a2d662aSRobert Mustacchi# This file and its contents are supplied under the terms of the 5*1a2d662aSRobert Mustacchi# Common Development and Distribution License ("CDDL"), version 1.0. 6*1a2d662aSRobert Mustacchi# You may only use this file in accordance with the terms of version 7*1a2d662aSRobert Mustacchi# 1.0 of the CDDL. 8*1a2d662aSRobert Mustacchi# 9*1a2d662aSRobert Mustacchi# A full copy of the text of the CDDL should have accompanied this 10*1a2d662aSRobert Mustacchi# source. A copy of the CDDL is also available via the Internet at 11*1a2d662aSRobert Mustacchi# http://www.illumos.org/license/CDDL. 12*1a2d662aSRobert Mustacchi# 13*1a2d662aSRobert Mustacchi 14*1a2d662aSRobert Mustacchi# 15*1a2d662aSRobert Mustacchi# Copyright 2024 Oxide Computer Company 16*1a2d662aSRobert Mustacchi# 17*1a2d662aSRobert Mustacchi 18*1a2d662aSRobert Mustacchi# 19*1a2d662aSRobert Mustacchi# This runs the specific tests around the pr_inject tests. 20*1a2d662aSRobert Mustacchi# 21*1a2d662aSRobert Mustacchi 22*1a2d662aSRobert Mustacchiunalias -a 23*1a2d662aSRobert Mustacchiset -o pipefail 24*1a2d662aSRobert Mustacchi 25*1a2d662aSRobert Mustacchipr_arg0=$(basename $0) 26*1a2d662aSRobert Mustacchipr_dir=$(dirname $0) 27*1a2d662aSRobert Mustacchipr_inj32="$pr_dir/pr_inject.32" 28*1a2d662aSRobert Mustacchipr_inj64="$pr_dir/pr_inject.64" 29*1a2d662aSRobert Mustacchipr_targ32="$pr_dir/pr_target.32" 30*1a2d662aSRobert Mustacchipr_targ64="$pr_dir/pr_target.64" 31*1a2d662aSRobert Mustacchipr_exit=0 32*1a2d662aSRobert Mustacchi 33*1a2d662aSRobert Mustacchiprintf "Running 32-bit controller against 32-bit target\n" 34*1a2d662aSRobert Mustacchiif ! $pr_inj32 $pr_targ32; then 35*1a2d662aSRobert Mustacchi pr_exit=1 36*1a2d662aSRobert Mustacchifi 37*1a2d662aSRobert Mustacchi 38*1a2d662aSRobert Mustacchiprintf "\nRunning 64-bit controller against 32-bit target\n" 39*1a2d662aSRobert Mustacchiif ! $pr_inj64 $pr_targ32; then 40*1a2d662aSRobert Mustacchi pr_exit=1 41*1a2d662aSRobert Mustacchifi 42*1a2d662aSRobert Mustacchi 43*1a2d662aSRobert Mustacchiprintf "\nRunning 64-bit controller against 64-bit target\n" 44*1a2d662aSRobert Mustacchiif ! $pr_inj64 $pr_targ64; then 45*1a2d662aSRobert Mustacchi pr_exit=1 46*1a2d662aSRobert Mustacchifi 47*1a2d662aSRobert Mustacchi 48*1a2d662aSRobert Mustacchi 49*1a2d662aSRobert Mustacchiif (( pr_exit == 0 )); then 50*1a2d662aSRobert Mustacchi printf "All variants passed successfully\n" 51*1a2d662aSRobert Mustacchifi 52*1a2d662aSRobert Mustacchi 53*1a2d662aSRobert Mustacchiexit $pr_exit 54