]> git.ipfire.org Git - thirdparty/FORT-validator.git/commitdiff
Update unit tests
authorAlberto Leiva Popper <ydahhrk@gmail.com>
Fri, 3 Feb 2023 21:43:23 +0000 (15:43 -0600)
committerAlberto Leiva Popper <ydahhrk@gmail.com>
Fri, 3 Feb 2023 21:43:23 +0000 (15:43 -0600)
src/thread/thread_pool.c
test/rtr/db/vrps_test.c
test/tal_test.c
test/thread_pool_test.c

index 1b38e93bf5c88d3ebbf32a90e1628c5de6c2fc53..27de91b9adbf599e86c85866b2a667a0bedeb3d4 100644 (file)
@@ -402,6 +402,7 @@ thread_pool_push(struct thread_pool *pool, char const *task_name,
        struct thread_pool_task *task;
        int error;
 
+       task = NULL;
        error = task_create(task_name, cb, arg, &task);
        if (error)
                return error;
index d96b1eec868711c587afafdc9dedbd611581bd5f..51a610e0e05a83eabe7a9fb1e566597b34f730ae 100644 (file)
@@ -272,7 +272,7 @@ check_base(serial_t expected_serial, bool const *expected_base)
 static int
 vrp_add(struct delta_vrp const *delta, void *arg)
 {
-       return deltas_add_roa(arg, &delta->vrp, delta->flags);
+       return deltas_add_roa(arg, &delta->vrp, delta->flags, 'a', 0, 0);
 }
 
 static int
index 0f7399aba1b11e620dc1548b7f044ce56ed4672b..ac5a4e90919e438f0631f33ef8e3f452954e431b 100644 (file)
@@ -110,6 +110,25 @@ db_rrdp_rem_nonvisited_tals(void)
        /* Empty */
 }
 
+void
+panic_on_fail(int error, char const *function_name)
+{
+       if (error)
+               ck_abort_msg("%s() returned errcode %d", function_name, error);
+}
+
+void
+mutex_lock(pthread_mutex_t *lock)
+{
+       /* Empty */
+}
+
+void
+mutex_unlock(pthread_mutex_t *lock)
+{
+       /* Empty */
+}
+
 START_TEST(tal_load_normal)
 {
        struct tal *tal;
index 0c9841384d2c2d4eb0aac1fd424a3deeaf84f64d..781382649b3eb26aebb01ca5be0761b47b94be5d 100644 (file)
@@ -2,6 +2,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 
+#include "common.c"
 #include "log.c"
 #include "impersonator.c"
 #include "thread/thread_pool.c"