]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: fix assert.h header change fallout
authorDavid Lamparter <equinox@opensourcerouting.org>
Fri, 23 Apr 2021 10:16:47 +0000 (12:16 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Sun, 2 May 2021 14:27:17 +0000 (16:27 +0200)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
tests/lib/test_ringbuf.c
tests/lib/test_seqlock.c
tests/subdir.am

index 7ba5a29b6225d55e106dd6996ed1bdca1269e3e2..4ac62940b872a09ea4ce852a1acb2604e7322431 100644 (file)
@@ -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);
 
index 639c2bdc2bc1c25628a634067eb93e121bb66dfb..768307d56dbf7e09b029a6d5ef7dde7b55068c04 100644 (file)
@@ -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);
index 7384d9d96e27adf1ca0cc361a332756334b0d6e1..139f4878c8e47f74baab5e708f4c782664fa3f0f 100644 (file)
@@ -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)