Topic: make check fail

my environment
  Windows 10
  Cygwin
  Wolfssl 5.6.6


Is my version of GCC a problem?

https://www.wolfssl.com/documentation/m … tml#cygwin

7. Under "Devel" click the "gcc-core" drop down and change "Skip" to 7.4.0-1
   (NOTE: wolfSSL has not tested GCC 9 or 10 and as they are fairly new does
   not recommend using them until they have had a bit more time to be
   fine-tuned for development).

What I have:

$ i686-w64-mingw32-gcc --version
i686-w64-mingw32-gcc (GCC) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Did this ever get fixed?
  https://www.wolfssl.com/forums/topic1795-testsuite.html
    there is some issue with filesystem access from the wolfSSL test scripts in MSYS.


my build script:

$ cat MYbuild
#!/bin/sh

if [ ! -f configure ]; then
#  autogen.sh creates configure
./autogen.sh
fi

# --host=i686-w64-mingw32 requires the i686-w64-mingw32 DLLs
# in the path for make check - at least:
#   libwinpthread-1.dll
#   libgcc_s_sjlj-1.dll
export PATH=${PATH}:/usr/i686-w64-mingw32/sys-root/mingw/bin

./configure  --host=i686-w64-mingw32 \
             --prefix=/usr/local/i686-w64-mingw32 \
  &&  make  \
  &&  make check

the build script output ends with

SKIP: scripts/openssl.test
SKIP: scripts/external.test
PASS: scripts/google.test
SKIP: scripts/pem.test
FAIL: testsuite/testsuite.test.exe
FAIL: scripts/resume.test
PASS: scripts/tls13.test
PASS: scripts/unit.test
============================================================================
Testsuite summary for wolfssl 5.6.6
============================================================================
# TOTAL: 8
# PASS:  3
# SKIP:  3
# XFAIL: 0
# FAIL:  2
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
Please report to https://github.com/wolfssl/wolfssl/issues
============================================================================
make[4]: *** [Makefile:8151: test-suite.log] Error 1
make[4]: Leaving directory '/source/wolfssl-5.6.6-stable'
make[3]: *** [Makefile:8259: check-TESTS] Error 2

where it hangs.. or do I need to wait longer than 30 minutes?

test-suite.log has this bit in it

AES-GCM  test passed!
can't open ./certs/client-key.der, Please run from wolfSSL home dir error L=18989 errno=2
 [fiducial line numbers: 7943 25060 37640 49885]
RSA      test failed!
 error L=18990 errno=2
 [fiducial line numbers: 7943 25060 37640 49885]
FAIL testsuite/testsuite.test.exe (exit status: 127)

FAIL: scripts/resume
====================

Any suggestions on how to get "make check" working would be appreciated.

Share

Re: make check fail

Hi ler762,

It looks like you're cross-compiling and copying the test binary over to your target.  Please ensure you are also copying the certs/ directory to your target, and that you are running the test binary from the same directory as certs/.
You will also need to modify wolfcrypt/test/test_paths.h with the path to your certs directory on your target.

Thanks,
Kareem

Share

Re: make check fail

Hi Kareem,

The cross-compiling is for building a native Windows executable from a Windows/cygwin environment, so I don't think I should have to move the binary anywhere.

The native Windows path to the certs directory for the test program is

  $ cygpath -w /source/wolfssl-5.6.6-stable/certs
  C:\cygwin\source\wolfssl-5.6.6-stable\certs

but how do I pass that to ./configure?

./configure --help

doesn't say anything about how to over-ride the test paths.

It'd be nice if I didn't have to do

    &&  make  \
    && sed -i -e 's~"~"/cygwin~' /source/wolfssl-5.6.6-stable/wolfcrypt/test/test_paths.h \
    &&  make check

in my build/test script.

Which still fails sad

make[4]: warning: -j5 forced in submake: resetting jobserver mode.
SKIP: scripts/openssl.test
SKIP: scripts/external.test
PASS: scripts/google.test
SKIP: scripts/pem.test
PASS: testsuite/testsuite.test.exe
FAIL: scripts/resume.test
PASS: scripts/tls13.test
PASS: scripts/unit.test
============================================================================
Testsuite summary for wolfssl 5.6.6
============================================================================
# TOTAL: 8
# PASS:  4
# SKIP:  3
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
Please report to [url]https://github.com/wolfssl/wolfssl/issues[/url]
============================================================================

It seems there's another path that needs modifying.  From ./test-suite.log:

=====================================
   wolfssl 5.6.6: ./test-suite.log
=====================================

# TOTAL: 8
# PASS:  4
# SKIP:  3
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: scripts/resume
====================

ready file /source/wolfssl-5.6.6-stable/wolfssl_resume_ready43608
-r          Resume session

Starting example server for resume test...


Resume test supported
./examples/server/server -r -R "/source/wolfssl-5.6.6-stable/wolfssl_resume_ready43608" -p 0
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
NO ready file ending test...
in cleanup
killing server
FAIL scripts/resume.test (exit status: 1)

SKIP: scripts/external
======================

WOLFSSL_EXTERNAL_TEST NOT set, won't run
SKIP scripts/external.test (exit status: 77)

Thanks,
Lee

Share

Re: make check fail

That's exactly what I was wondering, thanks for the info!

Share

Re: make check fail

I'm not there yet.

ready file /source/wolfssl-5.6.6-stable/wolfssl_resume_ready43608

comes from scripts/resume.test

What I've got so far:

$ cat MYbuild
#!/bin/sh

if [ ! -f configure ]; then
#  autogen.sh creates configure
./autogen.sh
fi

# --host=i686-w64-mingw32 requires the i686-w64-mingw32 DLLs
# in the path for make check - at least:
#   libwinpthread-1.dll
#   libgcc_s_sjlj-1.dll
export PATH=${PATH}:/usr/i686-w64-mingw32/sys-root/mingw/bin


./configure  --host=i686-w64-mingw32 \
             --prefix=/usr/local/i686-w64-mingw32 \
             --enable-sys-ca-certs=no \
  &&  make  \
  && echo -e "\n\n*********** cygwin => dos wolfcrypt/test/test_paths.h rewrite hack" \
  && sed -i -e 's~"~"/cygwin~' /source/wolfssl-5.6.6-stable/wolfcrypt/test/test_paths.h \
  && echo -e "\n\n*********** cygwin => dos scripts/resume.test rewrite hack" \
  && sed -i -e '/^ready_file=/ c ready_file=/cygwin/tmp/wolfssl_resume_ready$$' \
               /source/wolfssl-5.6.6-stable/scripts/resume.test \
  && echo -e "\n\n*********** cygwin => dos rewrite hacks end\n\n" \
  &&  make check


# 'make check' fails :(
# it looks like I need to do the ./configure && make part, then modify
#   wolfcrypt/test/test_paths.h
# by hand to:
#   $ cygpath -wa ./certs
#   C:\cygwin\source\wolfssl-5.6.6-stable\certs
# and the scripts/resume.test script
#   ready_file=`pwd`/wolfssl_resume_ready$$
# line to
#   ready_file=/tmp/wolfssl_resume_ready$$
# and it still fails :(

build & test output is:

make[4]: Entering directory '/source/wolfssl-5.6.6-stable'
make[4]: warning: -j5 forced in submake: resetting jobserver mode.
SKIP: scripts/openssl.test
SKIP: scripts/external.test
PASS: scripts/google.test
SKIP: scripts/pem.test
PASS: testsuite/testsuite.test.exe
FAIL: scripts/resume.test
PASS: scripts/tls13.test
PASS: scripts/unit.test
============================================================================
Testsuite summary for wolfssl 5.6.6
============================================================================
# TOTAL: 8
# PASS:  4
# SKIP:  3
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
Please report to https://github.com/wolfssl/wolfssl/issues
============================================================================
make[4]: *** [Makefile:8151: test-suite.log] Error 1
make[4]: Leaving directory '/source/wolfssl-5.6.6-stable'
make[3]: *** [Makefile:8259: check-TESTS] Error 2

where it hangs.  ^C to get

make[2]: *** [Makefile:8503: check-am] Interrupt
make[1]: *** [Makefile:8036: check-recursive] Interrupt
make: *** [Makefile:8505: check] Interrupt

./test-suite.log has

$ cat ./test-suite.log
=====================================
   wolfssl 5.6.6: ./test-suite.log
=====================================

# TOTAL: 8
# PASS:  4
# SKIP:  3
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: scripts/resume
====================

ready file /cygwin/tmp/wolfssl_resume_ready49908
-r          Resume session

note that the Windows file /cygwin/tmp/wolfssl_resume_ready49908 exists

$ ls -l /tmp/wolfssl_resume_ready49908
-rwxr-xr-x 1 Lee None 7 Mar 19 18:18 /tmp/wolfssl_resume_ready49908

$ cat /tmp/wolfssl_resume_ready49908
50663

Starting example server for resume test...


Resume test supported
./examples/server/server -r -R "/cygwin/tmp/wolfssl_resume_ready49908" -p 0
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
waiting for ready file...
NO ready file ending test...

The ready file does exist, so who is complaining that it doesn't?

in cleanup
killing server
FAIL scripts/resume.test (exit status: 1)

SKIP: scripts/external
======================

WOLFSSL_EXTERNAL_TEST NOT set, won't run
SKIP scripts/external.test (exit status: 77)

SKIP: scripts/openssl
=====================

WOLFSSL_OPENSSL_TEST NOT set, won't run
SKIP scripts/openssl.test (exit status: 77)

SKIP: scripts/pem
=================

PEM example not available, won't run
SKIP scripts/pem.test (exit status: 77)

Any suggestions on how to debug scripts/resume would be appreciated.

TIA,
Lee

Share