Loading tests/libtest/lib540.c +2 −0 Original line number Original line Diff line number Diff line Loading @@ -136,6 +136,8 @@ static int loop(int num, CURLM *cm, const char* url, const char* userpwd, if(res) if(res) return res; return res; /* At this point, L is guaranteed to be greater or equal than -1. */ if(L != -1) { if(L != -1) { T.tv_sec = L/1000; T.tv_sec = L/1000; T.tv_usec = (L%1000)*1000; T.tv_usec = (L%1000)*1000; Loading tests/libtest/test.h +15 −8 Original line number Original line Diff line number Diff line Loading @@ -95,6 +95,7 @@ extern int unitfail; #define TEST_ERR_USAGE 118 #define TEST_ERR_USAGE 118 #define TEST_ERR_FOPEN 117 #define TEST_ERR_FOPEN 117 #define TEST_ERR_FSTAT 116 #define TEST_ERR_FSTAT 116 #define TEST_ERR_BAD_TIMEOUT 115 /* /* ** Macros for test source code readability/maintainability. ** Macros for test source code readability/maintainability. Loading Loading @@ -309,6 +310,12 @@ extern int unitfail; (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ res = (int)ec; \ res = (int)ec; \ } \ } \ else if(*((B)) < -1L) { \ fprintf(stderr, "%s:%d curl_multi_timeout() succeeded, " \ "but returned invalid timeout value (%ld)\n", \ (Y), (Z), (long)*((B))); \ res = TEST_ERR_BAD_TIMEOUT; \ } \ } WHILE_FALSE } WHILE_FALSE #define res_multi_timeout(A,B) \ #define res_multi_timeout(A,B) \ Loading Loading
tests/libtest/lib540.c +2 −0 Original line number Original line Diff line number Diff line Loading @@ -136,6 +136,8 @@ static int loop(int num, CURLM *cm, const char* url, const char* userpwd, if(res) if(res) return res; return res; /* At this point, L is guaranteed to be greater or equal than -1. */ if(L != -1) { if(L != -1) { T.tv_sec = L/1000; T.tv_sec = L/1000; T.tv_usec = (L%1000)*1000; T.tv_usec = (L%1000)*1000; Loading
tests/libtest/test.h +15 −8 Original line number Original line Diff line number Diff line Loading @@ -95,6 +95,7 @@ extern int unitfail; #define TEST_ERR_USAGE 118 #define TEST_ERR_USAGE 118 #define TEST_ERR_FOPEN 117 #define TEST_ERR_FOPEN 117 #define TEST_ERR_FSTAT 116 #define TEST_ERR_FSTAT 116 #define TEST_ERR_BAD_TIMEOUT 115 /* /* ** Macros for test source code readability/maintainability. ** Macros for test source code readability/maintainability. Loading Loading @@ -309,6 +310,12 @@ extern int unitfail; (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ (Y), (Z), (int)ec, curl_multi_strerror(ec)); \ res = (int)ec; \ res = (int)ec; \ } \ } \ else if(*((B)) < -1L) { \ fprintf(stderr, "%s:%d curl_multi_timeout() succeeded, " \ "but returned invalid timeout value (%ld)\n", \ (Y), (Z), (long)*((B))); \ res = TEST_ERR_BAD_TIMEOUT; \ } \ } WHILE_FALSE } WHILE_FALSE #define res_multi_timeout(A,B) \ #define res_multi_timeout(A,B) \ Loading