2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
7 * A full copy of the text of the CDDL should have accompanied this
8 * source. A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
13 * Copyright 2016 Joyent, Inc.
17 * Register functions with quick_exit() and verify that we honor the expected
18 * function call value. We facilitate this by having a global integer and
19 * modifying it to various values in subsequent functions. If we're not called
20 * in reverse order, we should spot the differences.
24 #include <sys/debug.h>
26 static int qeo_val
= 5;
31 VERIFY3S(qeo_val
, ==, 5);
38 VERIFY3S(qeo_val
, ==, 4);
45 VERIFY3S(qeo_val
, ==, 3);
52 VERIFY3S(qeo_val
, ==, 2);
59 VERIFY3S(qeo_val
, ==, 1);
66 VERIFY3S(qeo_val
, ==, 0);
72 VERIFY0(at_quick_exit(qeo_zero
));
73 VERIFY0(at_quick_exit(qeo_first
));
74 VERIFY0(at_quick_exit(qeo_second
));
75 VERIFY0(at_quick_exit(qeo_third
));
76 VERIFY0(at_quick_exit(qeo_fourth
));
77 VERIFY0(at_quick_exit(qeo_fifth
));