Skip to content

Commit

Permalink
t: cover parent failure on setresult
Browse files Browse the repository at this point in the history
Problem: There are no tests for the special case where a parent
results in a error and leads to a dependency error with
the setresult statement.

Add coverage via t0037-cray-ex.t.
  • Loading branch information
chu11 committed Sep 10, 2024
1 parent 33b948e commit b45e68f
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions t/t0037-cray-ex.t
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,38 @@ test_expect_success 'stop powerman daemon (crayexU)' '
wait
'

#
# redfishpower hpe cray supercomputing ex chassis test - parent failure
# see issue #197
#

test_expect_success 'create powerman.conf for chassis w/ 16 redfish nodes (crayexfail)' '
cat >powerman_cray_ex_fail.conf <<-EOT
listen "$testaddr"
include "$devicesdir/redfishpower-cray-ex.dev"
device "d0" "cray-ex" "$redfishdir/redfishpower -h cmm0,t[0-15] --test-mode --test-fail-power-cmd-hosts=cmm0 |&"
node "cmm0,perif[0-7],blade[0-7],t[0-15]" "d0"
EOT
'
test_expect_success 'start powerman daemon and wait for it to start (crayexfail)' '
$powermand -Y -c powerman_cray_ex_fail.conf &
echo $! >powermand.pid &&
$powerman --retry-connect=100 --server-host=$testaddr -d
'
test_expect_success 'powerman -q shows all unknown' '
$powerman -h $testaddr -q >test_crayexfail_query1.out &&
makeoutput "" "" "blade[0-7],cmm0,perif[0-7],t[0-15]" >test_crayexfail_query1.exp &&
test_cmp test_crayexfail_query1.exp test_crayexfail_query1.out
'
test_expect_success 'powerman -1 t0 dependency error (parent error)' '
test_must_fail $powerman -h $testaddr -1 t0 >test_crayexfail_on1.out 2>test_crayexfail_on1.err &&
grep "cannot perform on, dependency error" test_crayexfail_on1.err
'
test_expect_success 'stop powerman daemon (crayexfail)' '
kill -15 $(cat powermand.pid) &&
wait
'

test_done

# vi: set ft=sh

0 comments on commit b45e68f

Please sign in to comment.