#!/bin/bash

source ../test_utils/test_utils.sh

name="dummy_thread"
run_and_check_command eztrace -t "pthread" "./dummy_thread"

trace_filename="${name}_trace/eztrace_log.otf2"
trace_check_integrity "$trace_filename"
trace_check_enter_leave_parity  "$trace_filename"

trace_check_event_type "$trace_filename" "THREAD_BEGIN" 3
trace_check_event_type "$trace_filename" "THREAD_END" 3

echo PASS: $nb_pass, FAILED:$nb_failed, TOTAL: $nb_test

exit $nb_failed
