]> git.ipfire.org Git - thirdparty/systemd.git/commit
test-dns-question: use ASSERT_OK_POSITIVE/ZERO() rather than ASSERT_TRUE/FALSE()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 3 Aug 2025 07:52:31 +0000 (16:52 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 4 Aug 2025 10:35:03 +0000 (11:35 +0100)
commit948b186f46d338c9cb7932816f334fd85a4ea6dd
tree934ed6638283c775d63c423ab269592946dbba3a
parent2cc743db4f0d669a85eb90441067ae22fb664c91
test-dns-question: use ASSERT_OK_POSITIVE/ZERO() rather than ASSERT_TRUE/FALSE()

Similar to 100a98960ac2ea8d1d7297e35960cd9c33b0ce19.

E.g. dns_question_contains_key() may return negative errno, hence we
should not use ASSERT_TRUE/FALSE() for the function.

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.

Fixes CID#1619185.
src/resolve/test-dns-question.c