3 # This file and its contents are supplied under the terms of the
4 # Common Development and Distribution License ("CDDL"), version 1.0.
5 # You may only use this file in accordance with the terms of version
8 # A full copy of the text of the CDDL should have accompanied this
9 # source. A copy of the CDDL is also available via the Internet at
10 # http://www.illumos.org/license/CDDL.
14 # Copyright 2016 Joyent, Inc.
18 # Test quick_exit(3C). We specifically test the following things:
19 # o That we get a requested exit status
20 # o That at_quick_exit() functions fire in a registered, reverse order.
22 # These are all done by helper programs
29 qe_status32
=$qe_root/quick_exit_status
.32
30 qe_status64
=$qe_root/quick_exit_status
.64
31 qe_order32
=$qe_root/quick_exit_order
.32
32 qe_order64
=$qe_root/quick_exit_order
.64
37 echo "Test Failed: $msg" >&2
45 if [[ $?
-ne $stat ]]; then
46 fatal
"Test failed: Expected $qestatus32 to exit $stat " \
51 if [[ $?
-ne $stat ]]; then
52 fatal
"Test failed: Expected $qestatus64 to exit $stat " \
59 $qe_order32 || fatal
"$qe_order32 returned $?"
60 $qe_order64 || fatal
"$qe_order32 returned $?"