MIME-Version: 1.0 References: <20230204004512.250271-2-selva.nair@...277...> <20230204064010.257925-1-selva.nair@...277...> <20230204064010.257925-2-selva.nair@...277...> <74a4194f-2d86-2bce-195b-0cae9f294597@...1227...> In-Reply-To: <74a4194f-2d86-2bce-195b-0cae9f294597@...1227...> From: Selva Nair Date: Tue, 7 Feb 2023 20:05:10 -0500 Message-ID: Content-Type: multipart/alternative; boundary="00000000000014ad4205f425dc48" Subject: Re: [Openvpn-devel] [PATCH v2 3/3] Add a unit test for functions in cryptoapi.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Arne Schwabe Cc: openvpn-devel@lists.sourceforge.net --00000000000014ad4205f425dc48 Content-Type: text/plain; charset="UTF-8" Hi, On Tue, Feb 7, 2023 at 7:18 PM Arne Schwabe wrote: > Am 04.02.23 um 07:40 schrieb selva.nair@...277...: > > From: Selva Nair > > > > - Though named cryptoapi_testdriver, right now this only tests > > parsing of thumbprint specified as a selector for --cryptioapicert > > option. More tests coming.. > > > > v2: a line that belongs here was mistakenly included in the previous > > commit. Corrected. > > > > Signed-off-by: Selva Nair > > While a good step, this still has problems. With OpenSSL 1.1.1 it still > tries to run the check-engine.sh script and unsurprisingly fails: > > ---- begin log.txt ---- > ./check_engine_keys.sh: 25: ../../../src/openvpn/openvpn: not found > --- end log.txt --- > Key mismatch not detected > FAIL: check_engine_keys.sh > > This can be fixed by: > > --- 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 = \ > Thanks for this. I added this to 2/3 where it belongs and submitted it as v3 2/3. With that, this patch should be okay as is. For those not following closely, this patch should be applied after the cryptoapi patch set where the function being tested here is introduced. Selva --00000000000014ad4205f425dc48 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

On Tue, Feb 7, 2023 at 7:18 PM Arne Schwabe <arne@...1227...> = wrote:
Am 04.02.= 23 um 07:40 schrieb selva.nair@...277...:
> From: Selva Nair <selva.nair@...277...>
>
> - Though named cryptoapi_testdriver, right now this only tests
>=C2=A0 =C2=A0 parsing of thumbprint specified as a selector for --crypt= ioapicert
>=C2=A0 =C2=A0 option. More tests coming..
>
> v2: a line that belongs here was mistakenly included in the previous > commit. Corrected.
>
> Signed-off-by: Selva Nair <selva.nair@...277...>

While a good step, this still has problems. With OpenSSL 1.1.1 it still
tries to run the check-engine.sh script and unsurprisingly fails:

---- begin log.txt ----
./check_engine_keys.sh: 25: ../../../src/openvpn/openvpn: not found
--- end log.txt ---
Key mismatch not detected
FAIL: check_engine_keys.sh

This can be fixed by:

--- a/tests/unit_tests/engine-key/Makefile.am
+++ b/tests/unit_tests/engine-key/Makefile.am
@@ -12,7 +12,9 @@ TESTS_ENVIRONMENT =3D srcdir=3D"$(abs_srcdir)";= \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0top_srcdir=3D"$(top_srcdir)"; \=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0export srcdir builddir top_builddir top_s= rcdir;

+if !CROSS_COMPILING
=C2=A0 TESTS =3D check_engine_keys.sh
+endif
=C2=A0 check_engine_keys.sh: $(conffiles)

=C2=A0 CLEANFILES =3D \

Thanks for this= . I added this to 2/3 where it belongs and submitted it as v3 2/3. With tha= t, this patch should be okay as is.=C2=A0

For thos= e not following closely, this patch=C2=A0 should be applied after the crypt= oapi patch set where the function being tested here is introduced.

Selva
--00000000000014ad4205f425dc48--