Fix a prof_recent/prof_sys_thread_name interaction

When both of these are enabled, the output format changes slightly.  Teach the
unit test about the interaction.
This commit is contained in:
David Goldblatt 2021-03-30 14:55:28 -07:00 committed by Qi Wang
parent 9b523c6c15
commit 304cdbb132

View File

@ -439,6 +439,18 @@ confirm_record(const char *template, const confirm_record_t *records,
}
ASSERT_CHAR(',');
if (opt_prof_sys_thread_name) {
ASSERT_FORMATTED_STR("\"%s_thread_name\"",
*type);
ASSERT_CHAR(':');
ASSERT_CHAR('"');
while (*start != '"') {
++start;
}
ASSERT_CHAR('"');
ASSERT_CHAR(',');
}
ASSERT_FORMATTED_STR("\"%s_time\"", *type);
ASSERT_CHAR(':');
while (isdigit(*start)) {