cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Patches to make testing external proxies more convenient

From: Fabian Keil <freebsd-listen_at_fabiankeil.de>
Date: Thu, 7 Aug 2014 13:15:17 +0200

Dan Fandrich <dan_at_coneharvesters.com> wrote:

> On Sun, Jul 27, 2014 at 01:32:51PM +0200, Fabian Keil wrote:
> > Dan Fandrich <dan_at_coneharvesters.com> wrote:
> > > On Fri, Jul 04, 2014 at 03:38:39PM +0200, Fabian Keil wrote:
> > >
> > > > Subject: [PATCH 1/6] Allow to overwrite $TESTDIR through the
> > > > environment
> > >
> > > This one seems like it could be useful. I would prefer that the
> > > environment variable be less generic; something with a CURL prefix
> > > would be better.
> >
> > Agreed. Attached is an updated version that uses CURL_TESTDIR instead.
> > Any other name is fine with me, too.
>
> After thinking about this one, it seems that there's no reason to use a
> magic environment variable for this, but rather a normal command-line
> option. Do you see a reason this couldn't be implemented that way?

I have no objections to using a dedicated command-line option
for this. My main reason for not doing it was that the related
$srcdir is set through the environment as well.

However, I also think that runtests.pl has lots of internal variables
one might want to change in certain situations, so maybe instead of adding
a dedicated option for all of them, there should be an option to overwrite
any internal variable (or only the ones on a white list).

Such an option could also obsolete my patch that adds an -H option
to change the "IPv4 host IP address":

./runtests.pl -o TESTDIR=$privoxy_curl_test_dir -o HOSTIP=10.0.0.1 ...

> > > > tests: Make sure the weekday in Date headers matches the date
> > >
> > > A reasonable idea. But, there should probably be a test added with a
> > > deliberate weekday/date mismatch to ensure that libcurl still works
> > > with that combination.
> >
> > Test attached. My impression was that curl doesn't parse the
> > Date header, but I agree that testing that it behaves as expected
> > is a good idea anyway.
>
> All the test currently does is verify that libcurl doesn't crash if the
> date is invalid. Better would be a test that validates that the date is
> parsed correctly (i.e. ignoring the day-of-week), maybe something based
> on test 77.

I agree. I was only aiming at not reducing the test coverage.
 
> > I also attached a patch to align the -l output again.
>
> Applied.

Thanks.

Fabian

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

Received on 2014-08-07