diff options
author | Damien Miller <djm@mindrot.org> | 2021-04-03 09:21:08 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2021-04-03 09:21:08 +0200 |
commit | f3ca8af87a4c32ada660da12ae95cf03d190c083 (patch) | |
tree | a29dbc240af3dc5c77119c9dd6691e2d8963a3b6 | |
parent | upstream: typos in comments; GHPR#180 from Vill (diff) | |
download | openssh-f3ca8af87a4c32ada660da12ae95cf03d190c083.tar.xz openssh-f3ca8af87a4c32ada660da12ae95cf03d190c083.zip |
enable authopt and misc unit tests
Neither were wired into the build, both required some build
adaptations for -portable
-rw-r--r-- | Makefile.in | 74 | ||||
-rw-r--r-- | regress/Makefile | 7 | ||||
-rw-r--r-- | regress/unittests/authopt/tests.c | 4 | ||||
-rw-r--r-- | regress/unittests/misc/test_argv.c | 4 | ||||
-rw-r--r-- | regress/unittests/misc/test_convtime.c | 4 | ||||
-rw-r--r-- | regress/unittests/misc/test_expand.c | 4 | ||||
-rw-r--r-- | regress/unittests/misc/test_parse.c | 4 | ||||
-rw-r--r-- | regress/unittests/misc/tests.c | 4 |
8 files changed, 79 insertions, 26 deletions
diff --git a/Makefile.in b/Makefile.in index 15db373d2..dddb2e421 100644 --- a/Makefile.in +++ b/Makefile.in @@ -272,12 +272,8 @@ clean: regressclean rm -f regress/mkdtemp$(EXEEXT) rm -f regress/unittests/test_helper/*.a rm -f regress/unittests/test_helper/*.o - rm -f regress/unittests/sshbuf/*.o - rm -f regress/unittests/sshbuf/test_sshbuf$(EXEEXT) - rm -f regress/unittests/sshkey/*.o - rm -f regress/unittests/sshkey/test_sshkey$(EXEEXT) - rm -f regress/unittests/sshsig/*.o - rm -f regress/unittests/sshsig/test_sshsig$(EXEEXT) + rm -f regress/unittests/authopt/*.o + rm -f regress/unittests/authopt/test_authopt$(EXEEXT) rm -f regress/unittests/bitmap/*.o rm -f regress/unittests/bitmap/test_bitmap$(EXEEXT) rm -f regress/unittests/conversion/*.o @@ -288,6 +284,14 @@ clean: regressclean rm -f regress/unittests/kex/test_kex$(EXEEXT) rm -f regress/unittests/match/*.o rm -f regress/unittests/match/test_match$(EXEEXT) + rm -f regress/unittests/misc/*.o + rm -f regress/unittests/misc/test_misc$(EXEEXT) + rm -f regress/unittests/sshbuf/*.o + rm -f regress/unittests/sshbuf/test_sshbuf$(EXEEXT) + rm -f regress/unittests/sshkey/*.o + rm -f regress/unittests/sshkey/test_sshkey$(EXEEXT) + rm -f regress/unittests/sshsig/*.o + rm -f regress/unittests/sshsig/test_sshsig$(EXEEXT) rm -f regress/unittests/utf8/*.o rm -f regress/unittests/utf8/test_utf8$(EXEEXT) rm -f regress/misc/sk-dummy/*.o @@ -305,12 +309,8 @@ distclean: regressclean rm -f regress/mkdtemp rm -f regress/unittests/test_helper/*.a rm -f regress/unittests/test_helper/*.o - rm -f regress/unittests/sshbuf/*.o - rm -f regress/unittests/sshbuf/test_sshbuf - rm -f regress/unittests/sshkey/*.o - rm -f regress/unittests/sshkey/test_sshkey - rm -f regress/unittests/sshsig/*.o - rm -f regress/unittests/sshsig/test_sshsig + rm -f regress/unittests/authopt/*.o + rm -f regress/unittests/authopt/test_authopt rm -f regress/unittests/bitmap/*.o rm -f regress/unittests/bitmap/test_bitmap rm -f regress/unittests/conversion/*.o @@ -321,6 +321,14 @@ distclean: regressclean rm -f regress/unittests/kex/test_kex rm -f regress/unittests/match/*.o rm -f regress/unittests/match/test_match + rm -f regress/unittests/misc/*.o + rm -f regress/unittests/misc/test_misc + rm -f regress/unittests/sshbuf/*.o + rm -f regress/unittests/sshbuf/test_sshbuf + rm -f regress/unittests/sshkey/*.o + rm -f regress/unittests/sshkey/test_sshkey + rm -f regress/unittests/sshsig/*.o + rm -f regress/unittests/sshsig/test_sshsig rm -f regress/unittests/utf8/*.o rm -f regress/unittests/utf8/test_utf8 (cd openbsd-compat && $(MAKE) distclean) @@ -485,14 +493,16 @@ uninstall: regress-prep: $(MKDIR_P) `pwd`/regress/unittests/test_helper - $(MKDIR_P) `pwd`/regress/unittests/sshbuf - $(MKDIR_P) `pwd`/regress/unittests/sshkey - $(MKDIR_P) `pwd`/regress/unittests/sshsig + $(MKDIR_P) `pwd`/regress/unittests/authopt $(MKDIR_P) `pwd`/regress/unittests/bitmap $(MKDIR_P) `pwd`/regress/unittests/conversion $(MKDIR_P) `pwd`/regress/unittests/hostkeys $(MKDIR_P) `pwd`/regress/unittests/kex $(MKDIR_P) `pwd`/regress/unittests/match + $(MKDIR_P) `pwd`/regress/unittests/misc + $(MKDIR_P) `pwd`/regress/unittests/sshbuf + $(MKDIR_P) `pwd`/regress/unittests/sshkey + $(MKDIR_P) `pwd`/regress/unittests/sshsig $(MKDIR_P) `pwd`/regress/unittests/utf8 $(MKDIR_P) `pwd`/regress/misc/sk-dummy [ -f `pwd`/regress/Makefile ] || \ @@ -578,6 +588,18 @@ regress/unittests/bitmap/test_bitmap$(EXEEXT): ${UNITTESTS_TEST_BITMAP_OBJS} \ regress/unittests/test_helper/libtest_helper.a \ -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS) +UNITTESTS_TEST_AUTHOPT_OBJS=\ + regress/unittests/authopt/tests.o \ + auth-options.o \ + $(SKOBJS) + +regress/unittests/authopt/test_authopt$(EXEEXT): \ + ${UNITTESTS_TEST_AUTHOPT_OBJS} \ + regress/unittests/test_helper/libtest_helper.a libssh.a + $(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_AUTHOPT_OBJS) \ + regress/unittests/test_helper/libtest_helper.a \ + -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS) + UNITTESTS_TEST_CONVERSION_OBJS=\ regress/unittests/conversion/tests.o @@ -621,6 +643,20 @@ regress/unittests/match/test_match$(EXEEXT): \ regress/unittests/test_helper/libtest_helper.a \ -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS) +UNITTESTS_TEST_MISC_OBJS=\ + regress/unittests/misc/tests.o \ + regress/unittests/misc/test_parse.o \ + regress/unittests/misc/test_expand.o \ + regress/unittests/misc/test_convtime.o \ + regress/unittests/misc/test_argv.o + +regress/unittests/misc/test_misc$(EXEEXT): \ + ${UNITTESTS_TEST_MISC_OBJS} \ + regress/unittests/test_helper/libtest_helper.a libssh.a + $(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_MISC_OBJS) \ + regress/unittests/test_helper/libtest_helper.a \ + -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS) + UNITTESTS_TEST_UTF8_OBJS=\ regress/unittests/utf8/tests.o @@ -655,14 +691,16 @@ regress-binaries: regress-prep $(LIBCOMPAT) \ $(SK_DUMMY_LIBRARY) regress-unit-binaries: regress-prep $(REGRESSLIBS) \ - regress/unittests/sshbuf/test_sshbuf$(EXEEXT) \ - regress/unittests/sshkey/test_sshkey$(EXEEXT) \ - regress/unittests/sshsig/test_sshsig$(EXEEXT) \ + regress/unittests/authopt/test_authopt$(EXEEXT) \ regress/unittests/bitmap/test_bitmap$(EXEEXT) \ regress/unittests/conversion/test_conversion$(EXEEXT) \ regress/unittests/hostkeys/test_hostkeys$(EXEEXT) \ regress/unittests/kex/test_kex$(EXEEXT) \ regress/unittests/match/test_match$(EXEEXT) \ + regress/unittests/misc/test_misc$(EXEEXT) \ + regress/unittests/sshbuf/test_sshbuf$(EXEEXT) \ + regress/unittests/sshkey/test_sshkey$(EXEEXT) \ + regress/unittests/sshsig/test_sshsig$(EXEEXT) \ regress/unittests/utf8/test_utf8$(EXEEXT) \ tests: file-tests t-exec interop-tests unit diff --git a/regress/Makefile b/regress/Makefile index 43da7c7db..ced21a11d 100644 --- a/regress/Makefile +++ b/regress/Makefile @@ -249,17 +249,20 @@ unit: V="" ; \ test "x${USE_VALGRIND}" = "x" || \ V=${.CURDIR}/valgrind-unit.sh ; \ - $$V ${.OBJDIR}/unittests/sshbuf/test_sshbuf ; \ - $$V ${.OBJDIR}/unittests/sshkey/test_sshkey \ + $$V ${.OBJDIR}/unittests/sshbuf/test_sshbuf ; \ + $$V ${.OBJDIR}/unittests/sshkey/test_sshkey \ -d ${.CURDIR}/unittests/sshkey/testdata ; \ $$V ${.OBJDIR}/unittests/sshsig/test_sshsig \ -d ${.CURDIR}/unittests/sshsig/testdata ; \ + $$V ${.OBJDIR}/unittests/authopt/test_authopt \ + -d ${.CURDIR}/unittests/authopt/testdata ; \ $$V ${.OBJDIR}/unittests/bitmap/test_bitmap ; \ $$V ${.OBJDIR}/unittests/conversion/test_conversion ; \ $$V ${.OBJDIR}/unittests/kex/test_kex ; \ $$V ${.OBJDIR}/unittests/hostkeys/test_hostkeys \ -d ${.CURDIR}/unittests/hostkeys/testdata ; \ $$V ${.OBJDIR}/unittests/match/test_match ; \ + $$V ${.OBJDIR}/unittests/misc/test_misc ; \ if test "x${TEST_SSH_UTF8}" = "xyes" ; then \ $$V ${.OBJDIR}/unittests/utf8/test_utf8 ; \ fi \ diff --git a/regress/unittests/authopt/tests.c b/regress/unittests/authopt/tests.c index 0e8aacb91..8c51b3802 100644 --- a/regress/unittests/authopt/tests.c +++ b/regress/unittests/authopt/tests.c @@ -6,6 +6,8 @@ * Placed in the public domain */ +#include "includes.h" + #include <sys/types.h> #include <sys/param.h> #include <stdio.h> @@ -13,7 +15,7 @@ #include <stdlib.h> #include <string.h> -#include "test_helper.h" +#include "../test_helper/test_helper.h" #include "sshkey.h" #include "authfile.h" diff --git a/regress/unittests/misc/test_argv.c b/regress/unittests/misc/test_argv.c index 0ce86694d..7a28f64e5 100644 --- a/regress/unittests/misc/test_argv.c +++ b/regress/unittests/misc/test_argv.c @@ -5,6 +5,8 @@ * Placed in the public domain. */ +#include "includes.h" + #include <sys/types.h> #include <sys/param.h> #include <stdio.h> @@ -12,7 +14,7 @@ #include <stdlib.h> #include <string.h> -#include "test_helper.h" +#include "../test_helper/test_helper.h" #include "log.h" #include "misc.h" diff --git a/regress/unittests/misc/test_convtime.c b/regress/unittests/misc/test_convtime.c index 8da05a261..5be3ee43a 100644 --- a/regress/unittests/misc/test_convtime.c +++ b/regress/unittests/misc/test_convtime.c @@ -5,6 +5,8 @@ * Placed in the public domain. */ +#include "includes.h" + #include <sys/types.h> #include <sys/param.h> #include <stdio.h> @@ -12,7 +14,7 @@ #include <stdlib.h> #include <string.h> -#include "test_helper.h" +#include "../test_helper/test_helper.h" #include "log.h" #include "misc.h" diff --git a/regress/unittests/misc/test_expand.c b/regress/unittests/misc/test_expand.c index 2a5e1bf1a..3cfe0e712 100644 --- a/regress/unittests/misc/test_expand.c +++ b/regress/unittests/misc/test_expand.c @@ -5,6 +5,8 @@ * Placed in the public domain. */ +#include "includes.h" + #include <sys/types.h> #include <sys/param.h> #include <stdio.h> @@ -12,7 +14,7 @@ #include <stdlib.h> #include <string.h> -#include "test_helper.h" +#include "../test_helper/test_helper.h" #include "log.h" #include "misc.h" diff --git a/regress/unittests/misc/test_parse.c b/regress/unittests/misc/test_parse.c index 6fa4558e2..dd99068d0 100644 --- a/regress/unittests/misc/test_parse.c +++ b/regress/unittests/misc/test_parse.c @@ -5,6 +5,8 @@ * Placed in the public domain. */ +#include "includes.h" + #include <sys/types.h> #include <sys/param.h> #include <stdio.h> @@ -12,7 +14,7 @@ #include <stdlib.h> #include <string.h> -#include "test_helper.h" +#include "../test_helper/test_helper.h" #include "log.h" #include "misc.h" diff --git a/regress/unittests/misc/tests.c b/regress/unittests/misc/tests.c index fe9544a93..75013f481 100644 --- a/regress/unittests/misc/tests.c +++ b/regress/unittests/misc/tests.c @@ -5,6 +5,8 @@ * Placed in the public domain. */ +#include "includes.h" + #include <sys/types.h> #include <sys/param.h> #include <stdio.h> @@ -12,7 +14,7 @@ #include <stdlib.h> #include <string.h> -#include "test_helper.h" +#include "../test_helper/test_helper.h" #include "log.h" #include "misc.h" |