bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Running Wget through gdb in the tests


From: Tim Rühsen
Subject: Re: [Bug-wget] Running Wget through gdb in the tests
Date: Thu, 09 Apr 2015 11:26:47 +0200
User-agent: KMail/4.14.2 (Linux/3.16.0-4-amd64; KDE/4.14.2; x86_64; ; )

Am Donnerstag, 9. April 2015, 00:29:05 schrieb Ander Juaristi:
> Hi,
> 
> I usually find useful to run Wget through gdb while running the tests, so
> that I can see in real time how Wget performs internally under the test.
> Here's what I do:
> 
>    1. In WgetTests.pm, make WGETPATH point to gdb:
> 
>      our $WGETPATH = '/usr/bin/gdb';
> 
>    2. Pick some test and change the cmdline:
> 
>      my $cmdline = $WgetTest::WGETPATH . " ~/path/to/my/wget";
> 
>    3. Run the test normally:
> 
>      $ ./Test-iri-disabled.px
>      (gdb) break url_parse
> 
>    4. Figure out which port is the Perl HTTP server listening on:
> 
>      $ netstat -lp | grep perl | awk '{ print $4 }' | cut -d: -f2
> 
>    5. Run Wget, and let it pass the test, while stopping at breakpoints,
> viewing variables, etc:
> 
>      (gdb) run --no-iri -nH -r http://localhost:<port>
> 
> And I feel smart and happy this way :D
> 
> But I wonder if there's a not-so-hackish way of wrapping Wget into gdb when
> running the tests. I mean, is there a feature in the tests themselves that
> allows this? Would be a great feature.

Hi Ander,

attached is a (experimental) patch that allows you to
$ cd tests
$ GDB_TESTS=1 ./Test--spider.px

If you successfully test it, you might also add GDB_TESTS to the python test 
suite and send a git-format patch to the list for reviewing.

Regards, Tim

Attachment: WgetTests.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]