1 # Hey Emacs, this is a -*- shell-script -*- !!! :-)
3 # Augment PATH with relevant stubs/ directories. We do this by actually
4 # setting PATH, and also by setting $EVENTSCRIPTS_PATH and then
5 # prepending that to $PATH in rc.local to avoid the PATH reset in
10 if [ -d "${TEST_SUBDIR}/stubs" ] ; then
11 EVENTSCRIPTS_PATH="${TEST_SUBDIR}/stubs"
14 export EVENTSCRIPTS_PATH
16 PATH="${EVENTSCRIPTS_PATH}:${PATH}"
18 export EVENTSCRIPTS_TESTS_VAR_DIR="${TEST_VAR_DIR}/unit_eventscripts"
19 if [ -d "$EVENTSCRIPTS_TESTS_VAR_DIR" -a \
20 "$EVENTSCRIPTS_TESTS_VAR_DIR" != "/unit_eventscripts" ] ; then
21 rm -r "$EVENTSCRIPTS_TESTS_VAR_DIR"
23 mkdir -p "$EVENTSCRIPTS_TESTS_VAR_DIR"
24 export CTDB_VARDIR="$EVENTSCRIPTS_TESTS_VAR_DIR/ctdb"
26 export CTDB_LOGFILE="${EVENTSCRIPTS_TESTS_VAR_DIR}/log.ctdb"
27 touch "$CTDB_LOGFILE" || die "Unable to create CTDB_LOGFILE=$CTDB_LOGFILE"
29 if [ -d "${TEST_SUBDIR}/etc" ] ; then
30 cp -a "${TEST_SUBDIR}/etc" "$EVENTSCRIPTS_TESTS_VAR_DIR"
31 export CTDB_ETCDIR="${EVENTSCRIPTS_TESTS_VAR_DIR}/etc"
33 die "Unable to setup \$CTDB_ETCDIR"
36 if [ -d "${TEST_SUBDIR}/etc-ctdb" ] ; then
37 cp -prL "${TEST_SUBDIR}/etc-ctdb" "$EVENTSCRIPTS_TESTS_VAR_DIR"
38 export CTDB_BASE="${EVENTSCRIPTS_TESTS_VAR_DIR}/etc-ctdb"
40 die "Unable to set \$CTDB_BASE"
44 if [ ! -d "${CTDB_BASE}/events.d" ] ; then
46 ERROR: Directory ${CTDB_BASE}/events.d does not exist.
48 That means that no eventscripts can be tested.
50 One possible explanation:
52 You have CTDB installed via RPMs (or similar), so the regular
53 CTDB_BASE directory is in /etc/ctdb/
57 You have done a regular "configure" and "make install" so the tests
58 are installed under /usr/local/.
60 If so, one possible hack to fix this is to create a symlink:
62 ln -s /etc/ctdb /usr/local/etc/ctdb
64 This is nasty but it works... :-)
69 ######################################################################
71 if "$TEST_VERBOSE" ; then
72 debug () { echo "$@" ; }
77 eventscripts_tests_cleanup_hooks=""
80 eventscripts_test_add_cleanup ()
82 eventscripts_tests_cleanup_hooks="${eventscripts_tests_cleanup_hooks}${eventscripts_tests_cleanup_hooks:+ ; }$*"
85 trap 'eval $eventscripts_tests_cleanup_hooks' 0
88 ######################################################################
90 # General setup fakery
94 debug "Setting up shares (3 existing shares)"
95 # Create 3 fake shares/exports.
97 for i in $(seq 1 3) ; do
98 _s="${EVENTSCRIPTS_TESTS_VAR_DIR}/shares/${i}_existing"
100 FAKE_SHARES="${FAKE_SHARES}${FAKE_SHARES:+ }${_s}"
103 export FAKE_PROC_NET_BONDING="$EVENTSCRIPTS_TESTS_VAR_DIR/proc-net-bonding"
104 mkdir -p "$FAKE_PROC_NET_BONDING"
105 rm -f "$FAKE_PROC_NET_BONDING"/*
107 export FAKE_ETHTOOL_LINK_DOWN="$EVENTSCRIPTS_TESTS_VAR_DIR/ethtool-link-down"
108 mkdir -p "$FAKE_ETHTOOL_LINK_DOWN"
109 rm -f "$FAKE_ETHTOOL_LINK_DOWN"/*
111 # This can only have 2 levels. We don't want to resort to usings
112 # something dangerous like "rm -r" setup time.
113 export FAKE_IP_STATE="$EVENTSCRIPTS_TESTS_VAR_DIR/fake-ip-state"
114 mkdir -p "$FAKE_IP_STATE"
115 rm -f "$FAKE_IP_STATE"/*/*
116 rm -f "$FAKE_IP_STATE"/* 2>/dev/null || true
117 rmdir "$FAKE_IP_STATE"/* 2>/dev/null || true
123 debug "Marking TCP port \"${_i}\" as not listening"
124 FAKE_TCP_LISTEN=$(echo "$FAKE_TCP_LISTEN" | sed -r -e "s@[[:space:]]*[\.0-9]+:${_i}@@g")
132 # Replace some shares with non-existent ones.
137 export MISSING_SHARES_TEXT=""
138 for _i in $FAKE_SHARES ; do
139 if [ $_n = "$1" ] ; then
141 _i="${_i%_existing}_missing"
142 debug "Replacing share $_n with missing share \"$_i\""
143 rmdir "$_i" 2>/dev/null || true
144 MISSING_SHARES_TEXT="${MISSING_SHARES_TEXT}${MISSING_SHARES_TEXT:+${_nl}}"$(printf "$_fmt" "${_i}")
146 _t="${_t}${_t:+ }${_i}"
152 # Setup some fake /proc/net/bonding files with just enough info for
155 # arg1 is interface name, arg2 is currently active slave (use "None"
156 # if none), arg3 is MII status ("up" or "down").
160 _slave="${2:-${_iface}_sl_0}"
162 _mii_subs="${4:-${_mii_s:-up}}"
163 echo "Setting $_iface to be a bond with active slave $_slave and MII status $_mii_s"
164 cat >"${FAKE_PROC_NET_BONDING}/$_iface" <<EOF
165 Bonding Mode: IEEE 802.3ad Dynamic link aggregation
166 Currently Active Slave: $_slave
169 # Status of 1st pretend adapter
170 MII Status: $_mii_subs
171 # Status of 2nd pretend adapter
172 MII Status: $_mii_subs
176 ethtool_interfaces_down ()
179 echo "Marking interface $_i DOWN for ethtool"
180 touch "${FAKE_ETHTOOL_LINK_DOWN}/${_i}"
184 ethtool_interfaces_up ()
187 echo "Marking interface $_i UP for ethtool"
188 rm -f "${FAKE_ETHTOOL_LINK_DOWN}/${_i}"
192 setup_nmap_output_filter ()
194 OUT_FILTER="-e 's@^(DEBUG: # Nmap 5.21 scan initiated) .+ (as:)@\1 DATE \2@' -e 's@^(DEBUG: # Nmap done at) .+ (--)@\1 DATE \2@'"
199 echo "# ip rule show"
203 while read _p _x _i _x _t ; do
204 # Remove trailing colon after priority/preference.
206 # Only remove rules that match our priority/preference.
207 [ "$CTDB_PER_IP_ROUTING_RULE_PREF" = "$_p" ] || continue
209 echo "# ip route show table $_t"
210 ip route show table "$_t"
214 # Copied from 13.per_ip_routing for now... so this is lazy testing :-(
215 ipv4_host_addr_to_net ()
220 # Convert the host address to an unsigned long by splitting out
221 # the octets and doing the math.
223 for _o in $(export IFS="." ; echo $_host) ; do
224 _host_ul=$(( ($_host_ul << 8) + $_o)) # work around Emacs color bug
227 # Calculate the mask and apply it.
228 _mask_ul=$(( 0xffffffff << (32 - $_maskbits) ))
229 _net_ul=$(( $_host_ul & $_mask_ul ))
231 # Now convert to a network address one byte at a time.
233 for _o in $(seq 1 4) ; do
234 _net="$(($_net_ul & 255))${_net:+.}${_net}"
235 _net_ul=$(($_net_ul >> 8))
238 echo "${_net}/${_maskbits}"
241 ######################################################################
245 # Evaluate an expression that probably calls functions or uses
246 # variables from the CTDB functions file. This is used for test
251 . "$CTDB_BASE/functions"
256 # Set output for ctdb command. Option 1st argument is return code.
259 _out="$EVENTSCRIPTS_TESTS_VAR_DIR/ctdb.out"
262 _rc="$EVENTSCRIPTS_TESTS_VAR_DIR/ctdb.rc"
263 echo "${1:-0}" >"$_rc"
265 eventscripts_test_add_cleanup "rm -f $_out $_rc"
272 export FAKE_CTDB_NUMNODES="${1:-3}"
273 echo "Setting up CTDB with ${FAKE_CTDB_NUMNODES} fake nodes"
275 export FAKE_CTDB_PNN="${2:-0}"
276 echo "Setting up CTDB with PNN ${FAKE_CTDB_PNN}"
278 export CTDB_PUBLIC_ADDRESSES="${CTDB_BASE}/public_addresses"
279 if [ -n "$3" ] ; then
280 echo "Setting up CTDB_PUBLIC_ADDRESSES: $3"
281 CTDB_PUBLIC_ADDRESSES=$(mktemp)
285 echo "${_ip} ${_ifaces}" >>"$CTDB_PUBLIC_ADDRESSES"
287 eventscripts_test_add_cleanup "rm -f $CTDB_PUBLIC_ADDRESSES"
290 export FAKE_CTDB_STATE="$EVENTSCRIPTS_TESTS_VAR_DIR/fake-ctdb"
292 export FAKE_CTDB_IFACES_DOWN="$FAKE_CTDB_STATE/ifaces-down"
293 mkdir -p "$FAKE_CTDB_IFACES_DOWN"
294 rm -f "$FAKE_CTDB_IFACES_DOWN"/*
296 export FAKE_CTDB_SCRIPTSTATUS="$FAKE_CTDB_STATE/scriptstatus"
297 mkdir -p "$FAKE_CTDB_SCRIPTSTATUS"
298 rm -f "$FAKE_CTDB_SCRIPTSTATUS"/*
301 ctdb_get_interfaces ()
303 # The echo/subshell forces all the output onto 1 line.
304 echo $(ctdb ifaces -Y | awk -F: 'FNR > 1 {print $2}')
307 ctdb_get_1_interface ()
309 _t=$(ctdb_get_interfaces)
313 # Print all public addresses as: interface IP maskbits
314 # Each line is suitable for passing to takeip/releaseip
315 ctdb_get_all_public_addresses ()
317 _f="${CTDB_PUBLIC_ADDRESSES:-${CTDB_BASE}/public_addresses}"
318 while IFS="/$IFS" read _ip _maskbits _ifaces ; do
319 echo "$_ifaces $_ip $_maskbits"
323 # Print public addresses on this node as: interface IP maskbits
324 # Each line is suitable for passing to takeip/releaseip
325 ctdb_get_my_public_addresses ()
328 read _x # skip header line
330 while IFS=":" read _x _ip _x _iface _x ; do
331 [ -n "$_iface" ] || continue
332 while IFS="/$IFS" read _i _maskbits _x ; do
333 if [ "$_ip" = "$_i" ] ; then
334 echo $_iface $_ip $_maskbits
337 done <"${CTDB_PUBLIC_ADDRESSES:-${CTDB_BASE}/public_addresses}"
342 # Prints the 1st public address as: interface IP maskbits
343 # This is suitable for passing to takeip/releaseip
344 ctdb_get_1_public_address ()
346 ctdb_get_my_public_addresses | head -n 1
349 ctdb_not_implemented ()
351 export CTDB_NOT_IMPLEMENTED="$1"
352 ctdb_not_implemented="\
353 DEBUG: ctdb: command \"$1\" not implemented in stub"
356 ctdb_fake_scriptstatus ()
365 echo "$_code $_status $_err_out" >"$FAKE_CTDB_SCRIPTSTATUS/$script"
368 ######################################################################
370 setup_ctdb_policy_routing ()
372 service_name="per_ip_routing"
374 export CTDB_PER_IP_ROUTING_CONF="$CTDB_BASE/policy_routing"
375 export CTDB_PER_IP_ROUTING_RULE_PREF=100
376 export CTDB_PER_IP_ROUTING_TABLE_ID_LOW=1000
377 export CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=2000
379 # Tests need to create and populate this file
380 rm -f "$CTDB_PER_IP_ROUTING_CONF"
383 # Create policy routing configuration in $CTDB_PER_IP_ROUTING_CONF.
384 # $1 is the number of assigned IPs to use (<num>, all), defaulting to
385 # 1. If $2 is "default" then a default route is also added.
386 create_policy_routing_config ()
389 _should_add_default="$2"
391 ctdb_get_my_public_addresses |
392 if [ "$_num_ips" = "all" ] ; then
397 while read _dev _ip _bits ; do
398 _net=$(ipv4_host_addr_to_net "$_ip" "$_bits")
399 _gw="${_net%.*}.1" # a dumb, calculated default
403 if [ "$_should_add_default" = "default" ] ; then
404 echo "$_ip 0.0.0.0/0 $_gw"
406 done >"$CTDB_PER_IP_ROUTING_CONF"
409 # Check the routes against those that are expected. $1 is the number
410 # of assigned IPs to use (<num>, all), defaulting to 1. If $2 is
411 # "default" then expect default routes to have been added.
415 _should_add_default="$2"
420 ctdb_get_my_public_addresses |
421 if [ "$_num_ips" = "all" ] ; then
426 while read _dev _ip _bits ; do
427 _net=$(ipv4_host_addr_to_net "$_ip" "$_bits")
428 _gw="${_net%.*}.1" # a dumb, calculated default
430 _policy_rules="${_policy_rules}
431 ${CTDB_PER_IP_ROUTING_RULE_PREF}: from $_ip lookup ctdb.$_ip "
432 _policy_routes="${_policy_routes}
433 # ip route show table ctdb.$_ip
434 $_net dev $_dev scope link "
436 if [ "$_should_add_default" = "default" ] ; then
437 _policy_routes="${_policy_routes}
438 default via $_gw dev $_dev "
444 0: from all lookup local ${_policy_rules}
445 32766: from all lookup main
446 32767: from all lookup default ${_policy_routes}
449 simple_test_command dump_routes
453 ######################################################################
455 # Samba/winbind fakery
463 if [ "$1" != "down" ] ; then
465 debug "Marking Samba services as up, listening and managed by CTDB"
466 # Get into known state.
467 eventscript_call ctdb_service_managed
469 # All possible service names for all known distros.
470 for i in "smb" "nmb" "samba" ; do
471 service "$i" force-started
474 export CTDB_SAMBA_SKIP_SHARE_CHECK="no"
475 export CTDB_MANAGED_SERVICES="foo samba bar"
477 export FAKE_TCP_LISTEN="0.0.0.0:445 0.0.0.0:139"
478 export FAKE_WBINFO_FAIL="no"
480 # Some things in 50.samba are backgrounded and waited for. If
481 # we don't sleep at all then timeouts can happen. This avoids
483 export FAKE_SLEEP_FORCE=0.1
485 debug "Marking Samba services as down, not listening and not managed by CTDB"
486 # Get into known state.
487 eventscript_call ctdb_service_unmanaged
489 # All possible service names for all known distros.
490 for i in "smb" "nmb" "samba" ; do
491 service "$i" force-stopped
494 export CTDB_SAMBA_SKIP_SHARE_CHECK="no"
495 export CTDB_MANAGED_SERVICES="foo bar"
496 unset CTDB_MANAGES_SAMBA
498 export FAKE_TCP_LISTEN=""
499 export FAKE_WBINFO_FAIL="yes"
502 # This is ugly but if this file isn't removed before each test
503 # then configuration changes between tests don't stick.
504 rm -f "$CTDB_VARDIR/state/samba/smb.conf.cache"
511 service_name="winbind"
513 if [ "$1" != "down" ] ; then
515 debug "Marking Winbind service as up and managed by CTDB"
516 # Get into known state.
517 eventscript_call ctdb_service_managed
519 service "winbind" force-started
521 export CTDB_MANAGED_SERVICES="foo winbind bar"
523 export FAKE_WBINFO_FAIL="no"
526 debug "Marking Winbind service as down and not managed by CTDB"
527 # Get into known state.
528 eventscript_call ctdb_service_unmanaged
530 service "winbind" force-stopped
532 export CTDB_MANAGED_SERVICES="foo bar"
533 unset CTDB_MANAGES_WINBIND
535 export FAKE_WBINFO_FAIL="yes"
541 debug "Making wbinfo commands fail"
542 FAKE_WBINFO_FAIL="yes"
545 ######################################################################
555 export FAKE_RPCINFO_SERVICES=""
557 export CTDB_NFS_SKIP_SHARE_CHECK="no"
559 export CTDB_MONITOR_NFS_THREAD_COUNT RPCNFSDCOUNT FAKE_NFSD_THREAD_PIDS
560 export CTDB_NFS_DUMP_STUCK_THREADS
562 # Reset the failcounts for nfs services.
563 eventscript_call eval rm -f '$ctdb_fail_dir/nfs_*'
565 if [ "$1" != "down" ] ; then
566 debug "Setting up NFS environment: all RPC services up, NFS managed by CTDB"
568 eventscript_call ctdb_service_managed
569 service "nfs" force-started # might not be enough
571 export CTDB_MANAGED_SERVICES="foo nfs bar"
573 rpc_services_up "nfs" "mountd" "rquotad" "nlockmgr" "status"
575 debug "Setting up NFS environment: all RPC services down, NFS not managed by CTDB"
577 eventscript_call ctdb_service_unmanaged
578 service "nfs" force-stopped # might not be enough
579 eventscript_call startstop_nfs stop
581 export CTDB_MANAGED_SERVICES="foo bar"
582 unset CTDB_MANAGES_NFS
589 debug "Marking RPC service \"${_i}\" as unavailable"
590 FAKE_RPCINFO_SERVICES=$(echo "$FAKE_RPCINFO_SERVICES" | sed -r -e "s@[[:space:]]*${_i}:[0-9]+:[0-9]+@@g")
597 debug "Marking RPC service \"${_i}\" as available"
602 nlockmgr) _t="3:4" ;;
604 *) die "Internal error - unsupported RPC service \"${_i}\"" ;;
607 FAKE_RPCINFO_SERVICES="${FAKE_RPCINFO_SERVICES}${FAKE_RPCINFO_SERVICES:+ }${_i}:${_t}"
611 # Set the required result for a particular RPC program having failed
612 # for a certain number of iterations. This is probably still a work
613 # in progress. Note that we could hook aggressively
614 # nfs_check_rpc_service() to try to implement this but we're better
615 # off testing nfs_check_rpc_service() using independent code... even
616 # if it is incomplete and hacky. So, if the 60.nfs eventscript
617 # changes and the tests start to fail then it may be due to this
618 # function being incomplete.
619 rpc_set_service_failure_response ()
622 # The number of failures defaults to the iteration number. This
623 # will be true when we fail from the 1st iteration... but we need
624 # the flexibility to set the number of failures.
625 _numfails="${2:-${iteration}}"
627 _etc="$CTDB_ETCDIR" # shortcut for readability
628 for _c in "$_etc/sysconfig/nfs" "$_etc/default/nfs" "$_etc/ctdb/sysconfig/nfs" ; do
629 if [ -r "$_c" ] ; then
635 # A handy newline. :-)
642 _file=$(ls "${CTDB_BASE}/nfs-rpc-checks.d/"[0-9][0-9]."${_progname}.check")
643 [ -r "$_file" ] || die "RPC check file \"$_file\" does not exist or is not unique"
645 while read _op _li _actions ; do
651 if [ "$_numfails" "$_op" "$_li" ] ; then
654 for _action in $_actions ; do
660 nfsd) _ver=3 ; _pn="nfs" ;;
661 lockd) _ver=4 ; _pn="nlockmgr" ;;
662 statd) _pn="status" ;;
665 ERROR: $_pn failed RPC check:
666 rpcinfo: RPC: Program not registered
667 program $_pn version $_ver is not available"
671 _p="rpc.${_progname}"
674 _opts="${STATD_HOSTNAME:+ -n }${STATD_HOSTNAME}"
677 case "${_progname}${_action#restart}" in
680 Trying to restart NFS service"
682 if [ -n "$CTDB_NFS_DUMP_STUCK_THREADS" ] ; then
683 for _pid in $FAKE_NFSD_THREAD_PIDS ; do
686 Stack trace for stuck nfsd thread [${_pid}]:
687 [<ffffffff87654321>] fake_stack_trace_for_pid_${_pid}/stack+0x0/0xff"
697 _t="Trying to restart NFS service"
701 Trying to restart lock manager service
703 Starting nfslock: OK"
706 _t="Trying to restart lock manager service"
709 _t="Trying to restart $_progname [${_p}${_opts}]"
711 _out="${_out}${_out:+${_nl}}${_t}"
717 required_result $_rc "$_out"
723 ######################################################################
729 service_name="vsftpd"
731 if [ "$1" != "down" ] ; then
732 die "setup_vsftpd up not implemented!!!"
734 debug "Setting up VSFTPD environment: service down, not managed by CTDB"
736 eventscript_call ctdb_service_unmanaged
737 service vsftpd force-stopped
739 export CTDB_MANAGED_SERVICES="foo"
740 unset CTDB_MANAGES_VSFTPD
744 ######################################################################
750 if [ "$1" != "down" ] ; then
751 die "setup_httpd up not implemented!!!"
753 debug "Setting up HTTPD environment: service down, not managed by CTDB"
755 for service_name in "apache2" "httpd" ; do
756 eventscript_call ctdb_service_unmanaged
757 service "$service_name" force-stopped
760 export CTDB_MANAGED_SERVICES="foo"
761 unset CTDB_MANAGES_HTTPD
765 ######################################################################
767 # Result and test functions
769 # Set some globals and print the summary.
774 _f=$(basename "$0" ".sh")
776 # Remaining format should be NN.service.event.NNN or NN.service.NNN:
789 die "Internal error - unknown testcase filename format"
792 printf "%-17s %-10s %-4s - %s\n\n" "$script" "$event" "$_num" "$desc"
798 CTDB_BASE="$CTDB_BASE"
799 CTDB_ETCDIR="$CTDB_ETCDIR"
800 ctdb client is "$(which ctdb)"
804 # Run an eventscript once. The test passes if the return code and
805 # output match those required.
807 # Any args are passed to the eventscript.
811 [ -n "$event" ] || die 'simple_test: $event not set'
813 _extra_header=$(_extra_header)
815 echo "Running eventscript \"$script $event${1:+ }$*\""
817 if $TEST_COMMAND_TRACE ; then
820 _out=$($_trace "${CTDB_BASE}/events.d/$script" "$event" "$@" 2>&1)
822 result_check "$_extra_header"
827 # If something has previously failed then don't continue.
832 echo "=================================================="
836 simple_test_command ()
838 # If something has previously failed then don't continue.
842 echo "=================================================="
843 echo "Running command \"$*\""
849 check_ctdb_logfile ()
851 # If something has previously failed then don't continue.
855 echo "=================================================="
856 echo "Checking CTDB_LOGFILE=\"${CTDB_LOGFILE}\""
857 _out=$(cat "$CTDB_LOGFILE" 2>&1)
862 # Run an eventscript iteratively.
863 # - 1st argument is the number of iterations.
864 # - 2nd argument is something to eval to do setup for every iteration.
865 # The easiest thing to do here is to define a function and pass it
867 # - Subsequent arguments come in pairs: an iteration number and
868 # something to eval for that iteration. Each time an iteration
869 # number is matched the associated argument is given to eval after
870 # the default setup is done. The iteration numbers need to be given
871 # in ascending order.
873 # Some optional args can be given *before* these, surrounded by extra
874 # "--" args. These args are passed to the eventscript. Quoting is
877 # One use of the 2nd and further arguments is to call
878 # required_result() to change what is expected of a particular
882 [ -n "$event" ] || die 'simple_test: $event not set'
885 if [ "$1" = "--" ] ; then
887 while [ "$1" != "--" ] ; do
888 args="${args}${args:+ }$1"
898 echo "Running $_repeats iterations of \"$script $event\" $args"
902 for iteration in $(seq 1 $_repeats) ; do
903 # This is inefficient because the iteration-specific setup
904 # might completely replace the default one. However, running
905 # the default is good because it allows you to revert to a
906 # particular result without needing to specify it explicitly.
908 if [ $iteration = "$1" ] ; then
914 if $TEST_COMMAND_TRACE ; then
917 _out=$($_trace "${CTDB_BASE}/events.d/$script" "$event" $args 2>&1)
920 if [ -n "$OUT_FILTER" ] ; then
921 _fout=$(echo "$_out" | eval sed -r $OUT_FILTER)
926 if [ "$_fout" = "$required_output" -a $_rc = $required_rc ] ; then
933 result_print "$_passed" "$_out" "$_rc" "Iteration $iteration"
936 result_footer "$_result" "$(_extra_header)"