- # Check health status, exit code should indicate failure
- $CURDIR/$HEALTH_CHECK_BIN &> /dev/null
-
- health_check_exit_code=$?
-
- if [ $health_check_exit_code -eq $test_thread_exit_code ]; then
- pass "Validate that ${test_thread_stall_name} is stalled"
- else
- fail "Validate that ${test_thread_stall_name} is stalled"
- diag "Health returned: $health_check_exit_code"
+ # Check health status, should indicate failure
+ $CURDIR/$HEALTH_CHECK_BIN > ${STDOUT_PATH} 2> ${STDERR_PATH}
+
+ out=$(grep "${test_thread_error_string}" ${STDOUT_PATH} | wc -l)
+ if [ $out -eq 0 ]; then
+ fail "Validate thread ${test_thread_stall_name} is stalled"
+ diag "Health returned:"
+ diag "stdout:"
+ file=${STDOUT_PATH}
+ while read line ; do
+ diag "$line"
+ done < ${file}
+
+ diag "stderr:"
+ file=${STDERR_PATH}
+ while read line ; do
+ diag "$line"
+ done < ${file}