Lines Matching +full:cli +full:- +full:time +full:- +full:sync
9 test-time. It's otherwise very easy for error conditions that are low
18 user code, and provides a wide range of well-known internal faults inside lws
24 contexts" inside objects, that list named, well-known "faults" that the code
28 creation time, eg, for lws in the lws_context creation info struct, or the
31 them at creation time. Eg, if you want to cause a fault in a wsi instantiated
37 time and they will be filter down to the internal objects you want to target
40 
46 structs are linked-lists of `lws_fi_t` objects. When Fault Injection is enabled
47 at build-time, the key system objects like the `lws_context`, `lws_vhost`, `wsi`
84 |---|---|
90 For example, the minimal-http-client user code example contains this in its
95 return -1;
100 `lws-minimal-http-client --fault-injection 'wsi/user_reject_at_est'`, causing
105 [2021/03/11 13:41:05:2776] W: lws_fi: Injecting fault unk->user_reject_at_est
115 The api keeps track of each time the context was asked and uses this information
119 |---|---|
122 |`LWSFI_PROBABILISTIC`|exhibit a fault `pre` percentage of the time|
128 `lws_cmdline_option_handle_builtin()` sets this to the time in us, but it can
129 be overridden using `--fault-seed <decimal>`, and the effective PRNG seed is
158 |---|---|---|
165 creation time, and let the objects match and inherit using namespacing,
171 attached to them at creation time, so the fault injection objects directly
175 we want to trigger faults in, it may not exist until some time later. Eg, we
182 namespacing is used when you have access to a higher level object at creation-
183 time, like the lws_context, and it will itself create the object you want to
187 |---|---|
192 |**wsi=myname/**subrule|subrule is inherited by client wsi created with `info->fi_wsi_name` "myname…
206 |---|---|---|
207 |context|`struct lws_context_creation_info` .fic|-|
211 |ss / sspc wsi|-|context FIC, vhost FIC, ss / sspc .fic|
220 can take an additional `--fault-injection "...,..."` switch, which automatically
221 parses the comma-separated list in the argument to add faults with the given
224 `lws-minimal-http-client --fault-injection "wsi/dnsfail"`
231 matches an object, the fault will be injected every time. It's also possible
236 |---|---|---|
237 |`wsi/thefault`|lws_fi()|Inject the fault every time|
250 to delay the fault action by some random amount of ms within an externally-
251 given range. You can get a pseudo-random number within the externally-given
255 ## Well-known fault names in lws
258 |---|---|---|---|
287 |cli wsi|`wsi`|`dnsfail`|Sync: `getaddrinfo()` is not called and a EAI_FAIL return synthesized, Asy…
288 |cli wsi|`wsi`|`sendfail`|Attempts to send data on the wsi socket fail|
289 |cli wsi|`wsi`|`connfail`|Attempts to connect on the wsi socket fail|
290 |cli wsi|`wsi`|`createfail`|Creating the client wsi itself fails|
294 |cli ss|`ss`|`ss_no_streamtype_policy`|The policy for the streamtype is made to seem as if it is mi…
296 |sspc|`ss`|`sspc_fake_rxparse_disconnect_me`|Force client-proxy link parse to seem to ask to be dis…
297 |sspc|`ss`|`sspc_fake_rxparse_destroy_me`|Force client-proxy link parse to seem to ask to destroy t…
299 |sspc|`ss`|`sspc_create_oom`|Cause the sspc handle allocation to fail as if OOM at creation time|
304 |ssproxy|`ss`|`ssproxy_dsh_rx_queue_oom`|Cause proxy's allocation in the onward SS->P[->C] DSH rx d…
305 |ssproxy|`wsi`|`ssproxy_client_adopt_oom`|Cause proxy to be unable to allocate for new client - pro…
307 |ssproxy|`wsi`|`sspc_dsh_ss2p_oom`|Cause ss->proxy dsh allocation to fail|
309 |ssproxy|`ss`|`ssproxy_dsh_c2p_pay_oom`|Cause proxy's DSH alloc for C->P payload to fail|
319 |wsi|`wsi`|`timedclose`|(see next) Cause wsi to close after some time|
322 ## Well-known namespace targets
328 To target wsis from SS-based connections, you can use `ss=stream_type_name/`,
341 ### Well-known internal wsi type names
346 |---|---|
355 At client connection creation time, user code can also specify their own names