ltp-ddt运行can_loopback时出错

pan(1881): Must supply a file collection or a command

原因runtest/ddt/can_loopback

CAN_S_FUNC_LOOPBACK_CAN0_1000000前多了一个空格

还要进行以下改动:

将do_cmd "cansequence -p $interface &"; suspend -i 10 -p "mem";改为

do_cmd "cansequence -p $interface &"; do_cmd "sleep 10";

suspend是ltp-ddt中的涉及电源管理的函数,执行会出错,类似rtc0有问题之类。

ltp-ddt运行can_loopback时出错

canconfig: error while loading shared libraries: libsocketcan.so.2: cannot open shared object file: No such file or directory

类似:

error while loading shared libraries: libgsl.so.0: cannot open shared object file: No such file or directory

 解决方法如下:

First, you need to locate the file (libgsl.so.0). You can do this, for example, by using the find command:

sudo find / -name "libgsl.so.0"

Let us assume, the file is located in /usr/local/lib. (If the file has not been found, install the corresponding package or download the source, build it and install it.) Now, you have two options:

(1) Quick & Dirty:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH

This adds the path of the library to an environment variable. The disadvantage of this option is, that it is only valid for the current session. It will not work for other users. It will not work once you log off and on again.

(2) Permanent:

Review your /etc/ld.so.conf. If /usr/local/lib is not listed there, add it. Now, run ldconfig to detect the shared object file and add it to some system-wide index.

candump -d $interface #-d守护进程

cansequence -p $interface & #后台运行

source 'functions.sh';
interface='can0';
bitrate=1000000;
do_cmd "do_can_loopback.sh -i  $interface -b $bitrate";
init_txf=`get_can_stats.sh -s 'TXF'`;
init_rxf=`get_can_stats.sh -s 'RXF'`;
do_cmd "candump -d $interface";
do_cmd "cansequence -p $interface &"; do_cmd "sleep 10";
prefinal_txf=`get_can_stats.sh -s 'TXF'`;
prefinal_rxf=`get_can_stats.sh -s 'RXF'`;
do_cmd "sleep 20";
final_txf=`get_can_stats.sh -s 'TXF'`;
final_rxf=`get_can_stats.sh -s 'RXF'`;
do_cmd "killall candump";
do_cmd "killall cansequence";
do_cmd "ip link set $interface down";
echo "TX init=$init_txf, prefinal=$prefinal_txf, final=$final_txf";
echo "RX init=$init_rxf, prefinal=$prefinal_rxf, final=$final_rxf";
if [ "$final_rxf" -gt "$prefinal_rxf" ] && [ "$prefinal_rxf" -gt "$init_rxf" ] && [ "$final_txf" -gt "$prefinal_txf" ] && [ "$prefinal_txf" -gt "$init_txf" ];
then exit 0;
else exit 1;
fi

需要将canutils的路径加入PATH

PATH=/usr/sbin/out_canutils/bin:/usr/sbin/out_canutils/sbin:$PATH

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/sbin/lib_libsocketcan

export LD_LIBRARY_PATH

get_can_stats.sh通过cat /proc/net/can/stats 读取can收发数据包的数量

发现RX是TX的两倍(loopback时候)

ifconfig -a 是正常的。

貌似ifconfig -a是通过sys目录下的信息得到数据的。

# cat /sys/class/net/can0/statistics/tx_packets

canutils上板测试问题记录的更多相关文章

  1. Xilinx FGPA 上板调试 集成逻辑分析工具 Integrated Logic Analyzer(ILA) 简单配置 chipscope

    Xilinx Vivado 提供了上板后的FPGA逻辑分析,信号视图显示等功能. 需要注意,上板后查看信号需要重新综合,并且需要耗费一定的片上布局布线资源. 1. 添加debug信号 可以对模块端口或 ...

  2. 接上一篇中记录Echarts进度环使用【不同状态不同进度环颜色及圈内文字】--采用单实例业务进行说明

    接上一篇中记录Echarts进度环使用 此处处理不同状态下不同进度环颜色及圈内文字等的相关处理,采用实际案例源码说明 -----------------偶是华丽丽分割线---------------- ...

  3. 2-51单片机WIFI学习(开发板测试远程通信详细介绍)

    前一篇链接(最后有APP安装包下载地址) http://www.cnblogs.com/yangfengwu/p/8720148.html 由于自己别的贴片的板子还没到,所以用自己的8266最小系统板 ...

  4. cvte春招测试面试记录

    cvte春招测试面试记录,挂在了综合面试(hr面)...尽量回忆面试的问题(可能不完全). 技术面一面: 1.自我介绍 2.根据实习项目问,智能客服怎么测正确率之类的. 3.测试人脸解锁 4.测试微信 ...

  5. 【技术博客】Postman接口测试教程 - 环境、附加验证、文件上传测试

    Postman接口测试教程 - 环境.附加验证.文件上传测试 v1.0 作者:ZBW 前言 继利用Postman和Jmeter进行接口性能测试之后,我们发现Postman作为一款入门容易的工具,其内置 ...

  6. 分布式文件系统 - FastDFS 配置 Nginx 模块及上传测试

    也不说废话,直接干 上一篇 分布式文件系统 - FastDFS 在 CentOS 下配置安装部署 中安装了 FastDFS 后,并配置启动了 Tracker 和 Storage 服务,已经可以上传文件 ...

  7. 微软官方网站线上兼容测试平台-Browser screenshots

    前端开发时最不想做的就是在不同浏览器.平台和分辨率测试网页显示效果,通常这会浮现许多问题,尤其浏览器版本就可能让显示成效完全不同,也只好尽力维持让每一种设备都能正常浏览网页.修改到完全没有问题必须投入 ...

  8. 通过ALM OTA API获取test case的信息,并上传测试结果到test set中

    ALM提供了OTA接口,可以用来获取和上传测试数据到ALM.比如获取Test case的step信息.上传测试结果到test instance. 在ALM的Help中可以下载相关文档,这里以ALM11 ...

  9. 无需编译app切换线上、测试环境

    在咱们测试过程中,经常需要切换测试环境和线上环境.大致有如下几个方案. 一.服务器地址编译到app中 此种方式需要在代码里保存两套配置,一套指向线上,一套指向测试.通过编译参数分别生成测试包.线上包. ...

随机推荐

  1. Node bak

    process.on('uncaughtException', function (err) { logger.info('Local Server Exception: ') logger.info ...

  2. 1.4 flask request和session

    2019-1-4 18:13:57 越努力,越幸运! 还有121天,flask讲完,还有4天,总时长130天 还有13天就讲完了 一月争取看完!!! 永远不要高估自己! 今天学了request和ses ...

  3. react+mobx 编写 Async装饰器

    使用 // indexStore.js import axios from "axios"; import { from } from "rxjs"; impo ...

  4. git 的相关知识

    参考文章 git checkout HEAD <file> :  master/HEAD -> index -> work directory index 暂存区有两行信息.分 ...

  5. sublime3 快速生成html头文件

    通过安装emmt插件老师来实现该功能(https://github.com/sergeche/emmet-sublime#readme) 1. 下载好后解压到文件夹: 2. 打开TS3,点击perfe ...

  6. height:100%

    子元素的高度设置为height:100%时 继承父元素的高度为border+height 子元素的高度为height: 此时父元素的 box-sizing:content-box: border-bo ...

  7. asp.net mvc ef 性能监控调试工具 MiniProfiler

    MiniProfiler是一款针对.NET, Ruby, Go and Node.js的性能分析的轻量级程序.可以对一个页面本身,及该页面通过直接引用.Ajax.Iframe形式访问的其它页面进行监控 ...

  8. 代码块事务—TransactionScope

    今天上班遇到这样的业务:将删除的用户信息记录到记录表,再删除用户表中的信息. 可以说是不幸也可以说是幸运的. 在以往遇到这样的业务,我会考虑到各种出现异常或者失败的情况.在删除一张表数据失败的情况,对 ...

  9. spark-sql(spark sql cli)客户端集成hive

    1.安装hadoop集群 参考:http://www.cnblogs.com/wcwen1990/p/6739151.html 2.安装hive 参考:http://www.cnblogs.com/w ...

  10. 为什么python中没有switch case语句

    终于知道了python中映射的设计哲学. 我自己写的code : class order_status_switcher(object): def get_order_status(self,argu ...