mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
test: add errno check macros
This commit is contained in:
parent
2073269f47
commit
50180532a4
3 changed files with 57 additions and 0 deletions
|
|
@ -226,6 +226,17 @@ void _pwtest_fail_comparison_bool(const char *file, int line, const char *func,
|
|||
exit(PWTEST_FAIL);
|
||||
}
|
||||
|
||||
SPA_NORETURN
|
||||
void _pwtest_fail_errno(const char *file, int line, const char *func,
|
||||
int expected, int err_no)
|
||||
{
|
||||
pwtest_log("FAILED ERRNO CHECK: expected %d (%s), got %d (%s)\n",
|
||||
expected, strerror(expected), err_no, strerror(err_no));
|
||||
pwtest_log("in %s() (%s:%d)\n", func, file, line);
|
||||
pwtest_backtrace(0);
|
||||
exit(PWTEST_FAIL);
|
||||
}
|
||||
|
||||
|
||||
SPA_NORETURN
|
||||
void _pwtest_fail_comparison_int(const char *file, int line, const char *func,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue