Skip to content

Commit

Permalink
m1
Browse files Browse the repository at this point in the history
Signed-off-by: Dean Roehrich <[email protected]>
  • Loading branch information
roehrich-hpe committed Dec 6, 2024
1 parent 23deab9 commit 4399b98
Showing 1 changed file with 9 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ srvr_pid=$!
echo "Server pid is $srvr_pid, my pid is $$"

trap cleanup SIGINT SIGQUIT SIGABRT SIGTERM
# shellcheck disable=SC2317
cleanup() {
echo "FAIL: trap"
if [[ -n $srvr_pid ]]; then
kill $srvr_pid
wait $srvr_pid
kill "$srvr_pid"
fi
exit 1
}
Expand All @@ -50,56 +50,47 @@ done
output=$($CO -l 0.0.0.0:4000)
if [[ $output != "" ]]; then
echo "FAIL: Expected empty output from list before any jobs have been submitted"
kill $srvr_pid
wait $srvr_pid
kill "$srvr_pid"
exit 1
fi

output=$($CO -c nnf-copy-offload-node-2 0.0.0.0:4000)
if [[ $output != "" ]]; then
echo "FAIL: Expected empty output from cancel before any jobs have been submitted"
kill $srvr_pid
wait $srvr_pid
kill "$srvr_pid"
exit 1
fi

job1=$($CO -o -C compute-01 -W yellow -S /mnt/nnf/ooo -D /lus/foo 0.0.0.0:4000)
if [[ $job1 != "nnf-copy-offload-node-0" ]]; then
echo "FAIL: Unexpected output from copy. Got ($job1)."
kill $srvr_pid
wait $srvr_pid
kill "$srvr_pid"
exit 1
fi

output=$($CO -l 0.0.0.0:4000)
if [[ $(echo "$output" | wc -l) -ne 1 ]]; then
echo "FAIL: Unexpected output from list. Got ($output)."
kill $srvr_pid
wait $srvr_pid
kill "$srvr_pid"
exit 1
fi

output=$($CO -c "$job1" 0.0.0.0:4000)
if [[ $output != "" ]]; then
echo "FAIL: Expected empty output from cancel $job1"
kill $srvr_pid
wait $srvr_pid
kill "$srvr_pid"
exit 1
fi

output=$($CO -l 0.0.0.0:4000)
if [[ $output != "" ]]; then
echo "FAIL: Expected empty output from list after all jobs have been removed"
kill $srvr_pid
wait $srvr_pid
kill "$srvr_pid"
exit 1
fi


sleep 5
echo "Kill server $srvr_pid"
kill $srvr_pid
wait $srvr_pid
kill "$srvr_pid"
echo "PASS: Success"
exit 0

0 comments on commit 4399b98

Please sign in to comment.