Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/msys2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: MSYS2 Build Test

# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION

jobs:
msys2:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
strategy:
fail-fast: false
matrix:
include:
- { sys: ucrt64, compiler: mingw-w64-ucrt-x86_64-gcc }
- { sys: mingw64, compiler: mingw-w64-x86_64-gcc }
- { sys: msys, compiler: gcc }
steps:
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: git ${{matrix.compiler}} autotools base-devel autoconf netcat
- name: configure wolfSSL
run: ./autogen.sh && ./configure CFLAGS="-DUSE_CERT_BUFFERS_2048 -DUSE_CERT_BUFFERS_256 -DNO_WRITE_TEMP_FILES"
- name: build wolfSSL
run: make check
- name: Display log
if: always()
run: cat test-suite.log
3 changes: 2 additions & 1 deletion scripts/ocsp-stapling.test
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,8 @@ generate_port() {
# Generate a random port number
#-------------------------------------------------------------------------#

if [[ "$OSTYPE" == "linux"* ]]; then
if [[ "$OSTYPE" == "linux"* || "$OSTYPE" == "msys"
|| "$OSTYPE" == "cygwin"* ]]; then
port=$(($(od -An -N2 /dev/urandom) % (65535-49512) + 49512))
elif [[ "$OSTYPE" == "darwin"* ]]; then
port=$(($(od -An -N2 /dev/random) % (65535-49512) + 49512))
Expand Down
3 changes: 2 additions & 1 deletion scripts/ocsp-stapling2.test
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,8 @@ generate_port() {
# Generate a random port number
#-------------------------------------------------------------------------#

if [[ "$OSTYPE" == "linux"* ]]; then
if [[ "$OSTYPE" == "linux"* || "$OSTYPE" == "msys"
|| "$OSTYPE" == "cygwin" ]]; then
port=$(($(od -An -N2 /dev/urandom) % (65535-49512) + 49512))
elif [[ "$OSTYPE" == "darwin"* ]]; then
port=$(($(od -An -N2 /dev/random) % (65535-49512) + 49512))
Expand Down
11 changes: 6 additions & 5 deletions tests/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -8237,7 +8237,7 @@ static THREAD_RETURN WOLFSSL_THREAD test_server_loop(void* args)
if (!sharedCtx)
wolfSSL_CTX_free(ctx);

if (clientfd >= 0)
if (clientfd != SOCKET_INVALID)
CloseSocket(clientfd);

#ifdef WOLFSSL_TIRTOS
Expand Down Expand Up @@ -57706,7 +57706,7 @@ static int test_wolfSSL_BIO(void)
ExpectIntEQ((int)BIO_set_mem_eof_return(f_bio1, -1), 0);
ExpectIntEQ((int)BIO_set_mem_eof_return(NULL, -1), 0);

ExpectTrue((f1 = XFOPEN(svrCertFile, "rwb")) != XBADFILE);
ExpectTrue((f1 = XFOPEN(svrCertFile, "rb+")) != XBADFILE);
ExpectIntEQ((int)BIO_set_fp(f_bio1, f1, BIO_CLOSE), WOLFSSL_SUCCESS);
ExpectIntEQ(BIO_write_filename(f_bio2, testFile),
WOLFSSL_SUCCESS);
Expand All @@ -57730,7 +57730,7 @@ static int test_wolfSSL_BIO(void)
BIO_free(f_bio2);
f_bio2 = NULL;

ExpectNotNull(f_bio1 = BIO_new_file(svrCertFile, "rwb"));
ExpectNotNull(f_bio1 = BIO_new_file(svrCertFile, "rb+"));
ExpectIntEQ((int)BIO_set_mem_eof_return(f_bio1, -1), 0);
ExpectIntEQ(BIO_read(f_bio1, cert, sizeof(cert)), sizeof(cert));
BIO_free(f_bio1);
Expand Down Expand Up @@ -60382,7 +60382,7 @@ static int test_wc_ERR_print_errors_fp(void)
XFILE fp = XBADFILE;

WOLFSSL_ERROR(WC_NO_ERR_TRACE(BAD_FUNC_ARG));
ExpectTrue((fp = XFOPEN("./tests/test-log-dump-to-file.txt", "ar")) !=
ExpectTrue((fp = XFOPEN("./tests/test-log-dump-to-file.txt", "a+")) !=
XBADFILE);
wc_ERR_print_errors_fp(fp);
#if defined(DEBUG_WOLFSSL)
Expand Down Expand Up @@ -91064,7 +91064,8 @@ static int test_dtls_msg_from_other_peer(void)
* !defined(SINGLE_THREADED) && !defined(NO_RSA) */
#if defined(WOLFSSL_DTLS) && !defined(WOLFSSL_IPV6) && \
!defined(NO_WOLFSSL_CLIENT) && !defined(NO_WOLFSSL_SERVER) && \
defined(HAVE_IO_TESTS_DEPENDENCIES) && !defined(WOLFSSL_NO_TLS12)
defined(HAVE_IO_TESTS_DEPENDENCIES) && !defined(WOLFSSL_NO_TLS12) \
&& !defined(USE_WINDOWS_API)
static int test_dtls_ipv6_check(void)
{
EXPECT_DECLS;
Expand Down