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中 此种方式需要在代码里保存两套配置,一套指向线上,一套指向测试.通过编译参数分别生成测试包.线上包. ...
随机推荐
- 解决修改sources.list之后update NO_PUBKEY错误
最近鼓捣一个新基于debian的服务器,修改sources.list之后update的时候报类似如下错误: W: GPG error: http://ftp.us.debian.org lenny-p ...
- 解决 nginx 出现 413 Request Entity Too Large 的问题
1.若nginx用所用的 php 请求解析服务是 fpm, 则检查 /etc/php5/fpm/php.ini 文件中的参数 upload_max_filesize = 20M post_max_si ...
- package.json文件配置信息
1.概述 每个项目的根目录下面,一般都有一个package.json文件,定义了这个项目所需要的各种模块,以及项目的配置信息(比如名称.版本.许可证等元数据).npm install命令根据这个配置文 ...
- yarn卸载或增加节点
yarn卸载或增加节点 卸载节点或者增加节点: 方式一:静态的增添删除:将集群关闭,修改配置文件(etc/hadoop/slaves),重新启动集群(很黄很暴力,不够人性化). 方式二:动态的增加 ...
- a标签强制不换行
a标签文字强制不换行 强制不换行 a{ white-space:nowrap; } 再补充说明所有关于换行的CSS样式: white-space: normal|pre|nowrap|pre-wrap ...
- tuple的基本使用
常用如下所示: # 元祖,tuple-->不可变,但元祖里面的数据可以变化 # 当元祖只有一个元素时,需加’,‘,否则类型是<class 'int'> # tuple1 = (1) ...
- Java Filter(拦截器)
多个Filter按照在配置文件中配置的filter顺序执行. 在web.xml文件中配置该Filter,使用init-param元素为该Filter配置参数,init-param可接受如下两个子元素: ...
- mybatis(二)--相关属性及相关细节
mapper接口动态代理 动态代理dao开发规则 1.namespace必需是接口的全路径名 2.接口的方法名 必需与 映射文件的sql id一致 3.接口的输入参数必需与映射文件的parameter ...
- CookieUitl
import javax.servlet.http.Cookie;import javax.servlet.http.HttpServletRequest;import javax.servlet.h ...
- Ethzasl MSF源码阅读(1):程序入口和主题订阅
关于IMU融合知乎上的一篇问答:有哪些开源项目是关于单目+imu做slam的? Ethz的Stephen Weiss的工作,是一个IMU松耦合的方法. 1.程序入口:ethzasl_msf\msf_u ...