Import Upstream version 1.1~pre12
This commit is contained in:
parent
1813f3157e
commit
aa10d88732
134 changed files with 8673 additions and 4989 deletions
|
|
@ -4,6 +4,7 @@ TESTS = \
|
|||
executables.test \
|
||||
import-export.test \
|
||||
invite-join.test \
|
||||
invite-tinc-up.test \
|
||||
ns-ping.test \
|
||||
ping.test \
|
||||
sptps-basic.test \
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
|
@ -14,7 +14,17 @@
|
|||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
|
|
@ -79,19 +89,18 @@ build_triplet = @build@
|
|||
host_triplet = @host@
|
||||
check_PROGRAMS = pong$(EXEEXT)
|
||||
subdir = test
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(dist_check_SCRIPTS) $(top_srcdir)/depcomp \
|
||||
$(top_srcdir)/test-driver
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/attribute.m4 \
|
||||
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
||||
$(top_srcdir)/m4/ax_check_link_flag.m4 \
|
||||
$(top_srcdir)/m4/curses.m4 $(top_srcdir)/m4/libgcrypt.m4 \
|
||||
$(top_srcdir)/m4/lzo.m4 $(top_srcdir)/m4/openssl.m4 \
|
||||
$(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/zlib.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
$(top_srcdir)/m4/lzo.m4 $(top_srcdir)/m4/miniupnpc.m4 \
|
||||
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/readline.m4 \
|
||||
$(top_srcdir)/m4/zlib.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(dist_check_SCRIPTS) \
|
||||
$(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
|
|
@ -111,7 +120,7 @@ AM_V_at = $(am__v_at_@AM_V@)
|
|||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
DEFAULT_INCLUDES =
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
|
|
@ -355,6 +364,8 @@ am__set_b = \
|
|||
*) \
|
||||
b='$*';; \
|
||||
esac
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
|
||||
$(top_srcdir)/test-driver
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
|
|
@ -389,6 +400,7 @@ LIBS = @LIBS@
|
|||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MINIUPNPC_LIBS = @MINIUPNPC_LIBS@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
|
|
@ -446,10 +458,12 @@ pdfdir = @pdfdir@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
systemd_path = @systemd_path@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
|
|
@ -460,6 +474,7 @@ TESTS = \
|
|||
executables.test \
|
||||
import-export.test \
|
||||
invite-join.test \
|
||||
invite-tinc-up.test \
|
||||
ns-ping.test \
|
||||
ping.test \
|
||||
sptps-basic.test \
|
||||
|
|
@ -484,7 +499,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
|||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu test/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
|
|
@ -616,7 +630,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
|
|||
if test -n "$$am__remaking_logs"; then \
|
||||
echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
|
||||
"recursion detected" >&2; \
|
||||
else \
|
||||
elif test -n "$$redo_logs"; then \
|
||||
am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
|
||||
fi; \
|
||||
if $(am__make_dryrun); then :; else \
|
||||
|
|
@ -896,6 +910,8 @@ uninstall-am:
|
|||
mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
|
||||
recheck tags tags-am uninstall uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
clean-local:
|
||||
-for pid in *.test.?/pid; do ../src/tinc --pidfile="$$pid" stop; done
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ $tinc $c1 invite bar | $tinc $c2 join
|
|||
# Test equivalence of host config files
|
||||
|
||||
cmp $d1/hosts/foo $d2/hosts/foo
|
||||
test "`grep ^ECDSAPublicKey $d1/hosts/bar`" = "`grep ^ECDSAPublicKey $d2/hosts/bar`"
|
||||
test "`grep ^Ed25519PublicKey $d1/hosts/bar`" = "`grep ^Ed25519PublicKey $d2/hosts/bar`"
|
||||
|
||||
# Test Mode, Broadcast and ConnectTo statements
|
||||
|
||||
|
|
|
|||
51
test/invite-tinc-up.test
Executable file
51
test/invite-tinc-up.test
Executable file
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/sh
|
||||
|
||||
. ./testlib.sh
|
||||
|
||||
# Initialize one node
|
||||
|
||||
$tinc $c1 <<EOF
|
||||
init foo
|
||||
set DeviceType dummy
|
||||
set Address localhost
|
||||
set Port 32751
|
||||
start $r1
|
||||
EOF
|
||||
|
||||
# Generate an invitation and let another node join the VPN
|
||||
|
||||
sleep 1
|
||||
|
||||
cat >$d1/invitation-created <<EOF
|
||||
#!/bin/sh
|
||||
echo Name = \$NODE >\$INVITATION_FILE
|
||||
echo Ifconfig = 93.184.216.34/24 >>\$INVITATION_FILE
|
||||
echo Route = 2606:2800:220:1::/64 2606:2800:220:1:248:1893:25c8:1946 >>\$INVITATION_FILE
|
||||
echo Route = 1.2.3.4 1234:: >>\$INVITATION_FILE
|
||||
$tinc $c1 export >>\$INVITATION_FILE
|
||||
EOF
|
||||
|
||||
chmod u+x $d1/invitation-created
|
||||
|
||||
$tinc $c1 invite bar | $tinc $c2 --batch join
|
||||
|
||||
# Test equivalence of host config files
|
||||
|
||||
cmp $d1/hosts/foo $d2/hosts/foo
|
||||
test "`grep ^Ed25519PublicKey $d1/hosts/bar`" = "`grep ^Ed25519PublicKey $d2/hosts/bar`"
|
||||
|
||||
# Check if the tinc-up.invitation file is created and contains the right commands
|
||||
|
||||
test -f $d2/tinc-up.invitation
|
||||
|
||||
fgrep -q "93.184.216.34/24" $d2/tinc-up.invitation
|
||||
fgrep -q "2606:2800:220:1::/64" $d2/tinc-up.invitation
|
||||
fgrep -q "2606:2800:220:1:248:1893:25c8:1946" $d2/tinc-up.invitation
|
||||
fgrep -q "1234::" $d2/tinc-up.invitation && exit 1
|
||||
|
||||
# Check that no tinc-up is created and that tinc-up.invitation is not executable
|
||||
|
||||
test -x $d2/tinc-up.invitation && exit 1
|
||||
test -f $d2/tinc-up && exit 1
|
||||
|
||||
$tinc $c1 stop
|
||||
|
|
@ -38,7 +38,6 @@ $tinc $c1 add Subnet 2
|
|||
$tinc $c1 add Subnet 3
|
||||
test "`$tinc $c1 get Subnet`" = "1
|
||||
2
|
||||
2
|
||||
3"
|
||||
$tinc $c1 del Subnet 2
|
||||
test "`$tinc $c1 get Subnet`" = "1
|
||||
|
|
@ -65,7 +64,6 @@ $tinc $c1 add bar.Subnet 2
|
|||
$tinc $c1 add bar.Subnet 3
|
||||
test "`$tinc $c1 get bar.Subnet`" = "1
|
||||
2
|
||||
2
|
||||
3"
|
||||
$tinc $c1 del bar.Subnet 2
|
||||
test "`$tinc $c1 get bar.Subnet`" = "1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue