Commit 66d1df57 authored by Mark Andrews's avatar Mark Andrews
Browse files

Report which assertion failed when calling set_global_error

parent 5bd7caba
Pipeline #73551 failed with stages
in 19 minutes and 24 seconds
......@@ -155,25 +155,38 @@ set_global_error(isc_result_t result) {
static void
subthread_assert_true(bool expected) {
subthread_assert_true(bool expected, const char *file, unsigned int line) {
if (!expected) {
printf("# %s:%u subthread_assert_true\n", file, line);
#define subthread_assert_true(expected) \
subthread_assert_true(expected, __FILE__, __LINE__)
static void
subthread_assert_int_equal(int observed, int expected) {
subthread_assert_int_equal(int observed, int expected, const char *file,
unsigned int line) {
if (observed != expected) {
printf("# %s:%u subthread_assert_int_equal(%d != %d)\n", file,
line, observed, expected);
#define subthread_assert_int_equal(observed, expected) \
subthread_assert_int_equal(observed, expected, __FILE__, __LINE__)
static void
subthread_assert_result_equal(isc_result_t result, isc_result_t expected) {
subthread_assert_result_equal(isc_result_t result, isc_result_t expected,
const char *file, unsigned int line) {
if (result != expected) {
printf("# %s:%u subthread_assert_result_equal(%u != %u)\n",
file, line, result, expected);
#define subthread_assert_result_equal(observed, expected) \
subthread_assert_result_equal(observed, expected, __FILE__, __LINE__)
static void
ticktock(isc_task_t *task, isc_event_t *event) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment