Perform LTP on Android
Preface
LTP WiKi said, "The Linux Test Project is a joint project started by SGI, developed and maintained by IBM, Cisco, Fujitsu, SUSE, Red Hat and others, that has a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The LTP testsuite contains a collection of tools for testing the Linux kernel and related features."The kernel layer of Android is based on Linux. User can connect to Linux Console by Android ADB. Download the LTP from official website, it can run on Linux PC. However, it can not run on ARM platform such as Android because of its original design on X86. Therefore, if you would like to use LTP on Android, the Cross Compiler is required.
Introduction
Configuration Environment1. Prepare a PC and install Ubuntu64 bit on it. (version 12 is applicable.)
2. Download the Cross Compiler from sourcery.mentor.com. (Newer version is applicable.)
3. Install following program on Ubuntu
- sudo apt-get install git-core flex bison gperf libesd0-dev libwxgtk2.6-dev zlib1g-dev build-essential libstdc++5 tofrodos
- sudo apt-get install x-dev
- sudo apt-get install libx11-dev
- sudo apt-get install libncurses5-dev
- sudo apt-get install libreadline-dev
- sudo apt-get install g++-multilib (For build kernel)
- Ubuntu 64bit
- apt-get install ia32-libs ia32-libs-gtk
- sudo dpkg-reconfigure dash Selection 'NO‘
- ./arm-2012.09-64-arm-none-linux-gnueabi.bin
3. Download LTP source code from sourceforge.net
4. Environment settings for Cross Compiler
- You need to modify the file path for your own. Note that settings here is for ARM platform.
export PATH=$PATH:/home/carl/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/
export CC=/home/carl/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/arm-none-linux-gnueabi-gcc
export LD=/home/carl/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/arm-none-linux-gnueabi-ld
export AR=/home/carl/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/arm-none-linux-gnueabi-ar
export LIB_DIR=/home/carl/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/lib
export AS=/home/carl/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/arm-none-linux-gnueabi-as
export RANLIB=/home/carl/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/arm-none-linux-gnueabi-ranlib
export STRIP=/home/carl/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/arm-none-linux-gnueabi-strip
Compile and install LTP
1. Configuration
./configure AR=arm-none-linux-gnueabi-ar CC=arm-none-linux-gnueabi-gcc RANLIB=arm-none-linux-gnueabi-ranlib STRIP=arm-none-linux-gnueabi-strip --host=arm-linux --target=arm-linux CFLAGS="-static" LDFLAGS="-static -pthread“
Compile and install LTP
1. Configuration
./configure AR=arm-none-linux-gnueabi-ar CC=arm-none-linux-gnueabi-gcc RANLIB=arm-none-linux-gnueabi-ranlib STRIP=arm-none-linux-gnueabi-strip --host=arm-linux --target=arm-linux CFLAGS="-static" LDFLAGS="-static -pthread“
2. Some values of parameter should be changed for ARM platform. Here I illustrate what should be changed by the version in 2012. (The version of 2013 is applicable)
- Find and edit the file ltp-full-20120104/testcases/kernel/controllers/libcontrollers/libcontrollers.h and add one line for LINE_MAX and define its value as 255.
- Change the varialbe name of array in random-access.c, random-del-create.c and random-access-del-create.c which files are located at ltp-full-20120104/testcases/kernel/fs/fs-bench/
- Find and edit the files named ltp-full-20120104/testcases/kernel/sched/sched_stress/sched_driver.c and ltp-full-20120104/testcases/kernel/fs/ftest/libftest.c and add one line for PATH_MAX and define its value as1024.
- Find and edit the file ltp-full-20120104/testcases/kernel/sched/cfs-scheduler/hackbench.c and add one line for PTHREAD_STACK_MIN and define its value as 1024.
- make
- make install prefix=/[Install Folder]
Deploy LTP into your Android device
1. Download Busybox and push it to your Android in order to have necessary shell command on Android. adb push busybox /data/local/tmp
2. Push all the installed LTP folder (Install Folder) to Android. I always push the files to /data/local/tmp.
3. Ln all the command from busybox. Following examples only shows you some pieces, you need to ln all the commands that busybox have.
4. Setting the LTP variable environment in Adroid. You need to change the path to where your file located in Android.
Run LTP on Android2. Push all the installed LTP folder (Install Folder) to Android. I always push the files to /data/local/tmp.
3. Ln all the command from busybox. Following examples only shows you some pieces, you need to ln all the commands that busybox have.
- busybox ln -f busybox readlink
- busybox ln -f busybox basename
- busybox ln -f busybox mktemp
- busybox ln -f busybox dirname
- busybox ln -f busybox grep
- busybox ln -f busybox sed
- busybox ln -f busybox awk
- busybox ln -f busybox head
- busybox ln -f busybox free
- busybox ln -f busybox uname
4. Setting the LTP variable environment in Adroid. You need to change the path to where your file located in Android.
- export PATH=/data/local/tmp/busyboxdir:$PATH
- export PATH=/data/local/tmp/LTP13:$PATH
- export PATH=/data/local/tmp/LTP13/testcases/bin:$PATH
- export PATH=/data/local/tmp/LTP13/runtest:$PATH
sh ./runltp -p -l 130326report1ipc.log -o 130326output1ipc.log -d /data/local/tmp/LTP13/tmp -f ipc
Reference
Internet Q&AKeyword: LTP, Android, Linux Test Project, Stress Test, Android Reliability, Automation Test. Share to Line
Hi, How about the tests which fails on android platform and pass on normal linux kernel. I've tried running on android and observed lot of tests are failing due to environment and also the APIs which are exposing by bionic libc. Do you fix them locally? If yes, can i get the patches for the same to try?
回覆刪除Thanks in advance.
I tried to fix some failure on Android platform. Most of failures belong to the path of folder. You're free to change the path of folder in script, then you can get a lot of pass on it.
回覆刪除I am not able to cross-compile the LTP for the android.
回覆刪除kuşadası
回覆刪除milas
çeşme
bağcılar
siirt
EE1F
adıyaman
回覆刪除sakarya
yalova
tekirdağ
amasya
V8T8
6D830
回覆刪除Trabzon Evden Eve Nakliyat
buy sustanon
order sustanon
Nevşehir Evden Eve Nakliyat
Afyon Evden Eve Nakliyat
Silivri Fayans Ustası
buy trenbolone enanthate
halotestin for sale
order masteron
15FE8
回覆刪除Adana Şehirler Arası Nakliyat
Sinop Evden Eve Nakliyat
Kastamonu Evden Eve Nakliyat
Kırşehir Lojistik
Ankara Parke Ustası
Eskişehir Evden Eve Nakliyat
Tekirdağ Şehirler Arası Nakliyat
Mamak Boya Ustası
Bursa Lojistik
21340
回覆刪除yabancı görüntülü sohbet uygulamaları
Ağrı Sesli Sohbet Mobil
balıkesir canlı sohbet sitesi
afyon muhabbet sohbet
seslı sohbet sıtelerı
Tunceli Görüntülü Sohbet Kadınlarla
balıkesir rastgele canlı sohbet
osmaniye ucretsiz sohbet
ordu bedava sohbet chat odaları
87C86
回覆刪除sakarya sohbet chat
Adana En İyi Görüntülü Sohbet Uygulaması
Mardin Görüntülü Sohbet Siteleri
sinop canli sohbet bedava
canlı sohbet ücretsiz
Karabük Rastgele Canlı Sohbet
Kastamonu Sohbet Sitesi
balıkesir canlı sohbet
Bartın Canlı Sohbet Sitesi
63322
回覆刪除Edirne Sohbet
giresun görüntülü sohbet sitesi
antep görüntülü sohbet uygulamaları ücretsiz
Ordu Goruntulu Sohbet
en iyi görüntülü sohbet uygulamaları
siirt sesli sohbet uygulamaları
Aksaray Telefonda Canlı Sohbet
ankara canlı sohbet siteleri ücretsiz
bedava sohbet uygulamaları
F36C0
回覆刪除Binance Referans Kodu
Soundcloud Takipçi Satın Al
Bonk Coin Hangi Borsada
Kripto Para Nedir
Binance Referans Kodu
Shinja Coin Hangi Borsada
Binance Hesap Açma
Pi Network Coin Hangi Borsada
Facebook Sayfa Beğeni Hilesi
7C1B9
回覆刪除Bitcoin Kazma Siteleri
Area Coin Hangi Borsada
Gate io Borsası Güvenilir mi
Dxgm Coin Hangi Borsada
Likee App Takipçi Satın Al
Telegram Abone Satın Al
Arg Coin Hangi Borsada
Luffy Coin Hangi Borsada
Parasız Görüntülü Sohbet
5D107
回覆刪除Binance Kaldıraçlı İşlem Nasıl Yapılır
Discord Sunucu Üyesi Satın Al
Binance Ne Kadar Komisyon Alıyor
Youtube İzlenme Hilesi
Spotify Takipçi Satın Al
Coin Çıkarma Siteleri
Gate io Borsası Güvenilir mi
Pepecoin Coin Hangi Borsada
Area Coin Hangi Borsada
DA9D9
回覆刪除avax
ellipal
dcent
aave
raydium
looksrare
safepal
arbitrum
arbitrum
DF196
回覆刪除uniswap
looksrare
shiba
satoshi
dextools
phantom
uwu lend
yearn
defilama
ACB04
回覆刪除avalaunch
pancakeswap
poocoin
phantom wallet
bscpad
yearn finance
DefiLlama
dappradar
trezor suite