xref: /illumos-gate/usr/src/test/libproc-tests/tests/agent/agent_destroy.ksh (revision f618476ce4f1b39cd7619a6e742f87a06a54fbfc)
1*f618476cSAndy Fiddaman#!/usr/bin/ksh
2*f618476cSAndy Fiddaman#
3*f618476cSAndy Fiddaman#
4*f618476cSAndy Fiddaman# This file and its contents are supplied under the terms of the
5*f618476cSAndy Fiddaman# Common Development and Distribution License ("CDDL"), version 1.0.
6*f618476cSAndy Fiddaman# You may only use this file in accordance with the terms of version
7*f618476cSAndy Fiddaman# 1.0 of the CDDL.
8*f618476cSAndy Fiddaman#
9*f618476cSAndy Fiddaman# A full copy of the text of the CDDL should have accompanied this
10*f618476cSAndy Fiddaman# source.  A copy of the CDDL is also available via the Internet at
11*f618476cSAndy Fiddaman# http://www.illumos.org/license/CDDL.
12*f618476cSAndy Fiddaman#
13*f618476cSAndy Fiddaman
14*f618476cSAndy Fiddaman#
15*f618476cSAndy Fiddaman# Copyright 2026 Oxide Computer Company
16*f618476cSAndy Fiddaman#
17*f618476cSAndy Fiddaman
18*f618476cSAndy Fiddaman#
19*f618476cSAndy Fiddaman# This runs the agent_destroy tests against targets of each data model.
20*f618476cSAndy Fiddaman#
21*f618476cSAndy Fiddaman
22*f618476cSAndy Fiddamanunalias -a
23*f618476cSAndy Fiddamanset -o pipefail
24*f618476cSAndy Fiddaman
25*f618476cSAndy Fiddamanat_arg0=$(basename $0)
26*f618476cSAndy Fiddamanat_dir=$(dirname $0)
27*f618476cSAndy Fiddamanat_prog32="$at_dir/agent_destroy.32"
28*f618476cSAndy Fiddamanat_prog64="$at_dir/agent_destroy.64"
29*f618476cSAndy Fiddamanat_targ32="$at_dir/agent_target.32"
30*f618476cSAndy Fiddamanat_targ64="$at_dir/agent_target.64"
31*f618476cSAndy Fiddamanat_exit=0
32*f618476cSAndy Fiddaman
33*f618476cSAndy Fiddamanprintf "Running 32-bit controller against 32-bit target\n"
34*f618476cSAndy Fiddamanif ! $at_prog32 $at_targ32; then
35*f618476cSAndy Fiddaman	at_exit=1
36*f618476cSAndy Fiddamanfi
37*f618476cSAndy Fiddaman
38*f618476cSAndy Fiddamanprintf "\nRunning 64-bit controller against 32-bit target\n"
39*f618476cSAndy Fiddamanif ! $at_prog64 $at_targ32; then
40*f618476cSAndy Fiddaman	at_exit=1
41*f618476cSAndy Fiddamanfi
42*f618476cSAndy Fiddaman
43*f618476cSAndy Fiddamanprintf "\nRunning 64-bit controller against 64-bit target\n"
44*f618476cSAndy Fiddamanif ! $at_prog64 $at_targ64; then
45*f618476cSAndy Fiddaman	at_exit=1
46*f618476cSAndy Fiddamanfi
47*f618476cSAndy Fiddaman
48*f618476cSAndy Fiddamanif (( at_exit == 0 )); then
49*f618476cSAndy Fiddaman	printf "All variants passed successfully\n"
50*f618476cSAndy Fiddamanfi
51*f618476cSAndy Fiddaman
52*f618476cSAndy Fiddamanexit $at_exit
53