test: make peck_dispatch_until_stable() print more useful debug info

This commit is contained in:
Peter Hutterer 2023-11-08 11:23:37 +10:00
parent f9c83ed9a6
commit 35832d9fe1
2 changed files with 5 additions and 5 deletions

View file

@ -1085,12 +1085,12 @@ _peck_dispatch_ei(struct peck *peck, int lineno)
}
void
_peck_dispatch_until_stable(struct peck *peck, int lineno)
_peck_dispatch_until_stable(struct peck *peck, const char *func, int lineno)
{
int eis = 0, ei = 0;
int loop_counter = 0;
log_debug(peck, "dispatching until stable (line %d) {\n", lineno);
log_debug(peck, "dispatching until stable (%s:%d) {\n", func, lineno);
peck_indent(peck);
/* we go two dispatch loops for both ei and EIS before we say it's
@ -1108,7 +1108,7 @@ _peck_dispatch_until_stable(struct peck *peck, int lineno)
} while (ei <= 2 || eis <= 2);
peck_dedent(peck);
log_debug(peck, "}\n", lineno);
log_debug(peck, "} stable (%s:%d)\n", func, lineno);
}
void

View file

@ -257,10 +257,10 @@ peck_unref(struct peck *peck);
* pending that are not processed by the current behaviors.
*/
void
_peck_dispatch_until_stable(struct peck *peck, int lineno);
_peck_dispatch_until_stable(struct peck *peck, const char *func, int lineno);
#define peck_dispatch_until_stable(_p) \
_peck_dispatch_until_stable((_p), __LINE__)
_peck_dispatch_until_stable((_p), __func__, __LINE__)
/**
* Discard all pending events.