/* * test_trace_equivalence.h - shared between test_trace_equivalence.c (the * scenarios) and test_trace_equivalence_cmp.c (the comparisons); * scheduler-sim-decision-trace task 6.3. */ #ifndef TEST_TRACE_EQUIVALENCE_H #define TEST_TRACE_EQUIVALENCE_H #include "typemap.h" /* The recorded sessions of a .replay file, decoded. */ typedef struct { replay_session_t** s; int n; int ndispatch; int npend; int npend_detail; /* pends with host/resource reasons */ } sessions_t; /* Each comparison returns NULL when equal, else a malloc'd description of * the first difference (the caller frees it). */ /* First differing line of two texts. */ char* text_diff(const char* a, const char* b); /* Byte comparison of two .replay files (recordings or REPL snapshots) * apart from the header's wall-clock recordingStartWall. */ char* recording_diff(const char* a_path, const char* b_path); /* Decodes every ReplaySession of a .replay file (asserts it is readable). */ void sessions_read(const char* path, sessions_t* out); void sessions_free(sessions_t* s); /* Session rounds, decision ops, times, jobs, allocation hosts and counts, * and pend reasons in full (job_preason_eq()). */ char* sessions_diff(const sessions_t* a, const sessions_t* b); #endif