Skip to content

Commit c0565ea

Browse files
committed
tests-local-network-only-2
1 parent 8860c96 commit c0565ea

12 files changed

Lines changed: 105 additions & 8 deletions

File tree

lib/plat/unix/unix-spawn.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@ lws_spawn_sul_reap(struct lws_sorted_usec_list *sul)
7474
__func__, lsp);
7575
lsp->reap_retry_budget = 20;
7676
lws_spawn_piped_kill_child_process(lsp);
77+
/*
78+
* If the stdwsi are already gone (why we are here),
79+
* there will be no more pipe close events to call
80+
* lws_spawn_reap()... keep retrying until the killed
81+
* child is actually reapable.
82+
*/
83+
lws_sul_schedule(lsp->info.vh->context, lsp->info.tsi,
84+
&lsp->sul_reap, lws_spawn_sul_reap,
85+
250 * LWS_US_PER_MS);
7786
}
7887
}
7988
}

minimal-examples-lowlevel/http-server/minimal-http-server-httpbin/minimal-http-server-httpbin.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ int main(int argc, const char **argv)
291291
info.mounts = &mount_dyn;
292292
info.vhost_name = "http";
293293

294+
#if defined(LWS_WITH_TLS)
294295
/*
295296
* This is a test peer for h1 / h2 ctests. Without an explicit alpn,
296297
* an h3-capable lws gives the vhost the context default alpn list
@@ -301,6 +302,7 @@ int main(int argc, const char **argv)
301302
* this peer to h2 and h1.
302303
*/
303304
info.alpn = "h2,http/1.1";
305+
#endif
304306

305307
if (!lws_create_vhost(context, &info)) {
306308
lwsl_err("Failed to create vhost\n");

minimal-examples-lowlevel/secure-streams/minimal-secure-streams-blob/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ if (requirements)
4747
ENVIRONMENT "SAI_LIST_PORT=${PORT_BLOB_HBIN_TLS}")
4848
set_tests_properties(ki_blob_hbin PROPERTIES FIXTURES_CLEANUP blob_hbin)
4949

50+
add_test(NAME ssblob-warmcat-local COMMAND lws-minimal-secure-streams-blob
51+
-c ${CMAKE_CURRENT_BINARY_DIR}/policy-local.json)
52+
set_tests_properties(ssblob-warmcat-local PROPERTIES
53+
FIXTURES_REQUIRED "blob_hbin"
54+
TIMEOUT 40)
55+
5056
endif()
5157

5258
if (websockets_shared)
@@ -113,6 +119,13 @@ if (requirements)
113119
-c ${CMAKE_CURRENT_BINARY_DIR}/policy-local.json)
114120
set_tests_properties(ki_blob_proxy_local PROPERTIES FIXTURES_CLEANUP blob_proxy_local)
115121

122+
add_test(NAME sspcblob-minimal-local COMMAND lws-minimal-secure-streams-blob-client
123+
-i +${CTEST_LOCAL_SOCKET_PATH} --timeout_ms 65000)
124+
set_tests_properties(sspcblob-minimal-local PROPERTIES
125+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-blob
126+
FIXTURES_REQUIRED "blob_proxy_local;blob_hbin"
127+
TIMEOUT 70)
128+
116129
endif()
117130

118131
endif()

minimal-examples-lowlevel/secure-streams/minimal-secure-streams-client-tx/CMakeLists.txt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ if (requirements)
3232
#
3333
# Local-server variant: runs a local lws-minimal-http-server-httpbin over
3434
# TLS, and the proxy with a local policy, so it does not need any external
35-
# gate.
35+
# network egress.
3636
#
3737

38+
if (NOT WIN32 AND LWS_WITH_SERVER)
39+
3840
lws_get_free_port(PORT_TX_HBIN_TLS)
3941

4042
add_test(NAME st_tx_hbin
@@ -52,6 +54,8 @@ if (requirements)
5254
ENVIRONMENT "SAI_LIST_PORT=${PORT_TX_HBIN_TLS}")
5355
set_tests_properties(ki_tx_hbin PROPERTIES FIXTURES_CLEANUP tx_hbin)
5456

57+
endif()
58+
5559

5660
#
5761
# Local-proxy variant: the proxy uses the local policy and the local
@@ -95,6 +99,13 @@ if (requirements)
9599
-c ${CMAKE_CURRENT_BINARY_DIR}/policy-local.json)
96100
set_tests_properties(ki_tx_proxy_local PROPERTIES FIXTURES_CLEANUP tx_proxy_local)
97101

98-
endif()
102+
add_test(NAME sspc-minimaltx-local COMMAND lws-minimal-secure-streams-client-tx
103+
-i +${CTEST_LOCAL_SOCKET_PATH})
104+
set_tests_properties(sspc-minimaltx-local PROPERTIES
105+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-client-tx
106+
FIXTURES_REQUIRED "tx_proxy_local;tx_hbin"
107+
TIMEOUT 40)
108+
109+
endif()
99110

100111
endif()

minimal-examples-lowlevel/secure-streams/minimal-secure-streams-hugeurl/CMakeLists.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,18 @@ if (requirements)
6969
ENVIRONMENT "SAI_LIST_PORT=${PORT_HURL_HBIN_TLS}")
7070
set_tests_properties(ki_hurl_hbin PROPERTIES FIXTURES_CLEANUP hurl_hbin)
7171

72+
add_test(NAME ss-warmcat-hurl-local COMMAND lws-minimal-secure-streams-hugeurl
73+
-c ${CMAKE_CURRENT_BINARY_DIR}/policy-local.json -h 1024 --h1)
74+
set_tests_properties(ss-warmcat-hurl-local PROPERTIES
75+
FIXTURES_REQUIRED "hurl_hbin"
76+
TIMEOUT 40)
77+
78+
add_test(NAME ss-warmcat-hurl-local-h2 COMMAND lws-minimal-secure-streams-hugeurl
79+
-c ${CMAKE_CURRENT_BINARY_DIR}/policy-local.json -h 1024)
80+
set_tests_properties(ss-warmcat-hurl-local-h2 PROPERTIES
81+
FIXTURES_REQUIRED "hurl_hbin"
82+
TIMEOUT 40)
83+
7284
endif()
7385

7486

@@ -114,6 +126,13 @@ if (requirements)
114126
-c ${CMAKE_CURRENT_BINARY_DIR}/policy-local.json)
115127
set_tests_properties(ki_hurl_proxy_local PROPERTIES FIXTURES_CLEANUP hurl_proxy_local)
116128

129+
add_test(NAME sspc-minimal-hurl-local COMMAND lws-minimal-secure-streams-hugeurl-client
130+
-i +${CTEST_LOCAL_SOCKET_PATH})
131+
set_tests_properties(sspc-minimal-hurl-local PROPERTIES
132+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-hugeurl
133+
FIXTURES_REQUIRED "hurl_proxy_local;hurl_hbin"
134+
TIMEOUT 40)
135+
117136
endif()
118137

119138
endif()

minimal-examples-lowlevel/secure-streams/minimal-secure-streams-perf/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ if (requirements)
6868
ENVIRONMENT "SAI_LIST_PORT=${PORT_PERF_HBIN_TLS}")
6969
set_tests_properties(ki_perf_hbin PROPERTIES FIXTURES_CLEANUP perf_hbin)
7070

71+
add_test(NAME ssperf-warmcat-local COMMAND lws-minimal-secure-streams-perf
72+
-c ${CMAKE_CURRENT_BINARY_DIR}/policy-local.json)
73+
set_tests_properties(ssperf-warmcat-local PROPERTIES
74+
FIXTURES_REQUIRED "perf_hbin"
75+
TIMEOUT 40)
76+
7177
endif()
7278

7379

@@ -113,6 +119,13 @@ if (requirements)
113119
-c ${CMAKE_CURRENT_BINARY_DIR}/policy-local.json)
114120
set_tests_properties(ki_perf_proxy_local PROPERTIES FIXTURES_CLEANUP perf_proxy_local)
115121

122+
add_test(NAME ssperfpc-minimal-local COMMAND lws-minimal-secure-streams-perf-client
123+
-i +${CTEST_LOCAL_SOCKET_PATH})
124+
set_tests_properties(ssperfpc-minimal-local PROPERTIES
125+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-perf
126+
FIXTURES_REQUIRED "perf_proxy_local;perf_hbin"
127+
TIMEOUT 40)
128+
116129
endif()
117130

118131
endif()

minimal-examples-lowlevel/secure-streams/minimal-secure-streams-smd/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ if (requirements)
135135
ENVIRONMENT "SAI_LIST_PORT=${PORT_SMD_HBIN_TLS}")
136136
set_tests_properties(ki_smd_hbin PROPERTIES FIXTURES_CLEANUP smd_hbin)
137137

138+
add_test(NAME ss-smd-local COMMAND lws-minimal-secure-streams-smd
139+
-c ${CMAKE_CURRENT_BINARY_DIR}/policy-local.json)
140+
set_tests_properties(ss-smd-local PROPERTIES
141+
FIXTURES_REQUIRED "smd_hbin"
142+
TIMEOUT 80)
143+
138144
endif()
139145

140146

minimal-examples-lowlevel/secure-streams/minimal-secure-streams-threads/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ if (requirements AND NOT WIN32)
123123
ENVIRONMENT "SAI_LIST_PORT=${PORT_THR_HBIN_TLS}")
124124
set_tests_properties(ki_thr_hbin PROPERTIES FIXTURES_CLEANUP thr_hbin)
125125

126+
add_test(NAME ss-threads-local COMMAND lws-minimal-secure-streams-threads
127+
-c ${CMAKE_CURRENT_BINARY_DIR}/policy-local.json)
128+
set_tests_properties(ss-threads-local PROPERTIES
129+
FIXTURES_REQUIRED "thr_hbin"
130+
TIMEOUT 40)
131+
126132
endif()
127133

128134

minimal-examples-lowlevel/secure-streams/minimal-secure-streams/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ if (requirements)
111111
ENVIRONMENT "SAI_LIST_PORT=${PORT_MS_HBIN_TLS}")
112112
set_tests_properties(ki_ms_hbin PROPERTIES FIXTURES_CLEANUP ms_hbin)
113113

114+
add_test(NAME ss-warmcat-local COMMAND lws-minimal-secure-streams
115+
-c ${CMAKE_CURRENT_BINARY_DIR}/policy-local.json)
116+
set_tests_properties(ss-warmcat-local PROPERTIES
117+
FIXTURES_REQUIRED "ms_hbin"
118+
TIMEOUT 40)
119+
114120
endif()
115121

116122
if (websockets_shared)
@@ -177,6 +183,13 @@ if (requirements)
177183
-c ${CMAKE_CURRENT_BINARY_DIR}/policy-local.json)
178184
set_tests_properties(ki_ms_proxy_local PROPERTIES FIXTURES_CLEANUP ms_proxy_local)
179185

186+
add_test(NAME sspc-minimal-local COMMAND lws-minimal-secure-streams-client
187+
-i +${CTEST_LOCAL_SOCKET_PATH})
188+
set_tests_properties(sspc-minimal-local PROPERTIES
189+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/minimal-examples-lowlevel/secure-streams/minimal-secure-streams
190+
FIXTURES_REQUIRED "ms_proxy_local;ms_hbin"
191+
TIMEOUT 40)
192+
180193
endif()
181194

182195
endif()

minimal-examples/client/hello_world/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,8 @@ if (requirements)
173173
set_tests_properties(ki_hw_proxy_local PROPERTIES FIXTURES_CLEANUP hw_proxy_local)
174174

175175
add_test(NAME msspc-hello_world-local COMMAND lws-minimal-ss-hello_world-client
176-
--ssproxy-iface +${CTEST_LOCAL_SOCKET_PATH}
177176
--url https://${LWS_CTEST_SERVER_URL_RESOLVE}:${PORT_HW_HBIN_TLS}/httpbin/bytes/2000
178-
-i ${CTEST_LOCAL_SOCKET_PATH})
177+
--ssproxy-iface +${CTEST_LOCAL_SOCKET_PATH})
179178
set_tests_properties(msspc-hello_world-local PROPERTIES
180179
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/minimal-examples/client/hello_world
181180
FIXTURES_REQUIRED "hw_proxy_local;hw2_hbin"

0 commit comments

Comments
 (0)