Lines Matching +full:protocol +full:- +full:tests
2 * lws-minimal-secure-streams
4 * Written in 2010-2020 by Andy Green <andy@warmcat.com>
14 * --amount xxx, the default without that is 12345 bytes.
21 static int interrupted, tests, tests_pass, tests_fail; variable
31 * If the -proxy app is fulfilling our connection, then we don't need to have
36 * ./lws-minimal-secure-streams-proxy test app on the same machine.
44 "\"schema-version\":" "1,"
46 "\"via-socks5\":" "\"127.0.0.1:1080\","
180 "\"protocol\": \"h1\","
203 "\"protocol\": \"h1\","
212 "\"protocol\": \"h1\","
223 "\"protocol\": \"h2\","
244 "\"protocol\": \"h1\","
253 "\"protocol\": \"h1\","
264 "\"protocol\": \"h2\","
285 "\"protocol\": \"h1\","
294 "\"protocol\": \"h1\","
305 "\"protocol\": \"h2\","
326 "\"protocol\": \"h1\","
338 "\"protocol\": \"h1\","
352 "\"protocol\": \"h2\","
385 "\"protocol\": \"h1\","
396 "\"protocol\": \"h1\","
407 "\"protocol\": \"h1\","
613 m->rx_seen += len; in myss_rx()
617 __func__, lws_ss_tag(m->ss), (int)len, flags, in myss_rx()
618 (unsigned int)m->rx_seen); in myss_rx()
639 struct tests_seq *curr_test = ( struct tests_seq *)m->opaque_data; in myss_state()
643 lwsl_info("%s: %s: %s (%d), ord 0x%x\n", __func__, lws_ss_tag(m->ss), in myss_state()
646 if (curr_test->mask_unexpected & (1u << state)) { in myss_state()
655 m->result_reported = 1; in myss_state()
663 if (state == curr_test->must_see) { in myss_state()
665 if (curr_test->eom_pass != m->rx_seen) { in myss_state()
667 __func__, (int)m->rx_seen, in myss_state()
668 (int)curr_test->eom_pass); in myss_state()
674 m->result_reported = 1; in myss_state()
684 lws_ss_start_timeout(m->ss, in myss_state()
685 (unsigned int)(curr_test->timeout_us / LWS_US_PER_MS)); in myss_state()
686 if (curr_test->eom_pass) { in myss_state()
688 (unsigned int)curr_test->eom_pass); in myss_state()
689 if (lws_ss_set_metadata(m->ss, "amount", buf, sl)) in myss_state()
692 return lws_ss_client_connect(m->ss); in myss_state()
695 if (!m->result_reported) { in myss_state()
726 if ((unsigned int)tests >= LWS_ARRAY_SIZE(tests_seq)) { in tests_start_next()
727 lwsl_notice("Completed all tests\n"); in tests_start_next()
732 ts = &tests_seq[tests++]; in tests_start_next()
743 ssi.streamtype = ts->streamtype; in tests_start_next()
745 lwsl_user("%s: %d: %s\n", __func__, tests, ts->name); in tests_start_next()
780 lws_metric_bucket_t *sub = mp->u.hist.head; in my_metric_report()
786 } while ((mp->flags & LWSMTFL_REPORT_HIST) && sub); in my_metric_report()
816 if ((pp = lws_cmdline_option(argc, argv, "--amount"))) in main()
819 /* set the expected payload for the bulk-related tests to amount */ in main()
827 lwsl_user("LWS secure streams error path tests [-d<verb>]\n"); in main()
838 if ((p = lws_cmdline_option(argc, argv, "-p"))) in main()
842 * path; when -p given this can specify the network interface in main()
844 if ((p = lws_cmdline_option(argc, argv, "-i"))) in main()
847 /* if -p given, -a specifies the proxy address to connect to */ in main()
848 if ((p = lws_cmdline_option(argc, argv, "-a"))) in main()
886 tests_pass == tests && !tests_fail ? "OK" : "failed", in main()
889 return !(tests_pass == tests && !tests_fail); in main()