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

Problem verifying ns in ns-allinone



Hi, ns-users:

I am a new user of ns. I installed the current release ns2.1b2 using "all
at once" at
<http://www-mash.CS>Berkeley.EDU/ns/ns-build.html>. I got following message
after running ./install :

   Nam has been installed successfully!
   Please compiling your xgraph separately!
   Ns-allinone package has been installed successfully!
   .
   .
   You can run the ns validation suit with cd ns-2; ./validate

So the installation seems OK. However I encountered several problem when I
run ./validate. The problem
as following:

   *** ./test-all
   tahoel tahoe2 tahoe3 tagoe4 n0_bug bug reno1 reno renoA reno2 reno3
reno4 reno5....
   Running tahoe1 Test output differs from reference output
   Diagnose with: diff test-output/tahoe1.test test-output/tahoe1
   Differences due to floating-point formatting are not significant

Then I checked tahoe1.test file and it was empty except containing title
text and device.
For running test tahoe2...., same problem!

   *** ./test-all-tcp
   Tests: ecn timers timersA timers1 timers2 ... stats1
   Running test ecn
   ns: _o3 cleanup file5 ecn_(one_with_ecn,_one_without): 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 in file ../../bin/set_flow_id at 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)
      (TestSuit finish line 3)
      invoked from within
   "$self finish $testname"
      (procedure "_o3" line 11)
      (TestSuit cleanup line 11)
      invoked from within
   "_o3 cleanup file5 ecn_(one_with_ecn,_one_without)"
   Test output differs from reference output
   Diagnose with: diff test-output-tcp/ecn.test test-output-tcp/ecn
   Differences due to floating-point formatting are not significant
   .
Same problems have been encountered in running test timers and so on.
Attached are source files getrc, set_flow_id and raw2xg. I use perl5.003 in
my path. I am not sure if this
causes syntax errors because source files require perl5.001? If yes,
anybody knows where I can get these 
source codes matched in perl5.003 or perl5.004.
Any help will be highly appreciated.

Fang


   

 
eval 'exec perl -I ./bin -S $0 ${1+"$@"}'		#-*-Perl-*-
	if 0;

require 5.001;

($progname) = ($0 =~ m!([^/]+)$!);
sub usage {
	die <<ENDUSAGE;
usage: $progname -s node1 [options] [trace file...]

get trace files that match certain criteria related to source, dest or flow-id

options:
	-o outfile	write subset trace to output file
	-b		bi-directional, i.e. gather lines
	-d node2	specify destination
	-f flowid	specify flow id
ENDUSAGE
}

$usage = "usage: $progname [-b] [-o outfile] -s node1 [-d node2] [-f flowid] [trace files...]\n";

$opt_b = 0;
$opt_f = -1;
require 'getopts.pl';
(&Getopts('bo:s:d:f:') && $opt_s) || usage;

open(STDOUT, ">$opt_o") if ($opt_o);
while (<>) {
    /^v/ && do {
	print $_;
	next;
    };
    @F = split;
    if ($F[2] == $opt_s) {				# if src matches
	if (($opt_f != -1) && $F[7] != $opt_f) {
		next;
	}
	print $_ unless ($opt_d && $F[3] != $opt_d);	# print unless dst & !match
	next;
    }
    if ($opt_b && $F[3] == $opt_s) {			# else if bi && dst fld mch
	if (($opt_f != -1) && $F[7] != $opt_f) {
		next;
	}
	print $_ unless ($opt_d && $F[2] != $opt_d);	# prt unless dst & !mch sfld
	next;
    }
}
close(STDOUT);
exit;
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;