summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2021-04-23 12:16:47 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2021-05-02 16:27:17 +0200
commit8dff30f801d228371d6a15aa44924e75d1d3aea9 (patch)
tree9d57d22db08aa46b26e748d8fbfc568b3e906a8e
parent64dd77361f7ab97365d264408afb538097c0339c (diff)
tests: fix assert.h header change fallout
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
-rw-r--r--tests/lib/test_ringbuf.c2
-rw-r--r--tests/lib/test_seqlock.c3
-rw-r--r--tests/subdir.am2
3 files changed, 4 insertions, 3 deletions
diff --git a/tests/lib/test_ringbuf.c b/tests/lib/test_ringbuf.c
index 7ba5a29b62..4ac62940b8 100644
--- a/tests/lib/test_ringbuf.c
+++ b/tests/lib/test_ringbuf.c
@@ -93,7 +93,7 @@ int main(int argc, char **argv)
assert(ringbuf_get(soil, &compost, BUFSIZ) == BUFSIZ);
validate_state(soil, BUFSIZ, 0);
- assert(soil->empty = true);
+ assert(soil->empty == true);
assert(soil->start == soil->end);
assert(soil->start == 15);
diff --git a/tests/lib/test_seqlock.c b/tests/lib/test_seqlock.c
index 639c2bdc2b..768307d56d 100644
--- a/tests/lib/test_seqlock.c
+++ b/tests/lib/test_seqlock.c
@@ -32,6 +32,7 @@
#include "monotime.h"
#include "seqlock.h"
+#include "printfrr.h"
static struct seqlock sqlo;
static pthread_t thr1;
@@ -43,7 +44,7 @@ static void writestr(const char *str)
char buf[32];
int64_t usec = monotime_since(&start, NULL);
- snprintf(buf, sizeof(buf), "[%02"PRId64"] ", usec / 100000);
+ snprintfrr(buf, sizeof(buf), "[%02" PRId64 "] ", usec / 100000);
iov[0].iov_base = buf;
iov[0].iov_len = strlen(buf);
diff --git a/tests/subdir.am b/tests/subdir.am
index 7384d9d96e..139f4878c8 100644
--- a/tests/subdir.am
+++ b/tests/subdir.am
@@ -294,7 +294,7 @@ tests_lib_test_nexthop_iter_CPPFLAGS = $(TESTS_CPPFLAGS)
tests_lib_test_nexthop_iter_LDADD = $(ALL_TESTS_LDADD)
tests_lib_test_nexthop_iter_SOURCES = tests/lib/test_nexthop_iter.c tests/helpers/c/prng.c
tests_lib_test_ntop_CFLAGS = $(TESTS_CFLAGS)
-tests_lib_test_ntop_CPPFLAGS = $(TESTS_CPPFLAGS)
+tests_lib_test_ntop_CPPFLAGS = $(CPPFLAGS_BASE) # no assert override
tests_lib_test_ntop_LDADD = # none
tests_lib_test_ntop_SOURCES = tests/lib/test_ntop.c tests/helpers/c/prng.c
tests_lib_test_prefix2str_CFLAGS = $(TESTS_CFLAGS)