mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
support the new libcurl IDN feature, also a first attempt to display a stack
trace if a test results in a 'core' file and gdb is present
This commit is contained in:
parent
3304589043
commit
e2aaf22d5d
@ -27,7 +27,7 @@ sub getpartattr {
|
|||||||
) {
|
) {
|
||||||
$inside++;
|
$inside++;
|
||||||
my $attr=$1;
|
my $attr=$1;
|
||||||
my @p=split("[ \t]", $attr);
|
my @p=split("[\t]", $attr);
|
||||||
my $assign;
|
my $assign;
|
||||||
|
|
||||||
foreach $assign (@p) {
|
foreach $assign (@p) {
|
||||||
|
@ -75,9 +75,11 @@ my $memanalyze="./memanalyze.pl";
|
|||||||
|
|
||||||
my $stunnel = checkcmd("stunnel");
|
my $stunnel = checkcmd("stunnel");
|
||||||
my $valgrind = checkcmd("valgrind");
|
my $valgrind = checkcmd("valgrind");
|
||||||
|
my $gdb = checkcmd("gdb");
|
||||||
|
|
||||||
my $ssl_version; # set if libcurl is built with SSL support
|
my $ssl_version; # set if libcurl is built with SSL support
|
||||||
my $large_file; # set if libcurl is built with large file support
|
my $large_file; # set if libcurl is built with large file support
|
||||||
|
my $has_idn; # set if libcurl is built with IDN support
|
||||||
|
|
||||||
my $skipped=0; # number of tests skipped; reported in main loop
|
my $skipped=0; # number of tests skipped; reported in main loop
|
||||||
my %skipped; # skipped{reason}=counter, reasons for skip
|
my %skipped; # skipped{reason}=counter, reasons for skip
|
||||||
@ -739,6 +741,10 @@ sub checkcurl {
|
|||||||
# large file support
|
# large file support
|
||||||
$large_file=1;
|
$large_file=1;
|
||||||
}
|
}
|
||||||
|
if($feat =~ /IDN/i) {
|
||||||
|
# IDN support
|
||||||
|
$has_idn=1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!$curl) {
|
if(!$curl) {
|
||||||
@ -821,6 +827,11 @@ sub singletest {
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
elsif($f eq "idn") {
|
||||||
|
if($has_idn) {
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$why = "curl lacks $f support";
|
$why = "curl lacks $f support";
|
||||||
$serverproblem = 15; # set it here
|
$serverproblem = 15; # set it here
|
||||||
@ -1035,6 +1046,9 @@ sub singletest {
|
|||||||
|
|
||||||
print CMDLOG "$CMDLINE\n";
|
print CMDLOG "$CMDLINE\n";
|
||||||
|
|
||||||
|
unlink("core");
|
||||||
|
|
||||||
|
my $dumped_core;
|
||||||
my $cmdres;
|
my $cmdres;
|
||||||
# run the command line we built
|
# run the command line we built
|
||||||
if($gdbthis) {
|
if($gdbthis) {
|
||||||
@ -1048,7 +1062,7 @@ sub singletest {
|
|||||||
else {
|
else {
|
||||||
$cmdres = system("$CMDLINE");
|
$cmdres = system("$CMDLINE");
|
||||||
my $signal_num = $cmdres & 127;
|
my $signal_num = $cmdres & 127;
|
||||||
my $dumped_core = $cmdres & 128;
|
$dumped_core = $cmdres & 128;
|
||||||
|
|
||||||
if(!$anyway && ($signal_num || $dumped_core)) {
|
if(!$anyway && ($signal_num || $dumped_core)) {
|
||||||
$cmdres = 1000;
|
$cmdres = 1000;
|
||||||
@ -1057,6 +1071,24 @@ sub singletest {
|
|||||||
$cmdres /= 256;
|
$cmdres /= 256;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!$dumped_core) {
|
||||||
|
if(-r "core") {
|
||||||
|
# there's core file present now!
|
||||||
|
$dumped_core = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($dumped_core) {
|
||||||
|
print "core dumped!\n";
|
||||||
|
if($gdb) {
|
||||||
|
print "running gdb for post-mortem analysis:\n";
|
||||||
|
open(GDBCMD, ">log/gdbcmd2");
|
||||||
|
print GDBCMD "bt\n";
|
||||||
|
close(GDBCMD);
|
||||||
|
system("gdb --directory libtest -x log/gdbcmd2 -batch $DBGCURL core ");
|
||||||
|
# unlink("log/gdbcmd2");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# remove the special FTP command file after each test!
|
# remove the special FTP command file after each test!
|
||||||
unlink($FTPDCMD);
|
unlink($FTPDCMD);
|
||||||
@ -1127,7 +1159,7 @@ sub singletest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(@strip) {
|
for(@strip) {
|
||||||
# strip all patterns from both arrays
|
# strip off all lines that match the patterns from both arrays
|
||||||
chomp $_;
|
chomp $_;
|
||||||
@out = striparray( $_, \@out);
|
@out = striparray( $_, \@out);
|
||||||
@protstrip= striparray( $_, \@protstrip);
|
@protstrip= striparray( $_, \@protstrip);
|
||||||
|
Loading…
Reference in New Issue
Block a user