测试可以采用 sdk 下的google开源工具 external/stressapptest
也可以采用 开源的memtester。

(1)stressapptest 其是:Stressful Application Test (stressapptest) 的简称
Stressful Application Test试图让来自处理器和I/O到内存的数据尽量随机化,以创造出模拟现实的环境来测试现在的硬件设备是否稳定,Google就在使用它.其大概如下:
stressapptest may be used for various purposes:
Stress test: as described here.
Hardware qualification and debugging.
Memory interface test: see theTheory behind this.
Disk testing.
据谷歌的介绍,这个软件会生产线程来拷贝和直接对磁盘进行读取和写入。目标则是尽可能地载入系统内存,以便更加有效地进行测试。该软件更多的时候测试的是内存控制器和总线接口,而不是存储单元的功能。谷歌称,与其他内存诊断程序的比较,五分之一的内存模块相关的系统误差只能通过stressapptest发现。
参数介绍:
e.g. MemFree indicates that there are 1140234 kB memory left. You can use the following command to start the stress test:
./stressapptest -s 86400 -m 4 -i 4 -c 4 -C 4 -M xxx
It is to stress test memory copy, invert, crc check for 1hour with 900Mb memory.
-s: number of second to run the application 测试时间
-m: number of memory copy threads to run 复制线程数 (Memory Copy)
-i: number of memory invert threads to run 反转线程数 (Invert Copy)
-c: CRC check CRC校验 (Data Check)
-C: number of memory CPU stress threads to run CPU压力线程数
-M: Megabytes of ram to run 尽可能测试最大的可用存储空间,(设置超过了memfree,就会被kill)

(2)Memtester主要是捕获内存错误和一直处于很高或者很低的坏位, 其测试的主要项目有随机值,异或比较,减法,乘法,除法,与或运算等等. 通过给定测试内存的大小和次数, 可以对系统现有的内存进行上面项目的测试。
参数介绍:
memtester [-p PHYSADDR] [ITERATIONS]
MEMORY 申请测试内存的数量,单位默认是megabytes(兆),也可以是B K M G
ITERATIONS 测试的次数,默认是无限

./configure --host=armv7a-none-linux-gnueabi --with-static
make

参考:https://blog.csdn.net/morixinguan/article/details/54133592

github地址:https://github.com/stressapptest/stressapptest

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐