Add shim functions for repo code introduced by the pre repo stats.
authorclaudio <claudio@openbsd.org>
Thu, 15 Dec 2022 12:04:59 +0000 (12:04 +0000)
committerclaudio <claudio@openbsd.org>
Thu, 15 Dec 2022 12:04:59 +0000 (12:04 +0000)
From tb@

regress/usr.sbin/rpki-client/Makefile.inc
regress/usr.sbin/rpki-client/repo-dummy.c [new file with mode: 0644]

index efa3433..c8e44e8 100644 (file)
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.27 2022/11/26 12:09:34 job Exp $
+# $OpenBSD: Makefile.inc,v 1.28 2022/12/15 12:04:59 claudio Exp $
 
 .PATH:         ${.CURDIR}/../../../../usr.sbin/rpki-client
 
@@ -43,7 +43,7 @@ run-regress-test-mft: test-mft
        ./test-mft -v ${.CURDIR}/../mft/*.mft
 
 SRCS_test-roa+=        test-roa.c roa.c cms.c x509.c ip.c as.c io.c log.c \
-               encoding.c print.c validate.c cert.c mft.c
+               encoding.c print.c validate.c cert.c mft.c repo-dummy.c
 run-regress-test-roa: test-roa
        ./test-roa -v ${.CURDIR}/../roa/*.roa
 
@@ -68,7 +68,7 @@ run-regress-test-tal: test-tal
        ./test-tal -v ${.CURDIR}/../tal/*.tal
 
 SRCS_test-aspa+=       test-aspa.c aspa.c cms.c x509.c ip.c as.c io.c log.c \
-               encoding.c print.c validate.c cert.c mft.c
+               encoding.c print.c validate.c cert.c mft.c repo-dummy.c
 run-regress-test-aspa: test-aspa
        ./test-aspa -v ${.CURDIR}/../aspa/*.asa
 
diff --git a/regress/usr.sbin/rpki-client/repo-dummy.c b/regress/usr.sbin/rpki-client/repo-dummy.c
new file mode 100644 (file)
index 0000000..2147f6c
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Public domain
+ * dummy shim for some tests.
+ */
+
+#include "extern.h"
+
+void
+repo_stat_inc(struct repo *repo, enum rtype type, enum stype subtype)
+{
+       return;
+}
+
+struct repo *
+repo_byid(unsigned int id)
+{
+       return NULL;
+}
+
+unsigned int
+repo_id(const struct repo *repo)
+{
+       return 0;
+}