1 #! /usr/bin/ksh -p
2 #
3 # CDDL HEADER START
4 #
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
8 #
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
13 #
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 #
20 # CDDL HEADER END
21 #
22
23 #
24 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
25 # Use is subject to license terms.
26 #
27 # Copyright 2015 Nexenta Systems, Inc. All rights reserved.
28 #
29
30 # The main test case file to test iscsi authentication methods.
31 #
32 # This file contains the test startup functions and the invocable component list
33 # of all the test purposes that are to be executed.
34 #
35
36 #
37 # Set the tet global variables tet_startup and tet_cleanup to the
38 # startup and cleanup function names
39 #
40 tet_startup="startup"
41 tet_cleanup="cleanup"
42
43 #
44 # List of test purposes
45 #
46 iclist="ic1 ic2"
47 ic1="stmfOnlineTarget001"
48 ic2="stmfOnlineTarget002"
49
50
51 #
52 # Following functions invoke the binary test purpose
53 # and used by tet
54 #
55
56 function stmfOnlineTarget001 {
57 ./tp_online_target_001
58 if [ $? -ne 0 ]; then
59 cti_result FAIL
60 else
61 cti_result PASS
62 fi
63 }
64
65 function stmfOnlineTarget002 {
66 ./tp_online_target_002
67 if [ $? -ne 0 ]; then
68 cti_result FAIL
69 else
70 cti_result PASS
71 fi
72 }
73
74 #
75 # The startup function that will be called when this test case is
76 # invoked before any test purposes are executed.
77 #
78 function startup
79 {
80 #
81 # Call the _startup function to initialize the system and
82 # verify the system resources and setup the filesystems to be
83 # used by the tests.
84 #
85 cti_report "Starting up"
86 comstar_startup
87 }
88
89 #
90 # The cleanup function that will be called when this test case is
91 # invoked after all the test purposes are executed (or aborted).
92 #
93 function cleanup
94 {
95 #
96 # Call the _cleanup function to remove any filesystems that were
97 # in use and free any resource that might still be in use by the tests.
98 #
99 cti_report "Cleaning up after tests"
100 }
101
102 #
103 # Source in the common utilities and tools that are used by the test purposes
104 # and test case.
105 #
106 . ${CTI_SUITE}/lib/comstar_common
107
108 #
109 # Source in the cti and tet required utilities and tools.
110 #
111 . ${CTI_ROOT}/lib/ctiutils.ksh
112 . ${TET_ROOT}/lib/ksh/tcm.ksh