OMAP Kernel driver tests

This is the device driver test (DDT) page, part of the Linux OMAP  Project.

Introduction
This page provides a general overview of the test and test automation tools used for the OMAP Linux Kernel software development.

Device driver test code
Test cases for OMAP specific device drivers are written and maintained in a separate git tree.

Old repository: device_driver_test

New repository: omap-ddt

DDT cloning information
New repository at gitorious.org

git clone git://gitorious.org/omap-ddt/omap-ddt.git

Branches:
 * master device driver test support for upstream Kernel
 * ddt-2.6.35 device driver test support for Kernel 2.6.35 and below
 * ddt-2.6.39 device driver test support for Kernel 2.6.39

master branch is the main development tree and others branches are meant to support specific Kernel revisions. Changes or patches applicable across the branches will be cherry-pick from master branch.

Structure of device driver test code

 * The device_driver_test repository is organised into a series of folders for testing each driver (ex: GPIO, UART)
 * Each folder has a collection of bash scripts, kernel modules and user space utilities as needed to test the driver.
 * Each testcase is numbered, and exists in /test_code/scripts/scenarios/
 * The support modules and scripts exist in test_code/utils and the utils directory at the top level

Compiling the test code
or be copied to the target filesystem on OMAP, conventionally as /testsuites
 * Because of kernel module dependencies, the kernel to be tested has to be configured and built first before building the test code.
 * 'make' is used to build the testcode
 * cd $device_driver_test
 * make KDIR=/path/to/kernel/directory TESTSUITES=
 * make KDIR=/path/to/kernel/directory TESTSUITES=all
 * See the readme file at the top level device_driver_test for more details.
 * On successful compilation, the output is stored in /build directory. This is expected to

Target Filesystem setup
ANDROID USERS:

1. Download Busybox and Bash from DailyBuild /extras/busybox.tar.bz2 /extras/bash.tar.bz2 2. Untar both packages in your HOST machine tar -xjvf busybox.tar.bz2 tar -xjvf bash.tar.bz2 3. Copy Bash binary into busybox/bin/ 4. Flash busybox into /data partition of target filesystem 5. Verify that busybox tools have executable permissions chmod 777 /data/busybox/bin/* chmod 777 /data/busybox/sbin/* 6. Add Busybox to the global PATH variable PATH:/data/busybox/bin:/data/busybox/sbin:$PATH 7. Create symlinks for scripts executions mount -o remount rw / ln -s /data/busybox/bin /bin ln -s /data/busybox/sbin /sbin

Troubleshooting:

Delete /data/busybox/bin/rmmod to use the default Android rmmod tool under /system/bin/
 * rmmod not working

Delete /data/busybox/bin/reboot to use the default Android reboot tool under /system/bin/
 * reboot not working

Executing test cases

 * The testcases are executed using the PAN module, similar to the one used in Linux test project http://ltp.sourceforge.net/ . This has already been bundled into the utils folder at the top level
 * Each testcase is called as a scenario, and usually numbered as L_DD_ __. For example, the first DMA test case is L_DD_DMA_0001_0001
 * In order to execute a scenario, navigate to /test_code/scripts and type ./test_runner.sh 
 * The test module provides a PASS or FAIL output
 * Logs are stored as .log on the same folder

Automated tests using TITAN
Titan is a java based test automation tool. It is used in conjunction with OMAP device driver tests to execute the tests repeatedly and automatically. Visit Titan_Test_Automation page for more information

Additional Notes

 * See USB_Testing for extra information on USB specific test setup


 * Packages needed for compilation in UBUNTU

sudo apt-get install flex textinfo