From 304cdbb132b607cc22ca16eb0e37e4c6d8ecd201 Mon Sep 17 00:00:00 2001 From: David Goldblatt Date: Tue, 30 Mar 2021 14:55:28 -0700 Subject: [PATCH] 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. --- test/unit/prof_recent.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/unit/prof_recent.c b/test/unit/prof_recent.c index e16a849a..9974d105 100644 --- a/test/unit/prof_recent.c +++ b/test/unit/prof_recent.c @@ -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)) {