summaryrefslogtreecommitdiff
path: root/t/helper
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-02-18 01:21:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-02-18 01:21:41 (GMT)
commitaa2d3dbdf56e835e34c8255815019bcfee5066d2 (patch)
tree4ad0db82f6f37dba7c7e22b57437dc510b70c328 /t/helper
parentdadc91ff0c15b655070ad334a27a734e91635bd5 (diff)
parent0a9dde4a04c1228025d292f44113cb8f9cebbfba (diff)
downloadgit-aa2d3dbdf56e835e34c8255815019bcfee5066d2.zip
git-aa2d3dbdf56e835e34c8255815019bcfee5066d2.tar.gz
git-aa2d3dbdf56e835e34c8255815019bcfee5066d2.tar.bz2
Merge branch 'jt/trace2-BUG'
Even though invocations of "die()" were logged to the trace2 system, "BUG()"s were not, which has been corrected. * jt/trace2-BUG: usage: trace2 BUG() invocations
Diffstat (limited to 't/helper')
-rw-r--r--t/helper/test-trace2.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/helper/test-trace2.c b/t/helper/test-trace2.c
index 823f33c..f93633f 100644
--- a/t/helper/test-trace2.c
+++ b/t/helper/test-trace2.c
@@ -198,6 +198,14 @@ static int ut_006data(int argc, const char **argv)
return 0;
}
+static int ut_007bug(int argc, const char **argv)
+{
+ /*
+ * Exercise BUG() to ensure that the message is printed to trace2.
+ */
+ BUG("the bug message");
+}
+
/*
* Usage:
* test-tool trace2 <ut_name_1> <ut_usage_1>
@@ -214,6 +222,7 @@ static struct unit_test ut_table[] = {
{ ut_004child, "004child", "[<child_command_line>]" },
{ ut_005exec, "005exec", "<git_command_args>" },
{ ut_006data, "006data", "[<category> <key> <value>]+" },
+ { ut_007bug, "007bug", "" },
};
/* clang-format on */