From patchwork Wed Feb 8 00:18:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 3060 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp4396736dyk; Tue, 7 Feb 2023 16:19:22 -0800 (PST) X-Google-Smtp-Source: AK7set/ZBl//bD9Uoe3T5sD0eJvJrMUj60f1+xw6bXH/wlBKdyM/D4z6dGsKYoqJzRA1WMqfhN7m X-Received: by 2002:aa7:9603:0:b0:593:6a2e:b96b with SMTP id q3-20020aa79603000000b005936a2eb96bmr5259028pfg.8.1675815562347; Tue, 07 Feb 2023 16:19:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675815562; cv=none; d=google.com; s=arc-20160816; b=DZrt+WDa2MYbpkFtiNvipIXAMlP4PEzLf7bapMXWlQn001ZPy7JmD7ZEiBVILj9+eZ dsMPEXbmF80et73dzfaQmQCsDEvhsDoTcQ7cmwzdWtTQb4pAiB9yZmF+dkoONDcXJuwI xk07ssp1Fu/DeXbilH6itgxwnqVxZE/FtQfkPB7Jsh8PkaicP2/i74ykcT/tEctiy3pN rrqfksQx/gpv/eRtue/s830jFqsZSodhnpLyGlL64Ry/xtJwyO6f4vMmv7vy69zpX/nv u7qBHz1LI4bYgtmYK/Ovkx6GbGVNzUlMN1rC9WUAFUs2sG2ZUVFeE04JMqSyNNUFWEJ3 E7zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature; bh=AOGuZrLYW6Jo80AoUZCTErOcpFrKpg1rvMGruRaJFjI=; b=AXf0SsHWYFsdxn6+LOFMvvpydVr+y2SXEb49gpdR4pnHgCJ4uTTBLcSLulpYC2Becv HybS/KYVISl/W761qkgo9TlSwshiQfLk/UnwJ1pxSqGOBCAzWkU3yC2QQPcdaxMuwunG Rfo5T8Q8tfy6K8RzvMvy3z1dOLLRSK/3mOoSShNHjz4sXhKVKmLkPrwqQ/3bY8m240Nm Bwm5hMxW1/rP6jgQIu9NUvDjJJ6d9Viq6vC7hkOF3h/DbCcsHsc8+wqn98gb2w1RCzIv /d+7mZE1QzKA7WVHFdeUKPZ0vVf0hI+R8/JaxoZ6hXC4pMUhVPuvbgifO6huR35n61Y/ vOfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=MTp6V2gG; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=JE9xG6NR; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id c22-20020a621c16000000b005989f8de851si13312618pfc.149.2023.02.07.16.19.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2023 16:19:22 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=MTp6V2gG; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=JE9xG6NR; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1pPYAS-0008D8-CN; Wed, 08 Feb 2023 00:18:30 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pPYAQ-0008D2-G8 for openvpn-devel@lists.sourceforge.net; Wed, 08 Feb 2023 00:18:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=a0Numwa+XCL6xvo/hNFyDu+amPkruHOUm/RNdPmTT70=; b=MTp6V2gGU6cSW38+3YRNImvwgG /z6YTk++81ZJ8tLxFddJmkgN+r6fY0y2MTtOkZPAprks5aQLiz1vA3zKJTYM1VUPKqFlaEQq+pErW A68xNPAtaklZM7BxkG+3A4j8GdJU5962nzSM0GoKMe9GkvWr96M9Ppag018Iofr49zvo=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=a0Numwa+XCL6xvo/hNFyDu+amPkruHOUm/RNdPmTT70=; b=JE9xG6NRsyl12kukmsSwCMdug2 5IsDn2mKswqOePMw8obGM8jEQ9iCf5JvIcdwll53wdU2hJzGJJ3Wdlkcg0q8XqFKUd7Vq8hJH2JJE jb0sWCW1rxpNJyyq0Rqn5hcJbBbHoaN6xmWvOW2+whH0PAIzMz/vPkw/j3PwZtv/+bYA=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pPYAN-00E953-94 for openvpn-devel@lists.sourceforge.net; Wed, 08 Feb 2023 00:18:29 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1pPYAF-000FIe-Uo; Wed, 08 Feb 2023 01:18:19 +0100 Received: (nullmailer pid 244743 invoked by uid 10006); Wed, 08 Feb 2023 00:18:19 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Wed, 8 Feb 2023 01:18:15 +0100 Message-Id: <20230208001819.244694-2-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230208001819.244694-1-arne@rfc2549.org> References: <20230208001819.244694-1-arne@rfc2549.org> MIME-Version: 1.0 X-Spam-Score: 0.3 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Selva Nair - Eliminates repeated warnings such as warning: source file '$(openvpn_srcdir)/env_set.c' is in a subdirectory, but option 'subdir-objects' is disabled - Enabled only for automake >= 1.16 as older ver [...] Content analysis details: (0.3 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Headers-End: 1pPYAN-00E953-94 Subject: [Openvpn-devel] [PATCH 1/5] Conditionally add subdir-objects option to automake X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1757219979412959702?= X-GMAIL-MSGID: =?utf-8?q?1757219979412959702?= From: Selva Nair - Eliminates repeated warnings such as warning: source file '$(openvpn_srcdir)/env_set.c' is in a subdirectory, but option 'subdir-objects' is disabled - Enabled only for automake >= 1.16 as older versions have a buggy implementation of this option Main side effect of this option is that object files like openvpnserv-blockdns.o are now created in src/openvpn where block-dns.c resides instead of in src/openvpnserv. Same for object files for sources from $(openvpn_srcdir) compiled into test executables. See also past discussion on this topic: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg00013.html Signed-off-by: Selva Nair Signed-off-by: Arne Schwabe --- configure.ac | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 915000870..95d795c33 100644 --- a/configure.ac +++ b/configure.ac @@ -54,9 +54,22 @@ m4_define([serial_tests], [ awk '{split ($NF,a,"."); if (a[1] == 1 && a[2] >= 12) { print "serial-tests" }}' ]) ]) + +dnl Automake 1.14+ warns if sources are in sub-directories but subdir-objects +dnl options is not enabled. However, automake before 1.15a has a bug that causes +dnl variable expansion to fail in foo_SOURCES when this option is used. +dnl As most of our build systems are now likely to use automake 1.16+ add a +dnl work around to conditionally add subdir-objects option. +m4_define([subdir_objects], [ + m4_esyscmd([automake --version | + head -1 | + awk '{split ($NF,a,"."); if (a[1] == 1 && a[2] >= 16) { print "subdir-objects" }}' + ]) +]) + # This foreign option prevents autoreconf from overriding our COPYING and # INSTALL targets: -AM_INIT_AUTOMAKE(foreign serial_tests 1.9) dnl NB: Do not [quote] this parameter. +AM_INIT_AUTOMAKE(foreign serial_tests subdir_objects 1.9) dnl NB: Do not [quote] this parameter. AC_CANONICAL_HOST AC_USE_SYSTEM_EXTENSIONS From patchwork Wed Feb 8 00:18:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 3061 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp4396745dyk; Tue, 7 Feb 2023 16:19:22 -0800 (PST) X-Google-Smtp-Source: AK7set/9ZNoyATy096GXgx4wT8BVwY26x8mPhW2NSyIr5K7gqFOxauwd71tc86XjdgcJVAJdzDqK X-Received: by 2002:a62:1a88:0:b0:5a2:d1d9:a2ee with SMTP id a130-20020a621a88000000b005a2d1d9a2eemr3937791pfa.12.1675815562752; Tue, 07 Feb 2023 16:19:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675815562; cv=none; d=google.com; s=arc-20160816; b=dLwZ5fMO9i8jfWd1KIdvkvnlw9BUC1+6PqasltJXJ91ZKSyFCiFP/wSl/lA7ECv0yC 1/YB0/Lb4Svo/gqBlTDULjbLGewQ5cg2iIUJpTfZVu9cPy1osqe7xnFgv5TBZqs7+Qbw bJNaX88XS/EHomYuieg45ep20SnmaDSB48I904/z/xQ/pe7j2DHHbkO6qg0VttV3E9Hl eHyh7A34qmSfS/SvmWbPk4sd4RIA73Lm0Id6VqT+Sq73T5fAUfg+MQDu7BNNJCm4fVW+ ZfP/B+tsUeyfItlwnAytJ7O6OAFifTxu5JCFb8dVr3/AQKa9nFLIPvzGVJ0VXf38/xJ+ qA8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature; bh=CDGHhA/nUaAxWru5GawBx8/yGAsxLE3P8IyNWKA8U/k=; b=NoUkdQZSIvCmCUlYPHt4wQ+GbRIv74kxyfoKlR2mdnTWealoCinOkeFci9LcYaJTry IlDgmYc6yPABbCB55ZU0SHoUYRQLkDXScWkZKhjw9Bo1dbgkPbEvASu36xmpizQFd4rH 8WMS13ldvN7o79+pmZi6zwY4+NneJQDrvoCnDqBHwfk8tvBPoSMXt7jt/suYN/Bcy7hk 57MUkP6egW+IDjgeh29kT3QU6RDNF3201YslYNxgna0nKIBacfCpTZ9Q6FF3bmNv4hII qGT1bXZUxbuYLTzeS1R4B4+ZP/os9NiFS6iKA2IFzdg4p/b6YGmBwvN8r69AJp2CA3Xi wlbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=k4yCJXI5; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=bgxBZ8Ez; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id r6-20020a056a00216600b0058e0b9c90casi14896307pff.236.2023.02.07.16.19.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2023 16:19:22 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=k4yCJXI5; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=bgxBZ8Ez; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1pPYAY-00065J-Uh; Wed, 08 Feb 2023 00:18:38 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pPYAX-000658-1m for openvpn-devel@lists.sourceforge.net; Wed, 08 Feb 2023 00:18:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=G2Z1GeQkcjbvPs52bmDOkx9842nWd0mSde8J5p22fqM=; b=k4yCJXI5nB/U+dn1IQ45tOm273 s0mdQ0ciSiVE8PRq6CRXDn0YHL6UmjOg73ZJrxNHPmxcEXJ4zWbvMp6iflizb804tm+toXghY1BQx 7Z5CL3nvLDY9LiFmShJsVKkUqSOahLiZ0O2B4qlmjaYcf1tHX+nrvH0ZVjKJmMv9iTM8=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=G2Z1GeQkcjbvPs52bmDOkx9842nWd0mSde8J5p22fqM=; b=bgxBZ8Ez7LmdhovTrHBeYFUgJ1 GBjz9GZWI7IdSfTGHOmjYFPYRfk6Pgd7I7oVhngqpnu/vvBYIvezTxVxbxAiyXsAZnd5ppKF/hsxd LcDnx7VQ4/kypK5yo1wRQ7Wz5dytoL2PxfuGcPZq88viE943pWry56TM82do73EONljI=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pPYAU-0001FC-Fq for openvpn-devel@lists.sourceforge.net; Wed, 08 Feb 2023 00:18:36 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1pPYAF-000FIg-VS; Wed, 08 Feb 2023 01:18:19 +0100 Received: (nullmailer pid 244746 invoked by uid 10006); Wed, 08 Feb 2023 00:18:19 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Wed, 8 Feb 2023 01:18:16 +0100 Message-Id: <20230208001819.244694-3-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230208001819.244694-1-arne@rfc2549.org> References: <20230208001819.244694-1-arne@rfc2549.org> MIME-Version: 1.0 X-Spam-Score: 0.3 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Selva Nair - Minor changes to the build system to include some dependencies for Windows build - test_tls_crypt not built as it will pull in win32.c and its dependencies Content analysis details: (0.3 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Headers-End: 1pPYAU-0001FC-Fq Subject: [Openvpn-devel] [PATCH v2 2/5] Build unit tests in mingw Windows build X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1757219979451623019?= X-GMAIL-MSGID: =?utf-8?q?1757219979451623019?= From: Selva Nair - Minor changes to the build system to include some dependencies for Windows build - test_tls_crypt not built as it will pull in win32.c and its dependencies - If cross-compiling, "make check" will only build the tests but not run any. Copy to Windows and run manually. Executables are in /tests/unit_tests/openvpn/.libs/ and these depend on cmocka.dll in addition to openssl libs that some tests link to. Building with mingw on Windows should run the tests (untested). v2: networking_testdriver was mistakenly enabled to run, while originally it was only set to build. Corrected. Signed-off-by: Selva Nair Signed-off-by: Arne Schwabe --- configure.ac | 2 ++ tests/Makefile.am | 3 +++ tests/unit_tests/example_test/Makefile.am | 2 ++ tests/unit_tests/openvpn/Makefile.am | 28 +++++++++++++++++++---- 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 95d795c33..66ba6f38d 100644 --- a/configure.ac +++ b/configure.ac @@ -364,6 +364,8 @@ case "$host" in ;; esac +AM_CONDITIONAL([CROSS_COMPILING], test "${cross_compiling}" = "yes") + PKG_PROG_PKG_CONFIG AC_PROG_CPP AC_PROG_INSTALL diff --git a/tests/Makefile.am b/tests/Makefile.am index 87dd7e17b..175a4eef6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -14,10 +14,13 @@ MAINTAINERCLEANFILES = \ SUBDIRS = unit_tests +if !WIN32 test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh +test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh t_connection.sh if HAVE_SITNL test_scripts += t_net.sh endif +endif TESTS_ENVIRONMENT = top_srcdir="$(top_srcdir)" TESTS = $(test_scripts) diff --git a/tests/unit_tests/example_test/Makefile.am b/tests/unit_tests/example_test/Makefile.am index 04a5ad356..24eb0ba18 100644 --- a/tests/unit_tests/example_test/Makefile.am +++ b/tests/unit_tests/example_test/Makefile.am @@ -2,7 +2,9 @@ AUTOMAKE_OPTIONS = foreign check_PROGRAMS = example_testdriver example2_testdriver +if !CROSS_COMPILING TESTS = $(check_PROGRAMS) +endif example_testdriver_CFLAGS = @TEST_CFLAGS@ example_testdriver_LDFLAGS = @TEST_LDFLAGS@ diff --git a/tests/unit_tests/openvpn/Makefile.am b/tests/unit_tests/openvpn/Makefile.am index 7720a85db..8d2386e08 100644 --- a/tests/unit_tests/openvpn/Makefile.am +++ b/tests/unit_tests/openvpn/Makefile.am @@ -7,14 +7,22 @@ test_binaries += argv_testdriver buffer_testdriver endif test_binaries += crypto_testdriver packet_id_testdriver auth_token_testdriver ncp_testdriver misc_testdriver \ - pkt_testdriver + pkt_testdriver if HAVE_LD_WRAP_SUPPORT +if !WIN32 test_binaries += tls_crypt_testdriver endif +endif test_binaries += provider_testdriver +if WIN32 +LDADD = -lws2_32 +endif + +if !CROSS_COMPILING TESTS = $(test_binaries) +endif check_PROGRAMS = $(test_binaries) if HAVE_SITNL @@ -31,12 +39,14 @@ argv_testdriver_SOURCES = test_argv.c mock_msg.c mock_msg.h \ mock_get_random.c \ $(openvpn_srcdir)/platform.c \ $(openvpn_srcdir)/buffer.c \ + $(openvpn_srcdir)/win32-util.c \ $(openvpn_srcdir)/argv.c buffer_testdriver_CFLAGS = @TEST_CFLAGS@ -I$(openvpn_srcdir) -I$(compat_srcdir) buffer_testdriver_LDFLAGS = @TEST_LDFLAGS@ -L$(openvpn_srcdir) -Wl,--wrap=parse_line buffer_testdriver_SOURCES = test_buffer.c mock_msg.c mock_msg.h \ mock_get_random.c \ + $(openvpn_srcdir)/win32-util.c \ $(openvpn_srcdir)/platform.c crypto_testdriver_CFLAGS = @TEST_CFLAGS@ \ @@ -51,6 +61,7 @@ crypto_testdriver_SOURCES = test_crypto.c mock_msg.c mock_msg.h \ $(openvpn_srcdir)/packet_id.c \ $(openvpn_srcdir)/platform.c \ $(openvpn_srcdir)/mtu.c \ + $(openvpn_srcdir)/win32-util.c \ $(openvpn_srcdir)/mss.c packet_id_testdriver_CFLAGS = @TEST_CFLAGS@ \ @@ -63,14 +74,14 @@ packet_id_testdriver_SOURCES = test_packet_id.c mock_msg.c mock_msg.h \ $(openvpn_srcdir)/packet_id.c \ $(openvpn_srcdir)/platform.c \ $(openvpn_srcdir)/reliable.c \ + $(openvpn_srcdir)/win32-util.c \ $(openvpn_srcdir)/session_id.c - pkt_testdriver_CFLAGS = @TEST_CFLAGS@ \ -I$(openvpn_includedir) -I$(compat_srcdir) -I$(openvpn_srcdir) pkt_testdriver_LDFLAGS = @TEST_LDFLAGS@ pkt_testdriver_SOURCES = test_pkt.c mock_msg.c mock_msg.h \ -$(openvpn_srcdir)/argv.c \ + $(openvpn_srcdir)/argv.c \ $(openvpn_srcdir)/base64.c \ $(openvpn_srcdir)/buffer.c \ $(openvpn_srcdir)/crypto.c \ @@ -84,9 +95,10 @@ $(openvpn_srcdir)/argv.c \ $(openvpn_srcdir)/run_command.c \ $(openvpn_srcdir)/session_id.c \ $(openvpn_srcdir)/ssl_pkt.c \ + $(openvpn_srcdir)/win32-util.c \ $(openvpn_srcdir)/tls_crypt.c - +if !WIN32 tls_crypt_testdriver_CFLAGS = @TEST_CFLAGS@ \ -I$(openvpn_includedir) -I$(compat_srcdir) -I$(openvpn_srcdir) tls_crypt_testdriver_LDFLAGS = @TEST_LDFLAGS@ \ @@ -106,6 +118,7 @@ tls_crypt_testdriver_SOURCES = test_tls_crypt.c mock_msg.c mock_msg.h \ $(openvpn_srcdir)/packet_id.c \ $(openvpn_srcdir)/platform.c \ $(openvpn_srcdir)/run_command.c +endif if HAVE_SITNL networking_testdriver_CFLAGS = @TEST_CFLAGS@ \ @@ -136,6 +149,7 @@ provider_testdriver_SOURCES = test_provider.c mock_msg.c \ $(openvpn_srcdir)/buffer.c \ $(openvpn_srcdir)/base64.c \ mock_get_random.c \ + $(openvpn_srcdir)/win32-util.c \ $(openvpn_srcdir)/platform.c auth_token_testdriver_CFLAGS = @TEST_CFLAGS@ \ @@ -152,6 +166,7 @@ auth_token_testdriver_SOURCES = test_auth_token.c mock_msg.c \ $(openvpn_srcdir)/otime.c \ $(openvpn_srcdir)/packet_id.c \ $(openvpn_srcdir)/platform.c \ + $(openvpn_srcdir)/win32-util.c \ $(openvpn_srcdir)/base64.c @@ -169,6 +184,8 @@ ncp_testdriver_SOURCES = test_ncp.c mock_msg.c \ $(openvpn_srcdir)/otime.c \ $(openvpn_srcdir)/packet_id.c \ $(openvpn_srcdir)/platform.c \ + $(openvpn_srcdir)/win32-util.c \ + $(compat_srcdir)/compat-strsep.c \ $(openvpn_srcdir)/ssl_util.c misc_testdriver_CFLAGS = @TEST_CFLAGS@ \ @@ -177,8 +194,9 @@ misc_testdriver_CFLAGS = @TEST_CFLAGS@ \ misc_testdriver_LDFLAGS = @TEST_LDFLAGS@ misc_testdriver_SOURCES = test_misc.c mock_msg.c \ - mock_get_random.c \ + mock_get_random.c \ $(openvpn_srcdir)/buffer.c \ $(openvpn_srcdir)/options_util.c \ $(openvpn_srcdir)/ssl_util.c \ + $(openvpn_srcdir)/win32-util.c \ $(openvpn_srcdir)/platform.c From patchwork Wed Feb 8 00:18:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 3059 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp4396712dyk; Tue, 7 Feb 2023 16:19:20 -0800 (PST) X-Google-Smtp-Source: AK7set+ZtBVhXzAgPgTQmwPyGADqMu2SRn/d1p/uxh5HgpMdeuWxLQ4kScp28/xV3XFfqRTcIsmv X-Received: by 2002:a62:19d1:0:b0:592:5d2b:48ee with SMTP id 200-20020a6219d1000000b005925d2b48eemr4877884pfz.1.1675815560591; Tue, 07 Feb 2023 16:19:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675815560; cv=none; d=google.com; s=arc-20160816; b=lKHgb271HPV0Aoj0Cwz3Up3fGw8yvD3Ad8B/A+Di8Rx4oQr3QYWfnUb/ngnW4i1Geg sRVnuTKSpLyOFjVAllc/ZPjxqZPF6qgMg3ONALk6DgcpJXesBYiT1+0VYpbVBdCZMf0M 3heTMo3cTK3nG3A+oAI+PwLTgFPOyd7nqBysAYdkHJWt9NMsQXmETq6/JZ7ifI9GfcBl QqOAG4kc1UIvyOgELtJmR2BFZPP3qIzaeUV7dHUFuaV7TJbx8GX6tDbB+VUmCrugF3GQ gqV4d7AoVZdMPU0N8YcyDfn3h9nNj17/BTETX/2p/CQUBCFpsed08/p0bE9Z8Z/QLG3c IBYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature; bh=6btkGpq0hjA2slaTZ9anVlB/tWhVND2KCshFNiYYCjI=; b=v1l0mqgUGszOXpXZucw2eL4yE9stYSp2qP8ndFTUWK1xK6zjUFIx9tKvR33ysXM7jc 4E6OLU4s9meGJ9ic4I3inNdT7MOFW+BorXt3h9MhCiR5zce8SUTDVhPg+5MSoCxqqbyA Qhoh5++ydae9k39vvNi6PWq7pGfxyzXJXNkLJgHT+qxtohKYPEWYg3WPODVD2jCoE9fn C+MLPZm5ugU9ui9vC7kNoIRthcpnVGHNuH5ookPhC6FLmQrRCVV9sH31X3df6/KtRVsu twFkmbbx8/w+PFvD2BGPJEIsFUSLtI/3EIbzBcU4V0XI77glTOtqmV0aFgveYJ+qfBEe yazg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=cykkAoO3; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="R/htPVl6"; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id q24-20020aa79838000000b005939fff6d47si18102382pfl.326.2023.02.07.16.19.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2023 16:19:20 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=cykkAoO3; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="R/htPVl6"; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1pPYAX-0008Df-T2; Wed, 08 Feb 2023 00:18:36 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pPYAX-0008DX-73 for openvpn-devel@lists.sourceforge.net; Wed, 08 Feb 2023 00:18:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=benQ5P5JzMV24q+dk3qHaWg2ZS2OvmnYKx/dnc56CJU=; b=cykkAoO38VXESg4iNfYjzVQ79Q 8tXvzdihibEtdNmAOvrdFQZ1oSSlwlAMQwNY/AXI8bh8b9XVJrUwBh4uo7EwGfMzm+NyqrAzkVpcn 9u4nzCt6ROxL5xyeE1qEnR9WxLrsPoAjoiqgRle0FDHpK6N4nApGKvGFmBAN6o318Q4g=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=benQ5P5JzMV24q+dk3qHaWg2ZS2OvmnYKx/dnc56CJU=; b=R/htPVl6eoc912BpAvf/MtDEUF GPJtvu/j9d58A59gknL0Bj4goN5znqd8l+S8kmorG4Pw72CLc7ktK1MPdbcseDDpUhEF5eKM2qClL wsq87YRpyRhNXWegQmC4O1ZiYVXol2utCKEAILt/mMrodd/SgQjJyk4n2XBtmMenOAto=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pPYAU-0001F7-G3 for openvpn-devel@lists.sourceforge.net; Wed, 08 Feb 2023 00:18:35 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1pPYAF-000FIi-WA for openvpn-devel@lists.sourceforge.net; Wed, 08 Feb 2023 01:18:20 +0100 Received: (nullmailer pid 244748 invoked by uid 10006); Wed, 08 Feb 2023 00:18:19 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Wed, 8 Feb 2023 01:18:17 +0100 Message-Id: <20230208001819.244694-4-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230208001819.244694-1-arne@rfc2549.org> References: <20230208001819.244694-1-arne@rfc2549.org> MIME-Version: 1.0 X-Spam-Score: 0.3 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Signed-off-by: Arne Schwabe --- tests/unit_tests/engine-key/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/unit_tests/engine-key/Makefile.am b/tests/unit_tests/engine-key/Makefile.am index 246222514..0c2888576 100644 --- a/tests/unit_tests/engine-key/Makefile.am +++ b/tests/unit_tests/en [...] Content analysis details: (0.3 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Headers-End: 1pPYAU-0001F7-G3 Subject: [Openvpn-devel] [PATCH 3/5] Do not run check_engine test when crosscompiling X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1757219977207185666?= X-GMAIL-MSGID: =?utf-8?q?1757219977207185666?= Signed-off-by: Arne Schwabe --- tests/unit_tests/engine-key/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/unit_tests/engine-key/Makefile.am b/tests/unit_tests/engine-key/Makefile.am index 246222514..0c2888576 100644 --- a/tests/unit_tests/engine-key/Makefile.am +++ b/tests/unit_tests/engine-key/Makefile.am @@ -12,7 +12,9 @@ TESTS_ENVIRONMENT = srcdir="$(abs_srcdir)"; \ top_srcdir="$(top_srcdir)"; \ export srcdir builddir top_builddir top_srcdir; +if !CROSS_COMPILING TESTS = check_engine_keys.sh +endif check_engine_keys.sh: $(conffiles) CLEANFILES = \ From patchwork Wed Feb 8 00:18:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 3058 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp4396482dyk; Tue, 7 Feb 2023 16:18:54 -0800 (PST) X-Google-Smtp-Source: AK7set+/xrzXp6u8BoHV5dhadRvX1YNJIyUw/e40mOqZs41xGQCqRGlHVWF4b7E5kS8IgpW/pz2J X-Received: by 2002:a62:1792:0:b0:592:705a:5a5e with SMTP id 140-20020a621792000000b00592705a5a5emr4741765pfx.9.1675815534704; Tue, 07 Feb 2023 16:18:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675815534; cv=none; d=google.com; s=arc-20160816; b=r8slmxRY16TPcHtcFF50CslPWtEba/jwVA7lZpps3o6LwcB502xwdqoHDMlcJQNWCH fFzWYlVtSuP8PiztAqXxJxx6WF5olFriTlbEXBYiYcRAiTIzSAyRq1YWaeUoSENiLxQY GeU3iKLjSA5dieCEDoNlGmJsyQQECDHqNt8rbYezBDiF4ktj7SGfyKjG/UE1aA0t1twm 8lsIIR0JUygo8MXW+qfi3MrWn9o2t1BkC6Y34tihl2HJCCoLEl9/3UatoTJjEAofzVpM VMUIxUPsGK1uPXeN+pryppfR0Jk8rn6W2mHOHG60cC8qJIF6T/++5ibGe4gW5CjgRmYa +mww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature; bh=kkFAuAR1K7YIij3ndXfCJvXZaiOLo4C7GFo2e72fSJ8=; b=CfHPna3oPSR2EWRFRt/1aXuHL2QnnJekqW1RWYsNvOk09GEO2IpM0LIoqNnUY5GNRm Ow0HlRBoSp4LNRt0QChEPjZjQhzBTg6jujl3Jng5E0ShPFeLOVuRWvUu6+woIJWbSCBW RMDf9CROa5d7wgcDAyDHVS7VaguFr1ZnakFN0E/aR8op1ZW/uuvCbpVmpfx72pt1V+ss xPo5XPGW6EMe+oypzWi4caCJYzYATJ7JK8/AKmPCvE3xawB3aPbD9N2Fngf+HazTT7yK LDuFm8gho/LFQngxWRmoWLg+g/8h5pTrKozfIa/lXD5hxlr60ykl80z6yKcIDw6jWU+8 rg3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=io1XbZin; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=bWnPGodT; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id i1-20020a626d01000000b00593d1936ce6si15724437pfc.13.2023.02.07.16.18.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2023 16:18:54 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=io1XbZin; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=bWnPGodT; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1pPYAS-00064z-F7; Wed, 08 Feb 2023 00:18:31 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pPYAP-00064s-SQ for openvpn-devel@lists.sourceforge.net; Wed, 08 Feb 2023 00:18:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vnjZ4wS46P36obeTIQouArHv8tVTz4ugx2EsFspRRNM=; b=io1XbZinrq7gtiCsWZdby0ZuQ4 SARI7G9DcCHJjtJIzMTDLJIAQNTuudy6gSdlILH5sPcYZ86f++86EjGs/Uiu1psPfawVwdCrjqOqp uGfg7bEIcp6x+pZkKu+UFscv66slQbGMJQASf1h5vg4pbVNY+8J9rjfLBCTE+UJq+SRw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=vnjZ4wS46P36obeTIQouArHv8tVTz4ugx2EsFspRRNM=; b=bWnPGodTwaceMTUUVeLMvqdzth vPH+ZO6q5wXCNRCycf9CoyhFh19FbRyfgwQI/dOUu5Oc+Yx0xnN+BbHDGgRrXqItPJVjesYnSYa63 lgEXm2Eby0rm4VG5is0l6eLRBeq3qu39e2IuCtfLBfqFZA7gtjFsgyiSH6hJKWl79A9I=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pPYAN-00E950-8Z for openvpn-devel@lists.sourceforge.net; Wed, 08 Feb 2023 00:18:29 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1pPYAG-000FIk-0W for openvpn-devel@lists.sourceforge.net; Wed, 08 Feb 2023 01:18:20 +0100 Received: (nullmailer pid 244751 invoked by uid 10006); Wed, 08 Feb 2023 00:18:19 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Wed, 8 Feb 2023 01:18:18 +0100 Message-Id: <20230208001819.244694-5-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230208001819.244694-1-arne@rfc2549.org> References: <20230208001819.244694-1-arne@rfc2549.org> MIME-Version: 1.0 X-Spam-Score: 0.3 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: My mingw compiler/headers (mingw-w64 10.0.0 on macOS) seem to be more pendantic than the one that comes with Ubuntu 22.04 (github actions) or any of the other platforms including msvc/normal windows h [...] Content analysis details: (0.3 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Headers-End: 1pPYAN-00E950-8Z Subject: [Openvpn-devel] [PATCH 4/5] Add missing stdint.h includes in unit tests files X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1757219950464453934?= X-GMAIL-MSGID: =?utf-8?q?1757219950464453934?= My mingw compiler/headers (mingw-w64 10.0.0 on macOS) seem to be more pendantic than the one that comes with Ubuntu 22.04 (github actions) or any of the other platforms including msvc/normal windows header. Signed-off-by: Arne Schwabe Acked-by: Selva Nair --- tests/unit_tests/example_test/test.c | 1 + tests/unit_tests/example_test/test2.c | 1 + tests/unit_tests/openvpn/mock_msg.c | 1 + 3 files changed, 3 insertions(+) diff --git a/tests/unit_tests/example_test/test.c b/tests/unit_tests/example_test/test.c index ea31b884d..c174025cc 100644 --- a/tests/unit_tests/example_test/test.c +++ b/tests/unit_tests/example_test/test.c @@ -4,6 +4,7 @@ #include #include #include +#include #include static int diff --git a/tests/unit_tests/example_test/test2.c b/tests/unit_tests/example_test/test2.c index 5a186d5d7..bb54633c8 100644 --- a/tests/unit_tests/example_test/test2.c +++ b/tests/unit_tests/example_test/test2.c @@ -4,6 +4,7 @@ #include #include #include +#include #include diff --git a/tests/unit_tests/openvpn/mock_msg.c b/tests/unit_tests/openvpn/mock_msg.c index 3ede98c00..3fa9a166f 100644 --- a/tests/unit_tests/openvpn/mock_msg.c +++ b/tests/unit_tests/openvpn/mock_msg.c @@ -32,6 +32,7 @@ #include #include #include +#include #include From patchwork Wed Feb 8 00:18:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 3062 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp4396746dyk; Tue, 7 Feb 2023 16:19:23 -0800 (PST) X-Google-Smtp-Source: AK7set/4Lbv6FhyWY/CGLwl5EZ+HB+B9f8XpMNuhG7P5Q9kIMWYtbNkfU7xte6TTMLWw6lGZb8rQ X-Received: by 2002:a17:90a:4f:b0:22c:5703:3d9f with SMTP id 15-20020a17090a004f00b0022c57033d9fmr6029762pjb.38.1675815562801; Tue, 07 Feb 2023 16:19:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675815562; cv=none; d=google.com; s=arc-20160816; b=mY7/4M8awEpoyhEmD53lzfA2NUrokP40OsZJmlswqC5PTTmNEM5eDkidvTh3rZ4xlT D1B6cYyEYDPlmzyc5ZIn9rq+5b2tsV6kogFuQh9C7YbVfdxB5SVW2knfM5VjZBgeBn7T w/lqsjn5UIKNuzVI54l3T75mVwCKwT1vvQIQr2ijYsjPCUzACxRcwvxcIWFGW0zHxHRF HcaMFcokUhfNy4MdW1O21hwhqwtYD3BNoX+DuGHuRKW4H9lzDawcUbh6tEiXU1CQfEIa efboaKS3isd1Yy/mGM6diFIQ9/D2es5PjtvAOSfdiBoyW1mfH2fZcumWQjpQXdv2xepd +FNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature; bh=fYbht9A+QoRV5wuqNhLamXBda3t5wrQSALw+6iHpi9c=; b=MrrcElM4l15mmzv/EZiaOEmtZLgz3VqdAc+OIzyAR+X89iRQG/DkAGAxNCngzpH6kd hFKrVsDSmdEctvLVdx4mx0YjjnS1kWf/JnHN8N3CgzS5keuknzEkrvAjIFB3a67H/oSq PPvx1Da1FX8xE5IPrfU+awtqelvr1sDRtKxrrP7xE92lcLK/Uqcbw3IwkNRvHPtW5xiW T/GOkVj5er4XGU/9OLypN+a5qZAwHyyct11YdUz9EYD++Ez2JCSqfGcmqEMwQ0TYR2MH ++bNs1e1tSSGuSqFPrnA+GvNhzSZdugeAodJUs1EfslWG4y/6gBAbx68cMrWNEnxcDQr iDTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=LqMKN3Dq; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=imNdGxtU; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id nv15-20020a17090b1b4f00b00226c700afe3si521306pjb.37.2023.02.07.16.19.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2023 16:19:22 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=LqMKN3Dq; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=imNdGxtU; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1pPYAY-0006YS-Ul; Wed, 08 Feb 2023 00:18:38 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pPYAX-0006YK-5C for openvpn-devel@lists.sourceforge.net; Wed, 08 Feb 2023 00:18:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=7bMF5FvB3/zUgXrxT73jgUqxifByJPLh1SS5ZCSmLY0=; b=LqMKN3DqM6PG0DwzNj7kzo1jLP AD/BjLf3XnqTOiI/vQR6Exf6JDKlXbrL+2FytKVLSImV5FMmYPnSuXnO2XpAPZQs3U6oK9I3wCBJf TTl/gv5RXbqRVn/N8rvYpJul6+EEaqYEW7WM4o4f5MVhsdo8KnFGojTAdMNP80mXGMFA=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=7bMF5FvB3/zUgXrxT73jgUqxifByJPLh1SS5ZCSmLY0=; b=imNdGxtUG1NSCPgDMVc8bX+J2r rVQTvdZEhNmHhGj1969Bfrnk5qJ/Gcv87GeutShTH23XxEwAo7IbH9BEkcD4APe2QMXOW33Nnegbf B95UvBxZYPGC6VxgeiOR5maFd8rWMJvdnEl7fublCTPv/dbP0A1Ac9mbXOuFQE42AFEU=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pPYAU-0001F6-Fr for openvpn-devel@lists.sourceforge.net; Wed, 08 Feb 2023 00:18:36 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1pPYAG-000FIm-15 for openvpn-devel@lists.sourceforge.net; Wed, 08 Feb 2023 01:18:20 +0100 Received: (nullmailer pid 244754 invoked by uid 10006); Wed, 08 Feb 2023 00:18:19 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Wed, 8 Feb 2023 01:18:19 +0100 Message-Id: <20230208001819.244694-6-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230208001819.244694-1-arne@rfc2549.org> References: <20230208001819.244694-1-arne@rfc2549.org> MIME-Version: 1.0 X-Spam-Score: 0.3 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Signed-off-by: Arne Schwabe --- .github/workflows/build.yaml | 110 ++++++++++++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 132624547..c71bd2c4d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -55,9 +55,10 @@ jobs [...] Content analysis details: (0.3 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Headers-End: 1pPYAU-0001F6-Fr Subject: [Openvpn-devel] [PATCH 5/5] Add building and running mingw unittests to github actions X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1757219979738235827?= X-GMAIL-MSGID: =?utf-8?q?1757219979738235827?= Signed-off-by: Arne Schwabe --- .github/workflows/build.yaml | 110 ++++++++++++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 132624547..c71bd2c4d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -55,9 +55,10 @@ jobs: PKCS11_HELPER_VERSION: "1.29.0" OPENSSL_VERSION: "${{ matrix.osslver }}" TAP_WINDOWS_VERSION: "9.23.3" + CMOCKA_VERSION: "1.1.5" steps: - name: Install dependencies - run: sudo apt update && sudo apt install -y mingw-w64 libtool automake autoconf man2html unzip + run: sudo apt update && sudo apt install -y mingw-w64 libtool automake autoconf man2html unzip cmake ninja-build build-essential wget - name: Checkout OpenVPN uses: actions/checkout@v3 with: @@ -72,7 +73,7 @@ jobs: uses: actions/cache@v3 with: path: '~/mingw/' - key: ${{ matrix.target }}-mingw-${{ matrix.osslver }}-${{ env.LZO_VERSION }}-${{ env.PKCS11_HELPER_VERSION }}-${{ env.TAP_WINDOWS_VERSION }} + key: ${{ matrix.target }}-mingw-${{ matrix.osslver }}-${{ env.LZO_VERSION }}-${{ env.PKCS11_HELPER_VERSION }}-${{ env.TAP_WINDOWS_VERSION }}--${{ env.CMOCKA_VERSION }} # Repeating if: steps.cache.outputs.cache-hit != 'true' # on every step for building dependencies is ugly but @@ -84,12 +85,33 @@ jobs: wget -c -P download-cache/ "https://build.openvpn.net/downloads/releases/tap-windows-${TAP_WINDOWS_VERSION}.zip" wget -c -P download-cache/ "https://www.oberhumer.com/opensource/lzo/download/lzo-${LZO_VERSION}.tar.gz" wget -c -P download-cache/ "https://github.com/OpenSC/pkcs11-helper/releases/download/pkcs11-helper-${PKCS11_HELPER_VERSION}/pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.bz2" + wget -c -P download-cache/ "https://github.com/coreboot/cmocka/archive/refs/tags/cmocka-${CMOCKA_VERSION}.tar.gz" tar jxf "download-cache/pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.bz2" wget -c -P download-cache/ "https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz" || wget -c -P download-cache/ "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" tar zxf "download-cache/openssl-${OPENSSL_VERSION}.tar.gz" tar zxf "download-cache/lzo-${LZO_VERSION}.tar.gz" + tar zxf "download-cache/cmocka-${CMOCKA_VERSION}.tar.gz" unzip download-cache/tap-windows-${TAP_WINDOWS_VERSION}.zip + - name: create cmocka build directory + if: steps.cache.outputs.cache-hit != 'true' + run: mkdir cmocka-build + + - name: configure cmocka + if: steps.cache.outputs.cache-hit != 'true' + working-directory: "./cmocka-build" + run: cmake -GNinja -DCMAKE_C_COMPILER=${{ matrix.chost }}-gcc -DCMAKE_CXX_COMPILER=${{ matrix.chost }}-g++ -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_PREFIX_PATH=${HOME}/mingw/opt/lib/pkgconfig/ -DCMAKE_INCLUDE_PATH=${HOME}/mingw/opt/lib/include -DCMAKE_LIBRARY_PATH=${HOME}/mingw/opt/lib -DCMAKE_INSTALL_PREFIX=${HOME}/mingw/opt/ ../cmocka-cmocka-${{ env.CMOCKA_VERSION }} + + - name: build cmocka + if: steps.cache.outputs.cache-hit != 'true' + working-directory: "./cmocka-build" + run: ninja + + - name: install cmocka + if: steps.cache.outputs.cache-hit != 'true' + working-directory: "./cmocka-build" + run: ninja install + - name: Configure OpenSSL if: steps.cache.outputs.cache-hit != 'true' run: ./Configure --cross-compile-prefix=${{ matrix.chost }}- shared ${{ matrix.target }} no-capieng --prefix="${HOME}/mingw/opt" --openssldir="${HOME}/mingw/opt" -static-libgcc @@ -154,6 +176,89 @@ jobs: - name: build OpenVPN run: make -j3 working-directory: openvpn + - name: build OpenVPN unittests + run: make -j3 check + working-directory: openvpn + + # We use multiple upload-artifact here, so it becomes a flat folder + # structure since we need the ddls on the same level as the binaries + - name: Archive cmocka/openssl/lzo ddls + uses: actions/upload-artifact@v3 + with: + retention-days: 1 + name: mingw-unittest-${{matrix.target}}-ossl${{ matrix.osslver }}-dlls + path: '~/mingw/opt/bin/*.dll' + + - name: Archive gcc dlls + uses: actions/upload-artifact@v3 + with: + retention-days: 1 + name: mingw-unittest-${{matrix.target}}-ossl${{ matrix.osslver }}-dlls + path: /usr/lib/gcc/${{ matrix.chost }}/10-win32/*.dll + + - name: Archive mingw dlls + uses: actions/upload-artifact@v3 + with: + retention-days: 1 + name: mingw-unittest-${{matrix.target}}-ossl${{ matrix.osslver }}-dlls + path: /usr/${{ matrix.chost }}/lib/*.dll + + # libtool puts some wrapper binaries in openvpn/tests/unit_tests/openvpn/ + # and the real binaries in openvpn/tests/unit_tests/openvpn/.libs/ + - name: Archive unittest artifacts + uses: actions/upload-artifact@v3 + with: + retention-days: 1 + name: mingw-unittest-${{matrix.target}}-ossl${{ matrix.osslver }}-tests + path: openvpn/tests/unit_tests/openvpn/.libs/*.exe + + # Currently not used by the unit test but might in the future and also + # helpful if manually downloading and running openvpn.exe from a mingw + # build + - name: Archive openvpn binary + uses: actions/upload-artifact@v3 + with: + retention-days: 1 + name: mingw-unittest-${{matrix.target}}-ossl${{ matrix.osslver }}-tests + path: openvpn/src/openvpn/.libs/*.exe + + mingw-unittest: + needs: [ mingw ] + strategy: + fail-fast: false + matrix: + osslver: [ 1.1.1q, 3.0.5 ] + target: [ mingw64, mingw ] + + runs-on: windows-latest + name: "mingw unittests - ${{matrix.target}} - OSSL ${{ matrix.osslver }}" + steps: + - name: Retrieve mingw unittest dlls + uses: actions/download-artifact@v3 + with: + name: mingw-unittest-${{matrix.target}}-ossl${{ matrix.osslver }}-dlls + path: unittests + + - name: Retrieve mingw unittest + uses: actions/download-artifact@v3 + with: + name: mingw-unittest-${{matrix.target}}-ossl${{ matrix.osslver }}-tests + path: unittests + + - name: List unittests directory + run: "dir unittests" + + - name: Run unit tests + run: | + ./unittests/argv_testdriver.exe + ./unittests/auth_token_testdriver.exe + ./unittests/buffer_testdriver.exe + ./unittests/crypto_testdriver.exe + ./unittests/misc_testdriver.exe + ./unittests/ncp_testdriver.exe + ./unittests/packet_id_testdriver.exe + ./unittests/pkt_testdriver.exe + ./unittests/provider_testdriver.exe ubuntu: strategy: @@ -442,3 +547,4 @@ jobs: run: make -j3 - name: make check run: make check +