Skip to content

Commit

Permalink
testsuite: try a really big redfish config
Browse files Browse the repository at this point in the history
  • Loading branch information
garlick committed Feb 7, 2024
1 parent e3a6e18 commit f212401
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions t/t0029-redfish.t
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,41 @@ test_expect_success 'stop powerman daemon' '
kill -15 $(cat powermand.pid) &&
wait
'

# Usage: genconfig num_chassis slots_per_chassis
genconfig() {
echo "listen \"$testaddr\""
echo "include \"$devicesdir/redfishpower-cray-r272z30.dev\""
for i in $(seq 0 $(($1-1))); do
lo=$(($i*$2))
hi=$((${lo}+$2-1))
echo "device \"chassis$i\" \"redfishpower-cray-r272z30\" \"$simdir/redfishpower -h blade[$lo-$hi] |&\""
done
for i in $(seq 0 $(($1-1))); do
lo=$(($i*$2))
hi=$((${lo}+$2-1))
echo "node \"blade[$lo-$hi]\" \"chassis$i\""
done
}
test_expect_success 'create powerman.conf for 2048 8-slot chassis' '
genconfig 2048 8 >powerman2.conf
'
test_expect_success 'start powerman daemon and wait for it to start' '
ulimit -n 4096 &&
$powermand -c powerman2.conf -f 2>powerman2.err &
echo $! >powermand2.pid &&
$powerman --retry-connect=100 --server-host=$testaddr -d >device2.out
'
test_expect_success 'powerman -q shows all off' '
$powerman -h $testaddr -q >query7.out &&
makeoutput "" "blade[0-16383]" "" >query7.exp &&
test_cmp query7.exp query7.out
'
test_expect_success 'stop powerman daemon' '
kill -15 $(cat powermand2.pid) &&
wait
'
test_done

# vi: set ft=sh

0 comments on commit f212401

Please sign in to comment.