]> git.ipfire.org Git - thirdparty/systemd.git/commit
test-dns-answer: fix misuse of ASSERT_TRUE/FALSE()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 1 Aug 2025 19:42:33 +0000 (04:42 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 2 Aug 2025 10:02:31 +0000 (11:02 +0100)
commit100a98960ac2ea8d1d7297e35960cd9c33b0ce19
tree49cde97f5b2936dd2b386fb35bf1e90f93df7cac
parentca6c192f9cc12e03fdf2015143f2ea8881f2f46a
test-dns-answer: fix misuse of ASSERT_TRUE/FALSE()

E.g. dns_answer_match_key() may return negative errno, hence we should
use ASSERT_OK_POSITIVE/ZERO().

This also has bunch of cleanups:
- call functions in ASSERT_NOT_NULL(),
- add short comments for constant function arguments,
- merge several test cases,
- use memstream, rather than temporal files.
src/resolve/test-dns-answer.c