[openssh-commits] [openssh] 01/03: upstream commit
git+noreply at mindrot.org
git+noreply at mindrot.org
Wed Jan 3 16:49:03 AEDT 2018
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit e6c4134165d05447009437a96e7201276688807f
Author: djm at openbsd.org <djm at openbsd.org>
Date: Thu Dec 21 00:41:22 2017 +0000
upstream commit
unbreak unit tests after removal of src/usr.bin/ssh/lib
OpenBSD-Regress-ID: 3a79760494147b20761cbd2bd5c20e86c63dc8f9
---
regress/unittests/Makefile.inc | 16 +++-------------
regress/unittests/bitmap/Makefile | 6 +++++-
regress/unittests/conversion/Makefile | 7 ++++++-
regress/unittests/hostkeys/Makefile | 15 ++++++++++++++-
regress/unittests/kex/Makefile | 19 ++++++++++++++++++-
regress/unittests/sshbuf/Makefile | 12 ++++++++++--
regress/unittests/sshkey/Makefile | 15 ++++++++++++++-
regress/unittests/sshkey/test_fuzz.c | 6 +++---
regress/unittests/sshkey/test_sshkey.c | 8 ++++----
regress/unittests/utf8/Makefile | 6 +++++-
10 files changed, 82 insertions(+), 28 deletions(-)
diff --git a/regress/unittests/Makefile.inc b/regress/unittests/Makefile.inc
index 36d1ff42..b509f445 100644
--- a/regress/unittests/Makefile.inc
+++ b/regress/unittests/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.11 2017/04/30 23:33:48 djm Exp $
+# $OpenBSD: Makefile.inc,v 1.12 2017/12/21 00:41:22 djm Exp $
.include <bsd.own.mk>
.include <bsd.obj.mk>
@@ -30,8 +30,8 @@ CDIAGFLAGS+= -Wswitch
CDIAGFLAGS+= -Wtrigraphs
CDIAGFLAGS+= -Wuninitialized
CDIAGFLAGS+= -Wunused
+CDIAGFLAGS+= -Wno-unused-parameter
.if ${COMPILER_VERSION:L} != "gcc3"
-CDIAGFLAGS+= -Wpointer-sign
CDIAGFLAGS+= -Wold-style-definition
.endif
@@ -47,17 +47,7 @@ LDADD+=-L${.CURDIR}/../test_helper -ltest_helper
DPADD+=${.CURDIR}/../test_helper/libtest_helper.a
.endif
-.if exists(${.CURDIR}/${SSHREL}/lib/${__objdir})
-LDADD+=-L${.CURDIR}/${SSHREL}/lib/${__objdir} -lssh
-LIBSSH=${.CURDIR}/${SSHREL}/lib/${__objdir}/libssh.a
-.else
-LDADD+=-L${.CURDIR}/${SSHREL}/lib -lssh
-LIBSSH=${.CURDIR}/${SSHREL}/lib/libssh.a
-.endif
-DPADD+=${LIBSSH}
-${PROG}: ${LIBSSH}
-${LIBSSH}:
- cd ${.CURDIR}/${SSHREL} && ${MAKE} lib
+.PATH: ${.CURDIR}/${SSHREL}
LDADD+= -lcrypto
DPADD+= ${LIBCRYPTO}
diff --git a/regress/unittests/bitmap/Makefile b/regress/unittests/bitmap/Makefile
index bd21949f..fe30acc7 100644
--- a/regress/unittests/bitmap/Makefile
+++ b/regress/unittests/bitmap/Makefile
@@ -1,7 +1,11 @@
-# $OpenBSD: Makefile,v 1.3 2016/11/01 13:43:27 tb Exp $
+# $OpenBSD: Makefile,v 1.4 2017/12/21 00:41:22 djm Exp $
PROG=test_bitmap
SRCS=tests.c
+
+# From usr.sbin/ssh
+SRCS+=bitmap.c atomicio.c
+
REGRESS_TARGETS=run-regress-${PROG}
run-regress-${PROG}: ${PROG}
diff --git a/regress/unittests/conversion/Makefile b/regress/unittests/conversion/Makefile
index cde97dc2..8b2a09cc 100644
--- a/regress/unittests/conversion/Makefile
+++ b/regress/unittests/conversion/Makefile
@@ -1,7 +1,12 @@
-# $OpenBSD: Makefile,v 1.1 2017/03/14 01:20:29 dtucker Exp $
+# $OpenBSD: Makefile,v 1.2 2017/12/21 00:41:22 djm Exp $
PROG=test_conversion
SRCS=tests.c
+
+# From usr.bin/ssh
+SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c
+SRCS+=atomicio.c misc.c xmalloc.c log.c uidswap.c cleanup.c fatal.c ssherr.c
+
REGRESS_TARGETS=run-regress-${PROG}
run-regress-${PROG}: ${PROG}
diff --git a/regress/unittests/hostkeys/Makefile b/regress/unittests/hostkeys/Makefile
index ae3c342b..33688512 100644
--- a/regress/unittests/hostkeys/Makefile
+++ b/regress/unittests/hostkeys/Makefile
@@ -1,7 +1,20 @@
-# $OpenBSD: Makefile,v 1.3 2016/11/01 13:43:27 tb Exp $
+# $OpenBSD: Makefile,v 1.4 2017/12/21 00:41:22 djm Exp $
PROG=test_hostkeys
SRCS=tests.c test_iterate.c
+
+# From usr.bin/ssh
+SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c
+SRCS+=atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c ssh-dss.c
+SRCS+=ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c
+SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c
+SRCS+=addrmatch.c bitmap.c hostfile.c
+SRCS+=ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c
+SRCS+=cipher-chachapoly.c chacha.c poly1305.c
+
+SRCS+=digest-openssl.c
+#SRCS+=digest-libc.c
+
REGRESS_TARGETS=run-regress-${PROG}
run-regress-${PROG}: ${PROG}
diff --git a/regress/unittests/kex/Makefile b/regress/unittests/kex/Makefile
index 7ed31267..5c61307a 100644
--- a/regress/unittests/kex/Makefile
+++ b/regress/unittests/kex/Makefile
@@ -1,7 +1,24 @@
-# $OpenBSD: Makefile,v 1.4 2016/11/01 13:43:27 tb Exp $
+# $OpenBSD: Makefile,v 1.5 2017/12/21 00:41:22 djm Exp $
PROG=test_kex
SRCS=tests.c test_kex.c
+
+# From usr.bin/ssh
+SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c
+SRCS+=atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c ssh-dss.c
+SRCS+=ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c
+SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c
+SRCS+=addrmatch.c bitmap.c packet.c dispatch.c canohost.c ssh_api.c
+SRCS+=kex.c kexc25519.c kexc25519c.c kexc25519s.c kexdh.c kexdhc.c kexdhs.c
+SRCS+=kexecdh.c kexecdhc.c kexecdhs.c kexgex.c kexgexc.c kexgexs.c
+SRCS+=dh.c compat.c
+SRCS+=ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c
+SRCS+=cipher-chachapoly.c chacha.c poly1305.c
+SRCS+=smult_curve25519_ref.c
+
+SRCS+=digest-openssl.c
+#SRCS+=digest-libc.c
+
REGRESS_TARGETS=run-regress-${PROG}
run-regress-${PROG}: ${PROG}
diff --git a/regress/unittests/sshbuf/Makefile b/regress/unittests/sshbuf/Makefile
index 69b27566..81d4f27a 100644
--- a/regress/unittests/sshbuf/Makefile
+++ b/regress/unittests/sshbuf/Makefile
@@ -1,4 +1,6 @@
-# $OpenBSD: Makefile,v 1.5 2016/11/01 13:43:27 tb Exp $
+# $OpenBSD: Makefile,v 1.6 2017/12/21 00:41:22 djm Exp $
+
+.include <bsd.regress.mk>
PROG=test_sshbuf
SRCS=tests.c
@@ -10,5 +12,11 @@ SRCS+=test_sshbuf_fuzz.c
SRCS+=test_sshbuf_getput_fuzz.c
SRCS+=test_sshbuf_fixed.c
-.include <bsd.regress.mk>
+# From usr.bin/ssh
+SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c
+SRCS+=atomicio.c
+
+run-regress-${PROG}: ${PROG}
+ env ${TEST_ENV} ./${PROG}
+
diff --git a/regress/unittests/sshkey/Makefile b/regress/unittests/sshkey/Makefile
index cfbfcf8f..1c940bec 100644
--- a/regress/unittests/sshkey/Makefile
+++ b/regress/unittests/sshkey/Makefile
@@ -1,7 +1,20 @@
-# $OpenBSD: Makefile,v 1.4 2016/11/01 13:43:27 tb Exp $
+# $OpenBSD: Makefile,v 1.5 2017/12/21 00:41:22 djm Exp $
PROG=test_sshkey
SRCS=tests.c test_sshkey.c test_file.c test_fuzz.c common.c
+
+# From usr.bin/ssh
+SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c
+SRCS+=atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c ssh-dss.c
+SRCS+=ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c
+SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c
+SRCS+=addrmatch.c bitmap.c
+SRCS+=ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c
+SRCS+=cipher-chachapoly.c chacha.c poly1305.c
+
+SRCS+=digest-openssl.c
+#SRCS+=digest-libc.c
+
REGRESS_TARGETS=run-regress-${PROG}
run-regress-${PROG}: ${PROG}
diff --git a/regress/unittests/sshkey/test_fuzz.c b/regress/unittests/sshkey/test_fuzz.c
index 6706045d..d3b0c92b 100644
--- a/regress/unittests/sshkey/test_fuzz.c
+++ b/regress/unittests/sshkey/test_fuzz.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: test_fuzz.c,v 1.7 2017/04/30 23:33:48 djm Exp $ */
+/* $OpenBSD: test_fuzz.c,v 1.8 2017/12/21 00:41:22 djm Exp $ */
/*
* Fuzz tests for key parsing
*
@@ -83,7 +83,7 @@ sig_fuzz(struct sshkey *k, const char *sig_alg)
fuzz = fuzz_begin(FUZZ_1_BIT_FLIP | /* too slow FUZZ_2_BIT_FLIP | */
FUZZ_1_BYTE_FLIP | FUZZ_2_BYTE_FLIP |
FUZZ_TRUNCATE_START | FUZZ_TRUNCATE_END, sig, l);
- ASSERT_INT_EQ(sshkey_verify(k, sig, l, c, sizeof(c), 0), 0);
+ ASSERT_INT_EQ(sshkey_verify(k, sig, l, c, sizeof(c), NULL, 0), 0);
free(sig);
TEST_ONERROR(onerror, fuzz);
for(; !fuzz_done(fuzz); fuzz_next(fuzz)) {
@@ -91,7 +91,7 @@ sig_fuzz(struct sshkey *k, const char *sig_alg)
if (fuzz_matches_original(fuzz))
continue;
ASSERT_INT_NE(sshkey_verify(k, fuzz_ptr(fuzz), fuzz_len(fuzz),
- c, sizeof(c), 0), 0);
+ c, sizeof(c), NULL, 0), 0);
}
fuzz_cleanup(fuzz);
}
diff --git a/regress/unittests/sshkey/test_sshkey.c b/regress/unittests/sshkey/test_sshkey.c
index 0a73322a..1aa608f9 100644
--- a/regress/unittests/sshkey/test_sshkey.c
+++ b/regress/unittests/sshkey/test_sshkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: test_sshkey.c,v 1.12 2017/05/08 06:08:42 djm Exp $ */
+/* $OpenBSD: test_sshkey.c,v 1.13 2017/12/21 00:41:22 djm Exp $ */
/*
* Regress test for sshkey.h key management API
*
@@ -121,11 +121,11 @@ signature_test(struct sshkey *k, struct sshkey *bad, const char *sig_alg,
ASSERT_INT_EQ(sshkey_sign(k, &sig, &len, d, l, sig_alg, 0), 0);
ASSERT_SIZE_T_GT(len, 8);
ASSERT_PTR_NE(sig, NULL);
- ASSERT_INT_EQ(sshkey_verify(k, sig, len, d, l, 0), 0);
- ASSERT_INT_NE(sshkey_verify(bad, sig, len, d, l, 0), 0);
+ ASSERT_INT_EQ(sshkey_verify(k, sig, len, d, l, NULL, 0), 0);
+ ASSERT_INT_NE(sshkey_verify(bad, sig, len, d, l, NULL, 0), 0);
/* Fuzz test is more comprehensive, this is just a smoke test */
sig[len - 5] ^= 0x10;
- ASSERT_INT_NE(sshkey_verify(k, sig, len, d, l, 0), 0);
+ ASSERT_INT_NE(sshkey_verify(k, sig, len, d, l, NULL, 0), 0);
free(sig);
}
diff --git a/regress/unittests/utf8/Makefile b/regress/unittests/utf8/Makefile
index a975264f..f8eec048 100644
--- a/regress/unittests/utf8/Makefile
+++ b/regress/unittests/utf8/Makefile
@@ -1,7 +1,11 @@
-# $OpenBSD: Makefile,v 1.4 2016/11/01 13:43:27 tb Exp $
+# $OpenBSD: Makefile,v 1.5 2017/12/21 00:41:22 djm Exp $
PROG=test_utf8
SRCS=tests.c
+
+# From usr.bin/ssh
+SRCS+=utf8.c atomicio.c
+
REGRESS_TARGETS=run-regress-${PROG}
run-regress-${PROG}: ${PROG}
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list