← Commit list

2c7e1792a0

Viktor Szakats
Viktor Szakats
2025-11-12
SUCCESS Duration: 159s

Subject

test2405: split off H2 tests to new test 2407, fix callback prototype

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

tests/data/Makefile.am+1 -1
@@ -261,7 +261,7 @@ test2200 test2201 test2202 test2203 test2204 test2205 \
test2300 test2301 test2302 test2303 test2304 test2306 test2307 test2308 \
test2309 \
\
-test2400 test2401 test2402 test2403 test2404 test2405 test2406 \
+test2400 test2401 test2402 test2403 test2404 test2405 test2406 test2407 \
\
test2500 test2501 test2502 test2503 \
\
tests/data/test2405+2 -3
@@ -3,7 +3,6 @@
<keywords>
multi
HTTP
-HTTP/2
</keywords>
</info>
@@ -29,7 +28,7 @@ Funny-head: yesyes
# Client-side
<client>
<server>
-http/2
+http
</server>
<tool>
lib%TESTNUMBER
@@ -38,7 +37,7 @@ lib%TESTNUMBER
checking curl_multi_waitfds functionality
</name>
<command>
-http://%HOSTIP:%HTTP2PORT/%TESTNUMBER
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
</command>
</client>
tests/data/test2407+51 -0
@@ -0,0 +1,51 @@
+<testcase>
+<info>
+<keywords>
+multi
+HTTP
+HTTP/2
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6007
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+%repeat[1000 x foobar]%
+</data>
+</reply>
+
+# Client-side
+<client>
+<features>
+http/2
+</features>
+<server>
+http/2
+</server>
+<tool>
+lib2405
+</tool>
+<name>
+checking curl_multi_waitfds functionality (HTTP/2)
+</name>
+<command>
+http://%HOSTIP:%HTTP2PORT/%TESTNUMBER
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+</testcase>
tests/libtest/lib2405.c+13 -8
@@ -68,7 +68,7 @@ enum {
TEST_USE_HTTP2_MPLEX
};
-static size_t emptyWriteFunc(void *ptr, size_t size, size_t nmemb,
+static size_t emptyWriteFunc(char *ptr, size_t size, size_t nmemb,
void *data) {
(void)ptr; (void)data;
return size * nmemb;
@@ -381,14 +381,19 @@ static CURLcode test_lib2405(const char *URL)
if(res != CURLE_OK)
goto test_cleanup;
- /* HTTP1, expected 2 waitfds - one for each transfer */
- test_run_check(TEST_USE_HTTP1, 2);
-
- /* HTTP2, expected 2 waitfds - one for each transfer */
- test_run_check(TEST_USE_HTTP2, 2);
+ if(testnum == 2405) {
+ /* HTTP1, expected 2 waitfds - one for each transfer */
+ test_run_check(TEST_USE_HTTP1, 2);
+ }
+#ifdef USE_HTTP2
+ else { /* 2407 */
+ /* HTTP2, expected 2 waitfds - one for each transfer */
+ test_run_check(TEST_USE_HTTP2, 2);
- /* HTTP2 with multiplexing, expected 1 waitfds - one for all transfers */
- test_run_check(TEST_USE_HTTP2_MPLEX, 1);
+ /* HTTP2 with multiplexing, expected 1 waitfds - one for all transfers */
+ test_run_check(TEST_USE_HTTP2_MPLEX, 1);
+ }
+#endif
test_cleanup:
curl_global_cleanup();