加入收藏 | 设为首页 | 会员中心 | 我要投稿 | RSS
您当前的位置:首页 > 原创教程 > NS2网络模拟与仿真

NS2中运行./validate不通过的解决方法(原创)

时间:2011-08-10 11:18:08  来源:  作者:

NS2中运行./validate不通过的解决方法

前提是安装成功!

如果运行validate时出现如下的错误:

*** ./test-all-oddBehaviors
Tests: onedrop_reno
Running test onedrop_reno:
../../ns test-suite-oddBehaviors.tcl onedrop_reno QUIET
ns: _o4 cleanupAll onedrop_reno: usage: getrc -s node1 [options] [trace file...]

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

 

另外:如果是64bit系统

validate overall report: all portable tests passed but 

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
    while executing
"exec $PERL ../../bin/set_flow_id -s all.tr |  $PERL ../../bin/getrc -s 2 -d 3 |  $PERL ../../bin/raw2xg -s 0.01 -m $wrap -t $file > temp.rands"
    (procedure "_o4" line 3)
    (TestSuite finish line 3)
    invoked from within
"$self finish $testname"
    (procedure "_o4" line 10)
    (TestSuite cleanupAll line 10)
    invoked from within
"_o4 cleanupAll onedrop_reno"
Test output differs from reference output
Diagnose with: diff test-output-oddBehaviors/onedrop_reno.test test-output-oddBehaviors/onedrop_reno
Or see URL "http://www.isi.edu/nsnam/ns/ns-problems.html".
Some test failed.
validate overall report: some tests failed:
     ./test-all-tcp ./test-all-red ./test-all-sack ./test-all-schedule ./test-all-cbq ./test-all-tcp-init-win ./test-all-tcpVariants ./test-all-ecn ./test-all-newreno ./test-all-ecn-ack ./test-all-aimd ./test-all-rfc793edu ./test-all-rfc2581 ./test-all-links ./test-all-rio ./test-all-testReno ./test-all-tcpOptions ./test-all-oddBehaviors
to re-run a specific test, cd tcl/test; ../../ns test-all-TEST-NAME
Notice that some tests in webcache will fail on freebsd when -O is turned on.
This is due to some event reordering, which will disappear when -g is turned on.
 

如何解决:

vi ../../bin/getrc

找到:
require 'getopts.pl';
 (&Getopts('bo:s:d:ef:') && $opt_s != -1) || usage;
替换为:
use Getopt::Std
(&getopts('bo:s:d:ef:') && $opt_s != -1) || usage;
 

重新运行测试即可通过。

还有一种解决方法是:
I have also solved the validation problem finally, but without using
Morten's method. (Thank's anyway.)
The key is that I found out that there already exists perl 5.6.0 in RedHat
7.2, after rebuilt my entire linux system.
And, without installing another perl (from the ns-2 website), all the
validation tests passed successfully.
The prior validation problem may be a result of a bad perl installation.

第一种方法测试过,第二种我没有测试过。

我的系统是redhat 7.3 ,ns2-2.1b7a。

 

另外:如果是64位系统运行validate时可能出现下面的错误:

validate overall report: all portable tests passed but some non-portable ...

这个有可能是64bit系统造成的。

来顶一下
返回首页
返回首页
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表
推荐资讯
在CentOS下搭建Android 开发环境
在CentOS下搭建Androi
轻松搭建属于自己的Ubuntu发行版
轻松搭建属于自己的Ub
利用SUSE Studio 打造自己的个性化Linux发行版
利用SUSE Studio 打造
那些采用PHP技术的IT大企业
那些采用PHP技术的IT大
相关文章
栏目更新
栏目热门