-
Notifications
You must be signed in to change notification settings - Fork 830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MSYS2 build CI test #6932
base: master
Are you sure you want to change the base?
Add MSYS2 build CI test #6932
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
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-ucrt64: | ||
runs-on: windows-latest | ||
defaults: | ||
run: | ||
shell: msys2 {0} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
path: wolfssl | ||
msystem: UCRT64 | ||
update: true | ||
install: git mingw-w64-ucrt-x86_64-gcc autotools base-devel autoconf | ||
- name: configure wolfSSL | ||
run: ./autogen.sh && ./configure --enable-all --disable-crl-monitor | ||
- name: build wolfSSL | ||
run: make check | ||
- name: Display log | ||
if: always() | ||
run: cat test-suite.log |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -581,6 +581,12 @@ static int testDevId = INVALID_DEVID; | |
#define HAVE_SSL_MEMIO_TESTS_DEPENDENCIES | ||
#endif | ||
|
||
#ifdef USE_WINDOWS_API | ||
#define MESSAGE_TYPE_CAST char* | ||
#else | ||
#define MESSAGE_TYPE_CAST void* | ||
#endif | ||
|
||
/*----------------------------------------------------------------------------* | ||
| BIO with fixed read/write size | ||
*----------------------------------------------------------------------------*/ | ||
|
@@ -7457,7 +7463,7 @@ static THREAD_RETURN WOLFSSL_THREAD test_server_nofail(void* args) | |
static THREAD_RETURN WOLFSSL_THREAD test_server_loop(void* args) | ||
{ | ||
SOCKET_T sockfd; | ||
SOCKET_T clientfd = -1; | ||
SOCKET_T clientfd; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Usually we use |
||
word16 port; | ||
|
||
callback_functions* cbf; | ||
|
@@ -7472,6 +7478,7 @@ static THREAD_RETURN WOLFSSL_THREAD test_server_loop(void* args) | |
func_args* opts = (func_args*)args; | ||
int loop_count = opts->argc; | ||
int count = 0; | ||
int freeClientfd = 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't be required. |
||
|
||
#ifdef WOLFSSL_TIRTOS | ||
fdOpenSession(Task_self()); | ||
|
@@ -7579,6 +7586,7 @@ static THREAD_RETURN WOLFSSL_THREAD test_server_loop(void* args) | |
/* do it here to detect failure */ | ||
tcp_accept(&sockfd, &clientfd, (func_args*)args, port, 0, 0, 0, 0, 1, 0, | ||
0); | ||
freeClientfd = 1; | ||
CloseSocket(sockfd); | ||
if (wolfSSL_set_fd(ssl, clientfd) != WOLFSSL_SUCCESS) { | ||
/*err_sys("SSL_set_fd failed");*/ | ||
|
@@ -7620,7 +7628,7 @@ static THREAD_RETURN WOLFSSL_THREAD test_server_loop(void* args) | |
wolfSSL_shutdown(ssl); | ||
wolfSSL_free(ssl); ssl = NULL; | ||
CloseSocket(clientfd); | ||
clientfd = -1; | ||
freeClientfd = 0; | ||
|
||
count++; | ||
} | ||
|
@@ -7638,7 +7646,7 @@ static THREAD_RETURN WOLFSSL_THREAD test_server_loop(void* args) | |
if (!sharedCtx) | ||
wolfSSL_CTX_free(ctx); | ||
|
||
if (clientfd >= 0) | ||
if (freeClientfd) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
CloseSocket(clientfd); | ||
|
||
#ifdef WOLFSSL_TIRTOS | ||
|
@@ -63335,10 +63343,10 @@ static void test_wolfSSL_dtls_plaintext_client(WOLFSSL* ssl) | |
|
||
generateDTLSMsg(ch, sizeof(ch), 20, client_hello, 0); | ||
/* Server should ignore this datagram */ | ||
AssertIntEQ(send(fd, ch, sizeof(ch), 0), sizeof(ch)); | ||
AssertIntEQ(send(fd, (MESSAGE_TYPE_CAST)ch, sizeof(ch), 0), sizeof(ch)); | ||
generateDTLSMsg(ch, sizeof(ch), 20, client_hello, 10000); | ||
/* Server should ignore this datagram */ | ||
AssertIntEQ(send(fd, ch, sizeof(ch), 0), sizeof(ch)); | ||
AssertIntEQ(send(fd, (MESSAGE_TYPE_CAST)ch, sizeof(ch), 0), sizeof(ch)); | ||
|
||
AssertIntEQ(wolfSSL_write(ssl, msg, sizeof(msg)), sizeof(msg)); | ||
AssertIntGT(wolfSSL_read(ssl, reply, sizeof(reply)),0); | ||
|
@@ -63448,7 +63456,7 @@ static void test_wolfSSL_dtls12_fragments_spammer(WOLFSSL* ssl) | |
delay.tv_nsec = 10000000; /* wait 0.01 seconds */ | ||
c32toa(seq_number, b + seq_offset); | ||
c16toa(msg_number, b + msg_offset); | ||
ret = (int)send(fd, b, 55, 0); | ||
ret = (int)send(fd, (MESSAGE_TYPE_CAST)b, 55, 0); | ||
nanosleep(&delay, NULL); | ||
} | ||
} | ||
|
@@ -63566,7 +63574,7 @@ static void test_wolfSSL_dtls_send_alert(WOLFSSL* ssl) | |
}; | ||
|
||
fd = wolfSSL_get_fd(ssl); | ||
ret = (int)send(fd, alert_msg, sizeof(alert_msg), 0); | ||
ret = (int)send(fd, (MESSAGE_TYPE_CAST)alert_msg, sizeof(alert_msg), 0); | ||
AssertIntGT(ret, 0); | ||
} | ||
|
||
|
@@ -63637,7 +63645,7 @@ static void test_wolfSSL_send_bad_record(WOLFSSL* ssl) | |
|
||
fd = wolfSSL_get_fd(ssl); | ||
AssertIntGE(fd, 0); | ||
ret = (int)send(fd, bad_msg, sizeof(bad_msg), 0); | ||
ret = (int)send(fd, (MESSAGE_TYPE_CAST)bad_msg, sizeof(bad_msg), 0); | ||
AssertIntEQ(ret, sizeof(bad_msg)); | ||
ret = wolfSSL_write(ssl, "badrecordtest", sizeof("badrecordtest")); | ||
AssertIntEQ(ret, sizeof("badrecordtest")); | ||
|
@@ -63959,10 +63967,10 @@ static void test_wolfSSL_dtls_send_ch(WOLFSSL* ssl) | |
}; | ||
|
||
fd = wolfSSL_get_fd(ssl); | ||
ret = (int)send(fd, ch_msg, sizeof(ch_msg), 0); | ||
ret = (int)send(fd, (MESSAGE_TYPE_CAST)ch_msg, sizeof(ch_msg), 0); | ||
AssertIntGT(ret, 0); | ||
/* consume the HRR otherwise handshake will fail */ | ||
ret = (int)recv(fd, ch_msg, sizeof(ch_msg), 0); | ||
ret = (int)recv(fd, (MESSAGE_TYPE_CAST)ch_msg, sizeof(ch_msg), 0); | ||
AssertIntGT(ret, 0); | ||
} | ||
|
||
|
@@ -69529,7 +69537,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; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems unnecessary. Either case should be happy with
(char*)