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

Validation Test Problem



Dear:

I just install NS succesefully. When I check validation (run ./validate)
there are 
some compilation errors. Atteched are error message and source files. Could
reply me
how to fix these syntax errors.

Regards !

Fang Jiang
.
.
.
.
Running test timers
ns: _o3 cleanup file5 timers_(first_packet_dropped): syntax error in file ../../bin/set_flow_id at line 48, next 2 tokens "use strict"
syntax error in file ../../bin/set_flow_id at line 52, next 2 tokens "my("
Spurious backslash ignored at ../../bin/set_flow_id line 53.
syntax error in file ../../bin/set_flow_id at line 53, next 2 tokens "qw("
syntax error in file ../../bin/set_flow_id at line 67, next 2 tokens "my("
Execution of ../../bin/set_flow_id aborted due to compilation errors.
Can't locate 5.001000000000000334 in @INC at ../../bin/getrc line 4.
syntax error in file ../../bin/raw2xg at line 39, next 2 tokens "my("
syntax error in file ../../bin/raw2xg at line 52, next 2 tokens "translate_point("
syntax error in file ../../bin/raw2xg at line 73, next 2 tokens "translate_point("
Execution of ../../bin/raw2xg aborted due to compilation errors.
    while executing
"exec ../../bin/set_flow_id -s all.tr |  ../../bin/getrc -s 2 -d 3 |  ../../bin/raw2xg -s 0.01 -m 90 -t $file > temp.rands"
    (procedure "_o3" line 3)
    (TestSuite finish line 3)
    invoked from within
"$self finish $testname"
    (procedure "_o3" line 11)
    (TestSuite cleanup line 11)
    invoked from within
"_o3 cleanup file5 timers_(first_packet_dropped)"
Test output differs from reference output
Diagnose with: diff test-output-tcp/timers.test test-output-tcp/timers
Differences due to floating-point formatting are not significant.
.
.
.
eval 'exec perl $0 -S ${1+"$@"}'	# -*- perl -*-
    if 0;

require 5.001;

#
# set_flow_id.pl
# Copyright (C) 1997 by USC/ISI
#
# Derived from
# Id: rbp_hack_attr.pl,v 1.1 1997/10/08 20:31:46 johnh Exp
# from LSAM Project's rate-based pacing work.
#
# Copyright (c) 1997 University of Southern California.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that the above copyright notice and this paragraph are
# duplicated in all such forms and that any documentation, advertising
# materials, and other materials related to such distribution and use
# acknowledge that the software was developed by the University of
# Southern California, Information Sciences Institute.  The name of the
# University may not be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#


sub usage {
    print STDERR <<END;
usage: $0

Hack the attribute field in ns trace output to make it
be the source/dest we want.

By default, sets the attribute to the minimum of the source or destination.
Options:
    -m	    take minimum (default)
    -s	    take source
    -d	    take destination
END
    exit 1;
}

use strict;

use Getopt::Long;
&usage if ($#ARGV >= 0 && $ARGV[0] eq '-?');
my(%opts);
&GetOptions(\%opts, qw(m s d));
# &usage if ($#ARGV < 0);

my($MODE_MIN, $MODE_SRC, $MODE_DEST) = (0..10);
my($mode) = $MODE_MIN;
$mode = $MODE_MIN if (defined($opts{'m'}));
$mode = $MODE_SRC if (defined($opts{'s'}));
$mode = $MODE_DEST if (defined($opts{'d'}));

while (<>) {
    if (/^[^-+hdr]/) {
	print;
    } else {
	chomp;
	my(@f) = split(/ /);
	my($hacky_src, $hacky_dest) = @f[8,9];
	my($src) = split(/\./, $hacky_src);
	my($dest) = split(/\./, $hacky_dest);
	my($min) = $src < $dest ? $src : $dest;
	$f[7] = $min if ($mode == $MODE_MIN);
	$f[7] = $src if ($mode == $MODE_SRC);
	$f[7] = $dest if ($mode == $MODE_DEST);
	print join(" ", @f), "\n";
    };
}

exit 0;

eval 'exec perl -S $0 ${1+"$@"}'		# -*-perl-*-
    if 0;

require 5.001;

($progname) = ($0 =~ m!([^/]+)$!);
sub usage {
    print STDERR <<END;
usage: $progname [options] [trace files...]

options:
    -a		plot acks
    -s SCALE    scale TCP sequence numbers by SCALE
    -m MODULUS  treat TCP sequence numbers as mod MODULUS
    -q		show queueing delay by connecting lines
    -l		show packet length
    -t TITLE    title of test

Traditional ``wrapping'' ns plots (as called from the test scripts)
can be generated with -s 0.01 -m 90.
END
    exit 1;
};
$usage = "usage: $progname [-a] [trace files...]\n";

require 'getopts.pl';
&Getopts('as:m:qlt:') || usage;

$c = 0;
@p = @a = @d = @lu = @ld = ();
%q_time_seg = ();
$modulus = defined($opt_m) ? $opt_m : 2 ** 31;
$scale = defined($opt_s) ? $opt_s : 1;
$plot_acks = defined($opt_a);

$file = $acks = '';

sub translate_point {
    my($time, $seq, $flow) = @_;
    return ($time, $flow + ($seq % $modulus) * $scale);
}

while (<>) {
    $dfile = $ARGV;
    @F = split;
    /testName/ && ($file = $F[2], next);
    /^[\+-] / && do {
	$c = $F[7] if ($c < $F[7]);
	$is_ack = ($F[4] eq 'ack');
	next if ($is_ack && !$plot_acks);

	($x, $y) = translate_point(@F[1, 10, 7]);
	if (defined($opt_q)) {
	    if (/^\+/) {
		$statement = undef;
		$q_time_seg{$is_ack,$y} = $x;
	    };
	    $statement = "move $q_time_seg{$is_ack,$y} $y\ndraw $x $y\n"
		if (/^\-/);
	} else {
	    $statement = "$x $y\n";
	};
	if (defined($statement)) {
	    if ($is_ack) {
		push(@a, $statement);
	    } else {
	        push(@p, $statement);
	    };
	};
	next;
    };
    /^d / && do {
	($x, $y) = translate_point(@F[1, 10, 7]);
	push(@d, "$x $y\n");
	next;
    };
    /link-down/ &&	(push(@ld, $F[1]), next);
    /link-up/ &&	(push(@lu, $F[1]), next);
}

if ($file eq '') {
	($file) = ($dfile =~ m!([^/]+)$!);
}

$title  = defined($opt_t) ? $opt_t : $file;
print "TitleText: $title\n" .
    "Device: Postscript\n" .
    "BoundBox: true\n" .
    "Ticks: true\n" .
    (defined($opt_q) ? "" : "NoLines: true\n") .
    "Markers: true\n" .
    "XUnitText: time\n" .
    "YUnitText: packets\n";

@sorted_p = sort (@p);
print "\n\"packets\n", @p;

# insert dummy data sets so we get X's for marks in data-set 4
if (!defined($a[0])) {
    push(@a, "0 1\n");
}
printf "\n\"skip-1\n0 1\n";
if ($plot_acks) {
    @sorted_a = sort (@a);
    print "\n\"acks\n", @sorted_a;
} else {
    printf "\n\"skip-2\n0 1\n";
}

#
# Repeat the first line twice in the drops file because often we have only
# one drop and xgraph won't print marks for data sets with only one point.
#
@sorted_d = sort (@d);
print "\n\"drops\n", @d[0..3], @sorted_d;

$c++;
print "\n";
foreach $i (@ld) {
	print "\"link-down\n$i 0\n$i $c\n";
}
foreach $i (@lu) {
	print "\"link-up\n$i 0\n$i $c\n";
}

exit 0;