summaryrefslogtreecommitdiff
path: root/regress/sbin
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2016-09-02 16:54:30 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2016-09-02 16:54:30 +0000
commita6efa0877af62603f1c511185be8e60cd173bf4c (patch)
tree673657ef41a90765c06acb63389a7212a5e77a6c /regress/sbin
parent84c85a837994079abd132faae691bfa064184ee5 (diff)
Repair remaining isakmpd regress tests
Diffstat (limited to 'regress/sbin')
-rw-r--r--regress/sbin/isakmpd/common/log.c46
-rw-r--r--regress/sbin/isakmpd/common/monitor.c13
-rw-r--r--regress/sbin/isakmpd/crypto/Makefile6
-rw-r--r--regress/sbin/isakmpd/crypto/cryptotest.c4
-rw-r--r--regress/sbin/isakmpd/hmac/Makefile6
-rw-r--r--regress/sbin/isakmpd/prf/Makefile6
-rw-r--r--regress/sbin/isakmpd/util/Makefile6
-rw-r--r--regress/sbin/isakmpd/util/utiltest.c4
8 files changed, 73 insertions, 18 deletions
diff --git a/regress/sbin/isakmpd/common/log.c b/regress/sbin/isakmpd/common/log.c
new file mode 100644
index 00000000000..92fde8b3fe7
--- /dev/null
+++ b/regress/sbin/isakmpd/common/log.c
@@ -0,0 +1,46 @@
+/* $OpenBSD: log.c,v 1.1 2016/09/02 16:54:29 mikeb Exp $ */
+
+/*
+ * Public Domain 2016 Mike Belopuhov
+ */
+
+#include <sys/types.h>
+#include <stdlib.h>
+
+void
+log_debug(int cls, int level, const char *fmt, ...)
+{
+}
+
+void
+log_debug_buf(int cls, int level, const char *header, const u_int8_t *buf,
+ size_t sz)
+{
+}
+
+void
+log_print(const char *fmt, ...)
+{
+}
+
+void
+log_error(const char *fmt, ...)
+{
+}
+
+void
+log_errorx(const char *fmt, ...)
+{
+}
+
+void
+log_fatal(const char *fmt, ...)
+{
+ exit(1);
+}
+
+void
+log_fatalx(const char *fmt, ...)
+{
+ exit(1);
+}
diff --git a/regress/sbin/isakmpd/common/monitor.c b/regress/sbin/isakmpd/common/monitor.c
new file mode 100644
index 00000000000..281c08697fe
--- /dev/null
+++ b/regress/sbin/isakmpd/common/monitor.c
@@ -0,0 +1,13 @@
+/* $OpenBSD: monitor.c,v 1.1 2016/09/02 16:54:29 mikeb Exp $ */
+
+/*
+ * Public Domain 2016 Mike Belopuhov
+ */
+
+#include <sys/types.h>
+
+int
+monitor_open(const char *path, int flags, mode_t mode)
+{
+ return (-1);
+}
diff --git a/regress/sbin/isakmpd/crypto/Makefile b/regress/sbin/isakmpd/crypto/Makefile
index 7c34012e51b..febbfa2151e 100644
--- a/regress/sbin/isakmpd/crypto/Makefile
+++ b/regress/sbin/isakmpd/crypto/Makefile
@@ -1,13 +1,13 @@
-# $OpenBSD: Makefile,v 1.2 2010/10/15 10:39:12 jsg Exp $
+# $OpenBSD: Makefile,v 1.3 2016/09/02 16:54:28 mikeb Exp $
# $EOM: Makefile,v 1.7 2000/03/28 21:22:06 ho Exp $
# Test Crypto:
PROG= cryptotest
-SRCS= crypto.c cryptotest.c conf.c log.c sysdep.c util.c
+SRCS= crypto.c cryptotest.c conf.c log.c monitor.c util.c
TOPSRC= ${.CURDIR}/../../../../sbin/isakmpd
TOPOBJ!= cd ${TOPSRC}; printf "all:\n\t@pwd\n" |${MAKE} -f-
-OS!= awk '/^OS=/ { print $$2 }' ${.CURDIR}/../../Makefile
+.PATH: ${.CURDIR}/../common
.PATH: ${TOPSRC} ${TOPSRC}/sysdep/openbsd ${TOPOBJ}
CFLAGS+= -I${TOPSRC} -I${TOPSRC}/sysdep/openbsd -I${TOPOBJ} -Wall \
-DUSE_TRIPLEDES -DUSE_CAST -DUSE_BLOWFISH -DUSE_DES \
diff --git a/regress/sbin/isakmpd/crypto/cryptotest.c b/regress/sbin/isakmpd/crypto/cryptotest.c
index e0c6d792cd7..86f9b1ee70d 100644
--- a/regress/sbin/isakmpd/crypto/cryptotest.c
+++ b/regress/sbin/isakmpd/crypto/cryptotest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cryptotest.c,v 1.1 2005/04/08 17:12:48 cloder Exp $ */
+/* $OpenBSD: cryptotest.c,v 1.2 2016/09/02 16:54:28 mikeb Exp $ */
/* $EOM: cryptotest.c,v 1.5 1998/10/07 16:40:49 niklas Exp $ */
/*
@@ -117,8 +117,6 @@ fail:
int
main (void)
{
- test_crypto (DES_CBC);
-
test_crypto (TRIPLEDES_CBC);
test_crypto (BLOWFISH_CBC);
diff --git a/regress/sbin/isakmpd/hmac/Makefile b/regress/sbin/isakmpd/hmac/Makefile
index a284fab2252..1b2744e306c 100644
--- a/regress/sbin/isakmpd/hmac/Makefile
+++ b/regress/sbin/isakmpd/hmac/Makefile
@@ -1,13 +1,13 @@
-# $OpenBSD: Makefile,v 1.1 2005/04/08 17:12:49 cloder Exp $
+# $OpenBSD: Makefile,v 1.2 2016/09/02 16:54:28 mikeb Exp $
# $EOM: Makefile,v 1.3 1999/02/25 15:14:24 niklas Exp $
# Test HMAC:
PROG= hmactest
-SRCS= hash.c hmactest.c
+SRCS= hash.c hmactest.c conf.c log.c monitor.c util.c
TOPSRC= ${.CURDIR}/../../../../sbin/isakmpd
TOPOBJ!= cd ${TOPSRC}; printf "all:\n\t@pwd\n" |${MAKE} -f-
-OS!= awk '/^OS=/ { print $$2 }' ${.CURDIR}/../../Makefile
+.PATH: ${.CURDIR}/../common
.PATH: ${TOPSRC} ${TOPSRC}/sysdep/openbsd ${TOPOBJ}
CFLAGS+= -I${TOPSRC} -I${TOPSRC}/sysdep/openbsd -I${TOPOBJ} -Wall
NOMAN=
diff --git a/regress/sbin/isakmpd/prf/Makefile b/regress/sbin/isakmpd/prf/Makefile
index 4e078add1ba..116e1a99035 100644
--- a/regress/sbin/isakmpd/prf/Makefile
+++ b/regress/sbin/isakmpd/prf/Makefile
@@ -1,13 +1,13 @@
-# $OpenBSD: Makefile,v 1.1 2005/04/08 17:12:50 cloder Exp $
+# $OpenBSD: Makefile,v 1.2 2016/09/02 16:54:28 mikeb Exp $
# $EOM: Makefile,v 1.6 2000/03/28 21:22:07 ho Exp $
# Test PRF:
PROG= prftest
-SRCS= prf.c hash.c log.c prftest.c conf.c sysdep.c util.c
+SRCS= prf.c hash.c log.c prftest.c conf.c monitor.c util.c
TOPSRC= ${.CURDIR}/../../../../sbin/isakmpd
TOPOBJ!= cd ${TOPSRC}; printf "all:\n\t@pwd\n" |${MAKE} -f-
-OS!= awk '/^OS=/ { print $$2 }' ${.CURDIR}/../../Makefile
+.PATH: ${.CURDIR}/../common
.PATH: ${TOPSRC} ${TOPSRC}/sysdep/openbsd ${TOPOBJ}
CFLAGS+= -I${TOPSRC} -I${TOPSRC}/sysdep/openbsd -I${TOPOBJ} -Wall
NOMAN=
diff --git a/regress/sbin/isakmpd/util/Makefile b/regress/sbin/isakmpd/util/Makefile
index 31a81617536..c73fc400da0 100644
--- a/regress/sbin/isakmpd/util/Makefile
+++ b/regress/sbin/isakmpd/util/Makefile
@@ -1,12 +1,12 @@
-# $OpenBSD: Makefile,v 1.1 2005/04/08 17:12:50 cloder Exp $
+# $OpenBSD: Makefile,v 1.2 2016/09/02 16:54:28 mikeb Exp $
# Test some utility functions
PROG= utiltest
-SRCS= log.c sysdep.c util.c utiltest.c conf.c
+SRCS= log.c util.c utiltest.c conf.c monitor.c
TOPSRC= ${.CURDIR}/../../../../sbin/isakmpd
TOPOBJ!= cd ${TOPSRC}; printf "all:\n\t@pwd\n" |${MAKE} -f-
-OS!= awk '/^OS=/ { print $$2 }' ${.CURDIR}/../../Makefile
+.PATH: ${.CURDIR}/../common
.PATH: ${TOPSRC} ${TOPSRC}/sysdep/openbsd ${TOPOBJ}
CFLAGS+= -I${TOPSRC} -I${TOPSRC}/sysdep/openbsd -I${TOPOBJ} -Wall
NOMAN=
diff --git a/regress/sbin/isakmpd/util/utiltest.c b/regress/sbin/isakmpd/util/utiltest.c
index 54476695663..b0d48b1e971 100644
--- a/regress/sbin/isakmpd/util/utiltest.c
+++ b/regress/sbin/isakmpd/util/utiltest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utiltest.c,v 1.1 2005/04/08 17:12:50 cloder Exp $ */
+/* $OpenBSD: utiltest.c,v 1.2 2016/09/02 16:54:28 mikeb Exp $ */
/*
* Copyright (c) 2001 Niklas Hallqvist. All rights reserved.
@@ -29,8 +29,6 @@
#include <netinet/in.h>
#include <stdio.h>
-#include "sysdep.h"
-
#include "util.h"
int test_1 (char *, char *, int);