cURL / Mailing Lists / curl-library / Single Mail

curl-library

[PATCH] curl_easy_perform_ev: debug/test function

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 14 Aug 2013 14:47:10 +0200 (CEST)

Hi friends.

Here's my initial patch. See attachment. Commit message:

This function is meant to work *exactly* as curl_easy_perform() but will
use the event-based libcurl API internally instead of
curl_multi_perform(). To avoid relying on an actual event-based library
and to not use non-portable functions (like epoll or similar), there's a
rather inefficient emulation layer implemented on top of Curl_poll()
instead.

curl has a new --test-event option when built with debug enabled that
then uses curl_easy_perform_ev() instead of curl_easy_perform(). If
built without debug, using --test-event will only output a warning
message.

NOTE: curl_easy_perform_ev() is not part if the public API on purpose.
It is only present in debug builds of libcurl and MUST NOT be considered
stable even then. Use it for libcurl-testing purposes only.

runtests.pl now features an -e command line option that makes it use
--test-event for all curl command line tests.

---
  lib/easy.c          | 397 +++++++++++++++++++++++++++++++++++++++++++++-------
  lib/easyif.h        |   3 +
  src/tool_cfgable.h  |   5 +-
  src/tool_getparam.c |   8 ++
  src/tool_operate.c  |  10 ++
  tests/runtests.pl   |  34 ++++-
  6 files changed, 400 insertions(+), 57 deletions(-)
-- 
  / daniel.haxx.se


-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2013-08-14