Lines Matching +full:1 +full:- +full:port

1 # SPDX-License-Identifier: BSD-2-Clause
9 # 1. Redistributions of source code must retain the above copyright
37 # The PGTAG can be any 16-bit number. The only constraint is that each
49 driver=$1
51 if [ -e port-create.txt ]; then
54 PORTNUM=`awk '/port:/ {print $2}' port-create.txt`
55 ctladm port -r -d $driver -p $PORTNUM
58 TARGET=`awk '/target:/ {print $2}' port-create.txt`
59 ctladm port -r -d $driver -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target=$TARGET
68 atf_set "descr" "ctladm can create a new ioctl port"
76 atf_check -o save:port-create.txt ctladm port -c -d "ioctl"
77 atf_check egrep -q "Port created successfully" port-create.txt
78 atf_check egrep -q "frontend: *ioctl" port-create.txt
79 atf_check egrep -q "port: *[0-9]+" port-create.txt
80 portnum=`awk '/port:/ {print $2}' port-create.txt`
81 atf_check -o save:portlist.txt ctladm portlist -qf ioctl
82 atf_check egrep -q "$portnum *YES *ioctl *ioctl" portlist.txt
100 atf_check -o save:port-create.txt ctladm port -c -d "ioctl"
101 atf_check egrep -q "Port created successfully" port-create.txt
102 atf_check -s exit:1 -e match:"Missing required argument: port_id" ctladm port -r -d "ioctl"
112 atf_set "descr" "ctladm can create a new iscsi port"
121 TARGET=iqn.2018-10.myhost.create_iscsi
122 …atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O …
123 echo "target: $TARGET" >> port-create.txt
124 atf_check egrep -q "Port created successfully" port-create.txt
125 atf_check egrep -q "frontend: *iscsi" port-create.txt
126 atf_check egrep -q "port: *[0-9]+" port-create.txt
127 atf_check -o save:portlist.txt ctladm portlist -qf iscsi
129 # state, so the port's lunmap may be set before enabling it.
130 atf_check egrep -q "$portnum *NO *iscsi *iscsi.*$TARGET" portlist.txt
140 atf_set "descr" "ctladm can create a new iscsi port with a target alias"
149 TARGET=iqn.2018-10.myhost.create_iscsi_alias
151 …atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O …
152 echo "target: $TARGET" >> port-create.txt
153 atf_check egrep -q "Port created successfully" port-create.txt
154 atf_check egrep -q "frontend: *iscsi" port-create.txt
155 atf_check egrep -q "port: *[0-9]+" port-create.txt
156 atf_check -o save:portlist.txt ctladm portlist -qvf iscsi
157 atf_check egrep -q "cfiscsi_target_alias=$ALIAS" portlist.txt
176 TARGET=iqn.2018-10.myhost.create_iscsi
177 …atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_target" ctladm port -c -d "iscsi"…
178 …atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_portal_group_tag" ctladm port -c
184 atf_set "descr" "ctladm can set options when creating a new ioctl port"
192 atf_check -o save:port-create.txt ctladm port -c -d "ioctl" -O pp=101 -O vp=102
193 atf_check egrep -q "Port created successfully" port-create.txt
194 atf_check egrep -q "frontend: *ioctl" port-create.txt
195 atf_check egrep -q "port: *[0-9]+" port-create.txt
196 portnum=`awk '/port:/ {print $2}' port-create.txt`
197 atf_check -o save:portlist.txt ctladm portlist -qf ioctl
198 if ! egrep -q '101[[:space:]]+102' portlist.txt; then
200 atf_fail "Did not create the port with the specified options"
212 atf_set "descr" "ctladm can disable an ioctl port"
220 atf_check -o save:port-create.txt ctladm port -c -d "ioctl"
221 portnum=`awk '/port:/ {print $2}' port-create.txt`
222 atf_check -o save:portlist.txt ctladm portlist -qf ioctl
223 atf_check -o ignore ctladm port -o off -p $portnum
224 atf_check -o match:"^$portnum *NO" ctladm portlist -qf ioctl
234 atf_set "descr" "ctladm can enable an ioctl port"
242 atf_check -o save:port-create.txt ctladm port -c -d "ioctl"
243 portnum=`awk '/port:/ {print $2}' port-create.txt`
244 atf_check -o save:portlist.txt ctladm portlist -qf ioctl
245 atf_check -o ignore ctladm port -o off -p $portnum
246 atf_check -o ignore ctladm port -o on -p $portnum
247 atf_check -o match:"^$portnum *YES" ctladm portlist -qf ioctl
257 atf_set "descr" "ctladm can remove an ioctl port"
265 # Specify exact pp and vp to make the post-removal portlist check
267 atf_check -o save:port-create.txt ctladm port -c -d "ioctl" -O pp=10001 -O vp=10002
268 portnum=`awk '/port:/ {print $2}' port-create.txt`
269 atf_check -o save:portlist.txt ctladm portlist -qf ioctl
270 atf_check -o inline:"Port destroyed successfully\n" ctladm port -r -d ioctl -p $portnum
271 # Check that the port was removed. A new port may have been added with
273 if ctladm portlist -qf ioctl | egrep -q "^${portnum} .*10001 *10002"; then
274 ctladm portlist -qf ioctl
275 atf_fail "port was not removed"
282 atf_set "descr" "ctladm can remove an iscsi port"
291 TARGET=iqn.2018-10.myhost.remove_iscsi
292 …atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O …
293 portnum=`awk '/port:/ {print $2}' port-create.txt`
294 atf_check -o save:portlist.txt ctladm portlist -qf iscsi
295 …atf_check -o inline:"Port destroyed successfully\n" ctladm port -r -d iscsi -O cfiscsi_portal_grou…
296 # Check that the port was removed. A new port may have been added with
299 if ctladm portlist -qf iscsi | egrep -q "^${portnum} .*$PGTAG +[0-9]+ +$TARGET,t,$PGTAGHEX"; then
300 ctladm portlist -qf iscsi
301 atf_fail "port was not removed"
317 TARGET=iqn.2018-10.myhost.remove_iscsi_without_required_args
318 …atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O …
319 echo "target: $TARGET" >> port-create.txt
320 …atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_portal_group_tag" ctladm port -r
321 …atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_target" ctladm port -r -d iscsi -