aboutsummaryrefslogtreecommitdiff
path: root/tests/TESTrun
diff options
context:
space:
mode:
Diffstat (limited to 'tests/TESTrun')
-rwxr-xr-xtests/TESTrun26
1 files changed, 11 insertions, 15 deletions
diff --git a/tests/TESTrun b/tests/TESTrun
index 0a1a255ccc82..f5f0454787f3 100755
--- a/tests/TESTrun
+++ b/tests/TESTrun
@@ -29,7 +29,6 @@ use POSIX qw( WEXITSTATUS WIFEXITED);
use Cwd qw(abs_path getcwd);
use File::Path qw(mkpath); # mkpath works with ancient perl, as well as newer perl
use File::Spec;
-use Data::Dumper; # for debugging.
# these are created in the directory where we are run, which might be
# a build directory.
@@ -290,8 +289,6 @@ sub runtest {
}
}
- #print sprintf("END: %08x\n", $r);
-
if($r == 0) {
if($linecount == 0) {
printf " %-40s: passed\n", $name;
@@ -364,12 +361,10 @@ sub loadconfighash {
while(<CONFIG_H>) {
chomp;
if(/^\#define (.*) 1/) {
- #print "Setting $1\n";
$main::confighhash->{$1} = 1;
}
}
close(CONFIG_H);
- #print Dumper($main::confighhash);
# also run tcpdump --fp-type to get the type of floating-point
# arithmetic we're doing, setting a HAVE_{fptype} key based
@@ -386,6 +381,17 @@ sub loadconfighash {
printf "$TCPDUMP --fp-type => %s\n", $have_fptype;
$main::confighhash->{$have_fptype} = 1;
+ # run tcpdump --time-t-size to get the size of size_t in bits
+ open(TIMETSIZE_PIPE, "$TCPDUMP --time-t-size |") or die("piping tcpdump --time-t-size failed\n");
+ my $time_t_size = <TIMETSIZE_PIPE>;
+ close(TIMETSIZE_PIPE);
+ my $have_time_t_64;
+ if($time_t_size == "64") {
+ $have_time_t_64 = "HAVE_TIME_T_64";
+ }
+ printf "$TCPDUMP --time-t-size => %s\n", $time_t_size;
+ $main::confighhash->{$have_time_t_64} = 1;
+
# and check whether this is OpenBSD, as one test fails in OpenBSD
# due to the sad hellscape of low-numbered DLT_ values, due to
# 12 meaning "OpenBSD loopback" rather than "raw IP" on OpenBSD
@@ -410,7 +416,6 @@ sub runOneComplexTest {
my $configset = $testconfig->{config_set};
my $configunset = $testconfig->{config_unset};
my $ch = loadconfighash();
- #print Dumper($ch);
if(defined($configset)) {
$foundit = ($ch->{$configset} == 1);
@@ -431,9 +436,6 @@ sub runOneComplexTest {
return 0;
}
- #use Data::Dumper;
- #print Dumper($testconfig);
-
# EXPAND any occurrences of @TESTDIR@ to $testsdir
$options =~ s/\@TESTDIR\@/$testsdir/;
@@ -463,11 +465,8 @@ sub runComplexTests {
$definitions = <FILE>;
}
close(FILE);
- #print "STUFF: ${definitions}\n";
eval $definitions;
if(defined($testlist)) {
- #use Data::Dumper;
- #print Dumper($testlist);
foreach $test (@$testlist) {
runOneComplexTest($test);
}
@@ -488,12 +487,9 @@ sub runSimpleTests {
unlink("core");
($name, $input, $output, @options) = split;
- #print "processing ${only} vs ${name}\n";
next if(defined($only) && $only ne $name);
my $options = join(" ", @options);
- #print "@{options} becomes ${options}\n";
-
my $hash = { name => $name,
input=> $input,
output=>$output,