Fix wasi-sockets tests (#2389)

Tests were failing because the right permissions were not provided to iwasm.
Also, test failures didn't trigger build failure due to typo - also fixed in this change.

In addition to that, this PR fixes a few issues with the test itself:
* the `server_init_complete` was not reset early enough causing the client to occasionally
  assume the server started even though it didn't yet
* set `SO_REUSEADDR` on the server socket so the port can be reused shortly after
  closing the previous socket
* defined receive-send-receive sequence from server to make sure server is alive at the
  time of sending message
This commit is contained in:
Marcin Kolny
2023-07-30 12:34:09 +01:00
committed by GitHub
parent 6d6cea1a73
commit 151600fef2
3 changed files with 122 additions and 120 deletions

View File

@ -46,6 +46,7 @@ test_nslookup_mt(void *params)
{
int *af = (int *)params;
test_nslookup(*af);
return NULL;
}
int