canutils上板测试问题记录
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上板测试问题记录的更多相关文章
- Xilinx FGPA 上板调试 集成逻辑分析工具 Integrated Logic Analyzer(ILA) 简单配置 chipscope
Xilinx Vivado 提供了上板后的FPGA逻辑分析,信号视图显示等功能. 需要注意,上板后查看信号需要重新综合,并且需要耗费一定的片上布局布线资源. 1. 添加debug信号 可以对模块端口或 ...
- 接上一篇中记录Echarts进度环使用【不同状态不同进度环颜色及圈内文字】--采用单实例业务进行说明
接上一篇中记录Echarts进度环使用 此处处理不同状态下不同进度环颜色及圈内文字等的相关处理,采用实际案例源码说明 -----------------偶是华丽丽分割线---------------- ...
- 2-51单片机WIFI学习(开发板测试远程通信详细介绍)
前一篇链接(最后有APP安装包下载地址) http://www.cnblogs.com/yangfengwu/p/8720148.html 由于自己别的贴片的板子还没到,所以用自己的8266最小系统板 ...
- cvte春招测试面试记录
cvte春招测试面试记录,挂在了综合面试(hr面)...尽量回忆面试的问题(可能不完全). 技术面一面: 1.自我介绍 2.根据实习项目问,智能客服怎么测正确率之类的. 3.测试人脸解锁 4.测试微信 ...
- 【技术博客】Postman接口测试教程 - 环境、附加验证、文件上传测试
Postman接口测试教程 - 环境.附加验证.文件上传测试 v1.0 作者:ZBW 前言 继利用Postman和Jmeter进行接口性能测试之后,我们发现Postman作为一款入门容易的工具,其内置 ...
- 分布式文件系统 - FastDFS 配置 Nginx 模块及上传测试
也不说废话,直接干 上一篇 分布式文件系统 - FastDFS 在 CentOS 下配置安装部署 中安装了 FastDFS 后,并配置启动了 Tracker 和 Storage 服务,已经可以上传文件 ...
- 微软官方网站线上兼容测试平台-Browser screenshots
前端开发时最不想做的就是在不同浏览器.平台和分辨率测试网页显示效果,通常这会浮现许多问题,尤其浏览器版本就可能让显示成效完全不同,也只好尽力维持让每一种设备都能正常浏览网页.修改到完全没有问题必须投入 ...
- 通过ALM OTA API获取test case的信息,并上传测试结果到test set中
ALM提供了OTA接口,可以用来获取和上传测试数据到ALM.比如获取Test case的step信息.上传测试结果到test instance. 在ALM的Help中可以下载相关文档,这里以ALM11 ...
- 无需编译app切换线上、测试环境
在咱们测试过程中,经常需要切换测试环境和线上环境.大致有如下几个方案. 一.服务器地址编译到app中 此种方式需要在代码里保存两套配置,一套指向线上,一套指向测试.通过编译参数分别生成测试包.线上包. ...
随机推荐
- 【物联网】国内几大云计算厂商的物联网IOT解决方案-阿里云、腾讯、百度、华为、青云(转)
一.前言随着万物互联时代的来临,IOT逐渐成为各大云计算厂商重点发力的方向,作为平台厂商,提供的是包含接入.存储.管理.计算.展示等多个方面的综合能力,我这里就根据它们各自的特点和能力,简单介绍下它们 ...
- 125、Android样式的开发(转载)
Android样式的开发:drawable汇总篇 http://android.jobbole.com/82117/Android样式的开发:layer-list篇 http://android.jo ...
- fetch get方法的时候报错
fetch 报错 Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body. 翻译过来就 ...
- Vue2学习笔记:计算属性(computed)
参考:https://www.cnblogs.com/zycbloger/p/6428907.html
- oracle 字符转换成数字
1>函数转换 select nvl2(translate(a.data, '\1234567890.', '\'), null, a.data) n, a.data from rpt_detai ...
- oracle 11g R2(静默安装)
参考博客地址:https://blog.csdn.net/jameshadoop/article/details/48223645 https://www.abcdocker.com/abcdocke ...
- php验证18位身份证,准到必须输入正确的身份证号,
/** * 验证18位身份证(计算方式在百度百科有) * @param string $id 身份证 * return boolean */ function check_identity($id=' ...
- C++关于运算符重载知识点
1) 除了类属关系运算符".".成员指针运算符".*".作用域运算符"::".sizeof运算符和三目运算符"?:"以外 ...
- Codeforces 1114 - A/B/C/D/E/F - (Undone)
链接:http://codeforces.com/contest/1114 A - Got Any Grapes? 题意:甲乙丙三个人吃葡萄,总共有三种葡萄:绿葡萄.紫葡萄和黑葡萄,甲乙丙三个人至少要 ...
- Gym 101194A / UVALive 7897 - Number Theory Problem - [找规律水题][2016 EC-Final Problem A]
题目链接: http://codeforces.com/gym/101194/attachments https://icpcarchive.ecs.baylor.edu/index.php?opti ...