linux psp functional test bench (lftb)

40
Linux PSP Functional Test Bench (LFTB) User Guide Literature Number: SPRUXXX Dec 2008

Upload: others

Post on 25-Mar-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Linux PSP Functional Test Bench (LFTB)

User Guide

Literature Number: SPRUXXX

Dec 2008

ii

IMPORTANT NOTICE

Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifi cations, enhancements, improvements, and other changes to its products and services at any time and to discontinue any produc t or service without notice. Customers should obtain the latest relevant information before placing orders and should verif y that such information is current and complete. All products are sold subj ect to TI’s terms and conditions of sale supplied a t the time of order acknowledgment. TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality contro l techniques are used to the extent TI deems necess ary to support this warranty. Except where mandated by government requi rements, testing of all parameters of each product is not necessarily performed. TI assumes no liability for applications assistance or customer product design. Customers are responsi ble for their products and applications using TI components. To minimize t he risks associated with customer products and appl ications, customers should provide adequate design and operating safegu ards. TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or proc ess in which TI products or services are used. Information published by TI rega rding third-party products or services does not con stitute a license from TI to use such products or services or a warranty or e ndorsement thereof. Use of such information may req uire a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI. Reproduction of TI information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this i nformation with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documen tation. Information of third parties may be subject to additional restrict ions. Resale of TI products or services with statements d ifferent from or beyond the parameters stated by TI for that product or service voids all express and any implied warrantie s for the associated TI product or service and is a n unfair and deceptive business practice. TI is not responsible or liable for any such statements. TI products are not authorized for use in safety-cr itical applications (such as life support) where a failure of the TI product would reasonably be expected to cause severe person al injury or death, unless officers of the parties have executed an agreement specifically governing such use. Buyers r epresent that they have all necessary expertise in the safety and regulatory ramifications of their applications, and acknowledge and agree that they are solely respons ible for all legal, regulatory and safety-related requirements concerning their products and any use of TI products in suc h safety-critical applications, notwithstanding any applications-related information or support that may be provided by TI. Further, Buyers must fully indemnify TI and its representatives aga inst any damages arising out of the use of TI produ cts in such safety-critical applications. TI products are neither designed nor intended for u se in military/aerospace applications or environmen ts unless the TI products are specifically designated by TI as milit ary-grade or "enhanced plastic." Only products desi gnated by TI as military-grade meet military specifications. Buyers acknowledge and agree that any such use of TI prod ucts which TI has not designated as military-grade is solely at the Buyer 's risk, and that they are solely responsible for c ompliance with all legal and regulatory requirements in connection with such use. TI products are neither designed nor intended for u se in automotive applications or environments unles s the specific TI products are designated by TI as compliant with ISO /TS 16949 requirements. Buyers acknowledge and agre e that, if they use any non-designated products in automotive applications, TI will not be responsible for any fa ilure to meet such requirements. Following are URLs where you can obtain information on other Texas Instruments products and applicatio n solutions: Products Applications Amplifiers amplifier.ti.com Audio www.ti.com/audio Data Converters dataconverter.ti.com Automotive www.ti.com/automotive DSP dsp.ti.com Broadband www.ti.com/broadband Clocks and Timers www.ti.com/clocks Digital Control www.ti.com/digitalcontrol Interface interface.ti.com Medical www.ti.com/medical Logic logic.ti.com Military www.ti.com/military Power Mgmt power.ti.com Optical Networking www.ti.com/opticalnetwork Microcontrollers microcontroller.ti.com Security www.ti.com/security RFID www.ti-rfid.com Telephony www.ti.com/telephony RF/IF and ZigBee® Solutions www.ti.com/lprf Video & Imaging www.ti.com/video

Wireless www.ti.com/wireless Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265

Copyright 2008, Texas Instruments Incorporated

iii

Preface

Read This First

About This Manual

This document describes how to install and work wit h Linux Functional Test Bench. The Package serves to provide applicati on software for validation of Linux Device Drivers, which are part of the Linux PSP package.

This release supports OMAP35x (including GIT), DM64 4x and DM646x platforms. The Package has been compiled with Code sourcery and MV tool chains based on respective Linux PSP release n otes.

Intended Audience

This document is intended for the users of Linux PS P package who might want to validate the functionality of various devic e drivers using the Linux Functional Test Bench.

This document assumes that the user has hands on ex perience with the Linux platform and some knowledge regarding the Lin ux PSP device drivers which are being validated.

How to Use This Manual

This document includes the following chapters:

� Chapter 1 – Introduction , gives the brief introduction about the Linux functional test bench.

� Chapter 2 - Installation , describes the installation procedure for Linux functional test bench.

� Chapter 3 - Build , describes the build procedure for Linux functiona l Test bench.

� Chapter 4 – Using Linux functional test bench , describes the test setup details, procedure to be followed for running the scripts that are provided as part of the tool, and executing the tes t suites through command line.

� Appendix A - General Setup Details , provides information about the EVM setting details and output/input console settin g details.

� Appendix B - Adding New Test Case , provides details on how a test case can be added to Linux functional test bench.

iv

Before you proceed with the installation, see Linux_functional_test_bench_releasenotes.html file available in the release package for the product requirements.

Terms and Abbreviations

The following terms and abbreviations are used in t his document.

Term/Abbreviation Description

DUT Device Under Test

API Application Programming Interface

IO Input/Output

IOCTL Input Output Control

NTSC National Television System Committee

PAL Phase Alternating Line

TV Television

DSS Display Sub System

If You Need Assistance

For any assistance, send a mail to [email protected].

Text Conventions

The following conventions are used in this document :

� Text inside back-quotes (‘‘) represents pseudo-code .

� Program source code, function and macro names, para meters, and command line commands are shown in a mono-spaced font.

Trademarks

Code Composer Studio, DSP/BIOS, TMS320, TMS320C64x, TMS320C6000 and TMS320C64x+ are trademarks of Texas Instruments.

All trademarks are the property of their respective owners.

v

Contents

Read This First .................................... ............................................................................iii Contents........................................... .................................................................................v Figures ............................................ ................................................................................vii Tables............................................. ................................................................................viii Revision History ................................... ...........................................................................ix Introduction ....................................... ........................................................................... 1-1

1.1 Overview......................................................................................................... 1-1 1.1.1 Supported Services............................................................................................1-1 1.1.2 Supported Features ...........................................................................................1-1

1.2 Basic Hardware and Software Requirements............. ..................................... 1-2 1.2.1 Hardware Requirements ....................................................................................1-2 1.2.2 Software Requirements......................................................................................1-2

Installation ....................................... ............................................................................. 2-1 2.1 Installation....................................................................................................... 2-1

Build 3-1 3.1 Compiling U-Boot............................................................................................ 3-1 3.2 Compiling Linux Kernel ................................................................................... 3-1 3.3 Compiling the LFTB test suites...................... .................................................. 3-1

Using the Test Suite ............................... ...................................................................... 4-1 4.1 V4L2 display ................................................................................................... 4-1

4.1.1 Test Setup ..........................................................................................................4-1 4.1.2 Test Environment ...............................................................................................4-1 4.1.3 Using the V4L2 Display Application ................. ..................................................4-2 4.1.4 Using the V4L2 Display tests from Command line..... ........................................4-2 4.1.5 Using Script for V4L2 Display ...................... ......................................................4-3

4.2 V4L2 capture................................................................................................... 4-5 4.2.1 Test Setup ..........................................................................................................4-5 4.2.2 Test Environment ...............................................................................................4-5 4.2.3 Using the V4L2 capture Application................. ..................................................4-5 4.2.4 Using the Command line for V4L2 Capture ............ ...........................................4-5 4.2.5 Using Script for V4L2 Capture ...................... .....................................................4-8

4.3 Fbdev display.................................................................................................. 4-9 4.3.1 Test Setup ..........................................................................................................4-9 4.3.2 Test Environment .............................................................................................4-10 4.3.3 Using the FBDEV Display Application ................ .............................................4-10 4.3.4 Using the Command line for FBDEV Display........... ........................................4-10 4.3.5 Using Script for FBDEV Display..................... ..................................................4-11

4.4 Resizer.......................................................................................................... 4-13 4.4.1 Test Setup ........................................................................................................4-13 4.4.2 Test Environment .............................................................................................4-13 4.4.3 Using the Resizer Application ...................... ....................................................4-13 4.4.4 Using the Command line for Resizer ................. ..............................................4-13 4.4.5 Using Script for Resizer ........................... ........................................................4-15

4.5 PWM …………………………………………………………………………………4-16 4.5.1 Test Setup ........................................................................................................4-16

vi

4.5.2 Test Environment .............................................................................................4-17 4.5.3 Using the PWM Application.......................... ....................................................4-17 4.5.4 Using the Command line for PWM..................... ..............................................4-17 4.5.5 Using Script for PWM............................... ........................................................4-18

General Setup Details.............................. ..................................................................... 4-1 A.1 HyperTerminal/TeraTerm Settings .................................................................. 4-1

Adding New Test Case ............................... .................................................................. 4-1 B.1 Adding a new test module to the LFTB package ........ ..................................... 4-1 B.2 Adding a new test case to an existing test suite ......... ..................................... 4-2

vii

Figures

Figure 4-1 V4L2 display Test Setup................. ............................................................ 4-1 Figure 4-2 V4L2 capture Test Setup................. ........................................................... 4-5 Figure 4-3 FBDEV Test Setup ........................ ............................................................ 4-10 Figure 4-4 Resizer Test Setup....................... ............................................................. 4-13 Figure 4-5 PWM Test Setup .......................... ............................................................. 4-16 Figure B-1. Functional Test Bench Directory structu re ............................................. 4-2

viii

Tables

Table A-1. HyperTerminal/TeraTerm Settings......... ....................................................A-1

ix

Revision History

Date Author Comments Version

Nov 10, 2008 Prathap.M.S, Shwetha Krishnamurthy, Prachi Sharma

Initial Draft 0.1.0

Dec 10, 2008 Prachi Sharma, Prathap.M.S

Added Resizer and PWM details 0.2.0

1-1

Chapter 1

Introduction

This chapter describes the services, features, and requirements of the Linux PSP Functional Test Bench (LFTB).

1.1 Overview

Linux PSP Functional Test Bench supports validation of various Linux device drivers supplied as part of the Linux Suppor t Packages/Linux PSP packages for TI platforms. The current package supp orts V4L2 display, V4L2 capture, Resizer, FBDEV display and PWM test s uites. This product can be scaled up to add support for new drivers, ne w platforms and additional features.

1.1.1 Supported Services

Linux PSP functional Test Bench provides the follow ing test suites-

� V4L2 Display

� V4L2 Capture

� Fbdev Display

� Resizer

� PWM

1.1.2 Supported Features

� Linux PSP Functional Test Bench supports validatin g the functionality of device drivers supported as part of LSP/PSP package s.

� Linux PSP Functional Test bench has a look and fee l similar to any open source Linux tool or utility. So this will help the users learn and use the tool quickly and easily.

� Linux PSP Functional Test Bench supports stress, s tability and API tests in addition to the functional tests.

� Using the scripts available in the package for all the device drivers, validation of various device driver features can be done with minimal manual effort.

� Using the command line, user can validate a partic ular feature of the device driver he is interested in.

Introduction

1-2

� Supports different types of logging – test start, trace logs, warning, errors, test result and test end logs.

1.2 Basic Hardware and Software Requirements

1.2.1 Hardware Requirements

The Hardware required for using the Linux Functiona l Test Bench is

� EVMs with Power supplies.

� UART and Ethernet Cables

� Video cables(S-Video, composite, component, DVI)

� TV (Video display)

� DVD, Camera (Video inputs/sources)

� Any specific hardware required for video capture.

The specific hardware requirements for individual m odule have been mentioned in Chapter 4.

1.2.2 Software Requirements

� Code sourcery tool chain

� MV tool chain

� Linux LSP/PSP packages.

2-1

Chapter 2

Installation

This chapter describes the installation procedure f or Linux PSP functional test bench.

2.1 Installation

� Install the Linux PSP package as per the instructi ons provided in the Linux PSP User Guide.

� Install Linux_functional_test_bench_01_00_01_01.tar.gz by unzipping the package using the command tar –xvzf Linux_functional_test_bench_01_00_01_01.tar.gz in the Linux Operating System.

3-1

Chapter 3

Build

This chapter describes the build procedure for U-Bo ot, Linux kernel, and Linux PSP functional test bench.

3.1 Compiling U-Boot

See user guides available in respective Linux PSP P ackages, for compiling U-Boot.

3.2 Compiling Linux Kernel

See user guides available in respective Linux PSP p ackages for compiling Linux Kernel.

3.3 Compiling the LFTB test suites

Each test suite has only a top level Makefile. The Makefile needs to be modified for just pointing to the intended Linux ke rnel directory (based on the platform) and the Tool chain version being used .

The user can compile the test suite using the Makef ile provided. Below is an example to build any of the test suites for the platform OMAP35x.

make PLATFORM=OMAP35x clean

make PLATFORM=OMAP35x

For more options, please refer the README provided in each of the test suites.

4-1

Chapter 4

Using the Test Suite

This chapter describes the test setup details, proc edure for running the scripts that are provided as part of Linux function al test bench, and executing the tests through the command line.

4.1 V4L2 display

This section provides the steps to execute the V4L2 display tests using the scripts or command line utility. It also provides t he test setup information, test environment, and command line arguments.

4.1.1 Test Setup

Figure 4-1 V4L2 display Test Setup

4.1.2 Test Environment

� DUT (Device Under Test), serial console

� TV to display the output

PC

DUT Serial

Linux PC (NFS Root) Ethernet

TV

LCD

Video Cable

Using the Test Suite

4-2

4.1.3 Using the V4L2 Display Application

The V4L2 display application can be run either thro ugh the command line or by running the script.

4.1.4 Using the V4L2 Display tests from Command lin e

For this, refer the README provided in the V4L2 Dis play test suite. The sample logs for the same are provided below.

Go to bin directory of the V4L2 display test suite and run the executables as shown in different cases below:

Case 1- Execution of test without providing any co mmand line options(Runs with default values). (Here xxxxxx could be dm646x, omap35x or omap35x_GI T)

[root@OMAP3EVM msp]# ./xxxxx_v4l2_display_tests

| TRACE LOG| The Test is going to start with follow ing values |

| TRACE LOG| The device node | /dev/video1

| TRACE LOG| The height of the image | 480

| TRACE LOG| The width of the image | 640

| TRACE LOG| The number of buffers | 3

| TRACE LOG| The number of frames | 1000

|TEST START| DisplayTests

| TRACE LOG| V4L2 device node /dev/video1 opened |

| TRACE LOG| S_FMT Ioctl Passed |

| TRACE LOG| G_FMT Ioctl Passed |

| TRACE LOG| REQBUF Ioctl Passed |

| TRACE LOG| QUERYBUF Ioctl Passed |

| TRACE LOG| Mmap Passed |

| TRACE LOG| Enqueuing Buffers Passed |

| TRACE LOG| Streaming on for frames | 1000

| TRACE LOG| Display Successful

| TRACE LOG| Streaming off.....Stopping display |

| TRACE LOG| Buffers unmapped Successfully |

| TRACE LOG| V4L2 device node /dev/video1 closed |

|TEST RESULT|PASS| DisplayTests

Using the Test Suite

4-3

|TEST END| DisplayTests

Case 2- Execution of test with some command line op tions passed(overrides the default values) (Here xxxxxx could be dm646x, omap35x or omap35x_GI T)

[root@OMAP3EVM msp]# ./xxxxx_v4l2_display_tests -d /dev/video2 -w 320 -h 240 -n 500

| TRACE LOG| The Test is going to start with follow ing values |

| TRACE LOG| The device node | /dev/video2

| TRACE LOG| The height of the image | 240

| TRACE LOG| The width of the image | 320

| TRACE LOG| The number of buffers | 3

| TRACE LOG| The number of frames | 500

|TEST START| DisplayTests

| TRACE LOG| V4L2 device node /dev/video2 opened |

| TRACE LOG| S_FMT Ioctl Passed |

| TRACE LOG| G_FMT Ioctl Passed |

| TRACE LOG| REQBUF Ioctl Passed |

| TRACE LOG| QUERYBUF Ioctl Passed |

| TRACE LOG| Mmap Passed |

| TRACE LOG| Enqueuing Buffers Passed |

| TRACE LOG| Streaming on for frames | 500

| TRACE LOG| Display Successful

| TRACE LOG| Streaming off.....Stopping display |

| TRACE LOG| Buffers unmapped Successfully |

| TRACE LOG| V4L2 device node /dev/video2 closed |

|TEST RESULT|PASS| DisplayTests

|TEST END| DisplayTests

4.1.5 Using Script for V4L2 Display

To use V4L2 display application by running the scri pt:

Using the Test Suite

4-4

1. See the respective Linux PSP Release User Guides and flash the EVM.

2. In Power switch off mode, connect the TV to the DUT using any one of the interfaces (For e.g. S-Video in case of OMAP35x).

3. Open HyperTerminal/Teraterm (Output/Input console). Set the required settings for HyperTerminal/TeraTerm (see s ection A.1). Switch on the power for EVM to boot.

4. See the Linux PSP Release User Guides for enabli ng display driver, compiling and running Linux Kernel.

5. Environment variables needs to be updated as spe cified in Linux PSP Release User Guides. Press CTRL+C to stop booting immediately after bootup prints starts. Use the com mand printenv to see the environment variables and update them, if necessary. Then boot up the kernel.

6. With the Linux command prompt, we are now ready to run the display test.

7. In the console, run the V4L2 display script. The re are scripts present under scripts directory of the V4l2 display test suite top level directory. There is a script for each platfor m. For eg to run the V4L2 display tests for OMAP35x platform, run the sc ript as below-./ omap35x_sample_usage_script.sh and press Enter .

V4L2 Display Script Details

The omap35x_sample_usage_script.sh will perform the following operations on the target:

1. Displays a scrolling color bars pattern using /d ev/video1 on the LCD for 1000 frames by enqueing 3 buffers for the O MAP35x PSP releases.

2. Displays a scrolling color bars pattern using /d ev/video1 on the LCD for 1000 frames by enqueing 3 buffers for the O MAP35x PSP GIT releases.

3. Demonstrates display of color bars at different width and height.

4. Demonstrates how to display from a file.

5. Demonstrates how to run stability tests.

6. Demonstrates how to run API tests.

7. Demonstrates how to display on TV.

8. Demonstrates how to display on LCD.

9. Demonstrates how to display with different image formats supported.

Using the Test Suite

4-5

4.2 V4L2 capture

This section provides the steps to execute the V4L2 capture tests using the scripts or command line utility. It also provides t he test setup information, test environment, and command line arguments.

4.2.1 Test Setup

Figure 4-2 V4L2 capture Test Setup

4.2.2 Test Environment

� DUT (Device Under Test), serial console

� DVD player or a camera for video input.

� TV to display the output(optional – to verify capt ured video)

4.2.3 Using the V4L2 capture Application

The V4L2 capture application can be run either thro ugh the command line or by running the script.

4.2.4 Using the Command line for V4L2 Capture

For this, refer the README provided in the V4L2 Cap ture test suite. The sample logs for the same are provided below.

Go to bin directory of the V4L2 Capture test suite and run the executables as shown in different cases below:

Case 1- Execution of test without providing any com mand line options(Runs with default values). (Here xxxxxx could be dm646x, omap35x or omap35x_GI T)

[root@OMAP3EVM msp]# ./xxxxx_v4l2_capture_tests

Video Cable

PC

DUT

DVD

Player

Serial

Linux PC (NFS Root) Ethernet

Capture Card (Only for

OMAP35x)

Using the Test Suite

4-6

| TRACE LOG| The Test is going to start with follow ing values |

| TRACE LOG| The device node | /dev/video0

| TRACE LOG| The number of buffers | 3

| TRACE LOG| The number of frames | 1000

| TRACE LOG| The standard | NTSC

| TRACE LOG| The capture interface | COMPOSITE

| TRACE LOG| The display interface | LCD

| TRACE LOG| The pixel format | UYVY

|TEST START| CaptureTests

| TRACE LOG| V4L2 capture device node /dev/video0 o pened |

| TRACE LOG| G_INPUT Ioctl Passed |

| TRACE LOG| ENUMINPUT Ioctl Passed |

| TRACE LOG| Input detected is Vin (Composite) |

| TRACE LOG| QUERYSTD Ioctl Passed |

| TRACE LOG| G_STD Ioctl Passed |

| TRACE LOG| ENUMSTD Ioctl Passed |

| TRACE LOG| Current standard is NTSC |

| TRACE LOG| QUERYCAP Ioctl Passed |

| TRACE LOG| Capture device is capable of streaming |

| TRACE LOG| S_FMT Ioctl Passed |

| TRACE LOG| G_FMT Ioctl Passed |

| TRACE LOG| Detected format is same as the one set |

| TRACE LOG| REQBUFS Ioctl Passed |

| TRACE LOG| No. of Buffers allocated is 3 |

| TRACE LOG| QUERYBUF, mmap, QBUF Passed |

| TRACE LOG| Capture Initialised |

| TRACE LOG| Display Initialised |

| TRACE LOG| Display Stream on Passed |

| TRACE LOG| Capture Stream on Passed |

| TRACE LOG| Capturing and displaying now |

| TRACE LOG| Display Stream off Passed |

Using the Test Suite

4-7

| TRACE LOG| Capture Stream off Passed |

|TEST RESULT|PASS| CaptureTests

|TEST END| CaptureTests

Case 2- Execution of test with some command line op tions passed(overrides the default values) (Here xxxxxx could be dm646x, omap35x or omap35x_GI T)

[root@OMAP3EVM msp]# ./xxxxx_v4l2_capture_tests -d /dev/video0 -c 4 -n 100 –s PAL -i SVIDEO

| TRACE LOG| The Test is going to start with follow ing values |

| TRACE LOG| The device node | /dev/video0

| TRACE LOG| The number of buffers | 4

| TRACE LOG| The number of frames | 100

| TRACE LOG| The standard | PAL

| TRACE LOG| The capture interface | SVIDEO

| TRACE LOG| The display interface | LCD

| TRACE LOG| The pixel format | UYVY

|TEST START| CaptureTests

| TRACE LOG| V4L2 capture device node /dev/video0 o pened |

| TRACE LOG| G_INPUT Ioctl Passed |

| TRACE LOG| ENUMINPUT Ioctl Passed |

| TRACE LOG| Input detected is Vin (Svideo) |

| TRACE LOG| QUERYSTD Ioctl Passed |

| TRACE LOG| G_STD Ioctl Passed |

| TRACE LOG| ENUMSTD Ioctl Passed |

| TRACE LOG| Current standard is PAL |

| TRACE LOG| QUERYCAP Ioctl Passed |

| TRACE LOG| Capture device is capable of streaming |

| TRACE LOG| S_FMT Ioctl Passed |

| TRACE LOG| G_FMT Ioctl Passed |

| TRACE LOG| Detected format is same as the one set |

| TRACE LOG| REQBUFS Ioctl Passed |

Using the Test Suite

4-8

| TRACE LOG| No. of Buffers allocated is 4 |

| TRACE LOG| QUERYBUF, mmap, QBUF Passed |

| TRACE LOG| Capture Initialised |

| TRACE LOG| Display Initialised |

| TRACE LOG| Display Stream on Passed |

| TRACE LOG| Capture Stream on Passed |

| TRACE LOG| Capturing and displaying now |

| TRACE LOG| Display Stream off Passed |

| TRACE LOG| Capture Stream off Passed |

|TEST RESULT|PASS| CaptureTests

|TEST END| CaptureTests

|TEST RESULT|PASS| DisplayTests

4.2.5 Using Script for V4L2 Capture

To use V4L2 capture application by running the scri pt:

1. See the respective Linux PSP Release User Guides and flash the EVM.

2. In Power switch off mode, connect the TV to the DUT using any one of the interfaces (For e.g. S-Video in case of OMAP35x).

3. Connect a DVD Player to the capture interface on the DUT.

4. Open HyperTerminal/Teraterm (Output/Input console). Set the required settings for HyperTerminal/TeraTerm (see s ection A.1). Switch on the power for EVM to boot.

5. See the Linux PSP Release User Guides for enabli ng capture driver, compiling and running Linux Kernel.

6. Environment variables needs to be updated as spe cified in Linux PSP Release User Guides. Press CTRL+C to stop booting immediately after bootup prints starts. Use the com mand printenv to see the environment variables and update them, if necessary. Then boot up the kernel.

7. With the Linux command prompt, we are now ready to run the capture test.

8. In the console, run the V4L2 capture script. The re are scripts present under scripts directory of the V4l2 capture test suite top level directory. There is a script for each platfor m. For eg to run the V4L2 capture tests for OMAP35x platform, run the sc ript as below-./omap35x_v4l2_capture_sample_usage_script.sh and press Enter .

Using the Test Suite

4-9

V4L2 Capture Script Details

The omap35x_v4l2_capture_sample_usage_script.sh will perform the following operations on the target:

1. Demonstrates how to display help

2. Demonstrates how to display version

3. Captures and displays with default options (NTSC standard, COMPOSITE capture interface)

4. Demonstrates how to set no. of buffers and no. o f frames for capturing.

5. Demonstrates how to run stability tests

6. Demonstrates how to set capture standard

7. Demonstrates how to run stress tests

8. Demonstrates how to set capture device and pixel format

9. Demonstrates how to run a capture and write test s

4.3 Fbdev display

This section provides the steps to execute the FBDE V display tests using the scripts or command line utility.

4.3.1 Test Setup

PC

DUT Serial

Linux PC (NFS Root) Ethernet

TV

LCD

Video Cable

Using the Test Suite

4-10

Figure 4-3 FBDEV Test Setup

4.3.2 Test Environment

� DUT (Device Under Test), serial console

� TV to display the output

4.3.3 Using the FBDEV Display Application

The FBDEV display application can be run either thr ough the command line or by running the script.

4.3.4 Using the Command line for FBDEV Display

For this, refer the README provided in the FBDEV Di splay test suite. The sample logs for the same are provided below.

Go to bin directory of the FBDEV Display test suite and run the executables as shown in different cases below:

Case 1- Execution of test without providing any com mand line options(Runs with default values).

(Here xxxxxx could be dm646x, omap35x or omap35x_GI T) [root@OMAP3EVM testcode]# ./xxxxx_fbdev_display_tests

| TRACE LOG| The Test is going to start with follow ing values |

| TRACE LOG| The device node | /dev/fb0

| TRACE LOG| The height of the image | 480

| TRACE LOG| The width of the image | 640

| TRACE LOG| The name of the interface is| LCD

|TEST START| DisplayTests

| TRACE LOG| FBDEV /dev/fb0 device opened

| TRACE LOG| FBIOGET_FSCREENINFO Ioctl Passed

| TRACE LOG| FBIOGET_VSCREENINFO Ioctl Passed

| TRACE LOG| FBIOPUT_VSCREENINFO Ioctl passed

| TRACE LOG| FBIOGET_FSCREENINFO Ioctl Passed

| TRACE LOG| FBDEV buffers mapped to user space

| TRACE LOG| Displaying Buffers

| TRACE LOG| Buffers unmapped

Using the Test Suite

4-11

| TRACE LOG| FBDEV /dev/fb0 device closed

|TEST RESULT|PASS| DisplayTests

|TEST END| DisplayTests

Case 2 - Execution of test with some command line o ptions passed(overrides the default values)

(Here xxxxxx could be dm646x, omap35x or omap35x_GI T)

[root@OMAP3EVM testcode]# ./xxxxx_fbdev_display_tests -n /dev/fb0 -w 720 -h 480 -s ntsc_m -i SVIDEO -d TV

| TRACE LOG| The Test is going to start with follow ing values |

| TRACE LOG| The device node | /dev/fb0

| TRACE LOG| The height of the image | 480

| TRACE LOG| The width of the image | 720

| TRACE LOG| The name of the interface is| SVIDEO

|TEST START| DisplayTests

| TRACE LOG| FBDEV /dev/fb0 device opened

| TRACE LOG| FBIOGET_FSCREENINFO Ioctl Passed

| TRACE LOG| FBIOGET_VSCREENINFO Ioctl Passed

| TRACE LOG| FBIOPUT_VSCREENINFO Ioctl passed

| TRACE LOG| FBIOGET_FSCREENINFO Ioctl Passed

| TRACE LOG| FBDEV buffers mapped to user space

| TRACE LOG| Displaying Buffers

| TRACE LOG| Buffers unmapped

| TRACE LOG| FBDEV /dev/fb0 device closed

|TEST RESULT|PASS| DisplayTests

|TEST END| DisplayTests

4.3.5 Using Script for FBDEV Display

To use FBDEV display application by running the scr ipt:

1. See to respective Linux PSP Release User Guides and flash the EVM.

2. In Power switch off mode, connect the TV to the DUT using any one of the interfaces (For e.g. S-Video in case of OMAP35x).

Using the Test Suite

4-12

3. Open HyperTerminal/Teraterm (Output/Input console). Set the required settings for HyperTerminal/TeraTerm (see s ection A.1). Switch on the power for EVM to boot.

4. See the Linux PSP Release User Guides for enabli ng display driver, compiling and running Linux Kernel.

5. Environment variables needs to be updated as spe cified in Linux PSP Release User Guides. Press CTRL+C to stop booting immediately after bootup prints starts. Use the com mand printenv to see the environment variables and update them, if necessary. Then boot up the kernel.

6. With the Linux command prompt, we are now ready to run the display test.

7. In the console, run the FBDEV display script. Th ere are scripts present under scripts directory of the FBDEV displa y test suite top level directory. There is a script for each platfor m. For e.g. to run the FBDEV display tests for OMAP35x platform, run t he script as below. /omap35x_sample_usage_scriptand press Enter .

FBDEV Display Script Details

The omap35x_sample_usage_script.sh will perform the following operations on the target:

1. Displays a scrolling color bars pattern using /d ev/fb0 on the LCD for 500 frames by enqueing 2 buffers for the OMAP35 x PSP releases.

2. Displays a scrolling color bars pattern using /d ev/fb0 on the LCD for 1000 frames by enqueing 1 buffers for the OMAP3 5x PSP GIT releases.

3. Demonstrates display of color bars at different width and height.

4. Demonstrates how to run stability tests.

5. Demonstrates how to run API tests.

6. Demonstrates how to display on TV.

7. Demonstrates how to display on LCD.

8. Demonstrates how to display with different image formats supported.

Using the Test Suite

4-13

4.4 Resizer

This section provides the steps to execute the Resi zer tests using the scripts or command line utility.

4.4.1 Test Setup

Figure 4-4 Resizer Test Setup

4.4.2 Test Environment

� DUT (Device Under Test), serial console

4.4.3 Using the Resizer Application

The Resizer application can be run either through t he command line or by running the script.

4.4.4 Using the Command line for Resizer

For this, refer the README provided in the Resizer test suite. The sample logs for the same are provided below.

Go to bin directory of the Resizer test suite and r un the executables as shown in different cases below:

Note: The input file in.yuv is available in the bin directory.

PC

DUT Serial

Linux PC (NFS Root) Ethernet

Using the Test Suite

4-14

Case 1- Execution of test without providing any com mand line options(Runs with default values).

(Here xxxxxx could be DM644x, OMAP35x or OMAP35x_GI T)

[root@OMAP3EVM prachi]# ./xxxxxxx_resizer_tests

| TRACE LOG| The Test is going to start with follow ing values |

| TRACE LOG| The device node | /dev/omap-resizer

| TRACE LOG| The input file | in.yuv

| TRACE LOG| The input file width | 640

| TRACE LOG| The input file height | 480

| TRACE LOG| The output file | out.yuv

| TRACE LOG| The output file width | 320

| TRACE LOG| The output file height | 240

|TEST START| ResizerTests

| TRACE LOG| Files opened successfully |

| TRACE LOG| Resizer device opened successfully |

| TRACE LOG| Resizer parameters set successfully |

| TRACE LOG| Read cycle expand register set success fully |

| TRACE LOG| Buffers requested successfully |

| TRACE LOG| Buffers QUERY'ed and mmaped successful ly |

| TRACE LOG| Input file copied to input buffer succ essfully |

| TRACE LOG| Buffers queued successfully |

| TRACE LOG| Resized image successfully |

|TEST RESULT|PASS| ResizerTests

|TEST END| ResizerTests

Case 2 - Execution of test with some command line o ptions passed(overrides the default values)

(Here xxxxxx could be DM644x, OMAP35x or OMAP35x_GI T)

[root@OMAP3EVM prachi]# ./xxxxxxx_resizer_tests -d /dev/omap-resizer -o OUTPUT.yuv -W 1200 -H 600

| TRACE LOG| The Test is going to start with follow ing values |

| TRACE LOG| The device node | /dev/omap-resizer

Using the Test Suite

4-15

| TRACE LOG| The input file | in.yuv

| TRACE LOG| The input file width | 640

| TRACE LOG| The input file height | 480

| TRACE LOG| The output file | OUTPUT.yuv

| TRACE LOG| The output file width | 1200

| TRACE LOG| The output file height | 600

|TEST START| ResizerTests

| TRACE LOG| Files opened successfully |

| TRACE LOG| Resizer device opened successfully |

| TRACE LOG| Resizer parameters set successfully |

| TRACE LOG| Read cycle expand register set success fully |

| TRACE LOG| Buffers requested successfully |

| TRACE LOG| Buffers QUERY'ed and mmaped successful ly |

| TRACE LOG| Input file copied to input buffer succ essfully |

| TRACE LOG| Buffers queued successfully |

| TRACE LOG| Resized image successfully |

|TEST RESULT|PASS| ResizerTests

|TEST END| ResizerTests

4.4.5 Using Script for Resizer

To use Resizer application by running the script:

1. See to respective Linux PSP Release User Guides and flash the EVM.

2. Open HyperTerminal/Teraterm (Output/Input console). Set the required settings for HyperTerminal/TeraTerm (see s ection A.1). Switch on the power for EVM to boot.

3. See the Linux PSP Release User Guides for enabli ng resizer driver, compiling and running Linux Kernel.

4. Environment variables needs to be updated as spe cified in Linux PSP Release User Guides. Press CTRL+C to stop booting immediately after bootup prints starts. Use the com mand printenv to see the environment variables and update them, if necessary. Then boot up the kernel.

5. With the Linux command prompt, we are now ready to run the resizer test.

Using the Test Suite

4-16

6. In the console, run the resizer script. There ar e scripts present under scripts directory of the resizer test suite t op level directory. There is a script for each platform. For e.g. to ru n the Resizer tests for OMAP35x platform, run the script as below. /OMAP35x_resizer_sample_usage_script and press Enter .

Resizer Script Details

The OMAP35x_resizer-sample_usage_script.sh will perform the following operations on the target:

1. Displays help for the test suite

2. Displays the version of the test suite

3. Runs a resize of image in.yuv of size 640X480 to out.yuv of size 320x240

4. Runs a resize test to resize in.yuv to out.yuv w ith size 1280x720

5. Runs a resize test to downscale in.yuv to size 1 60x120 with outputfile name as OUTPUT.yuv

4.5 PWM

This section provides the steps to execute the PWM tests using the scripts or command line utility.

4.5.1 Test Setup

Figure 4-5 PWM Test Setup

PC

DUT

Serial

Linux PC (NFS Root) Ethernet

CRO

Using the Test Suite

4-17

4.5.2 Test Environment

� DUT (Device Under Test), serial console, CRO(for s eeing waveform-optional)

4.5.3 Using the PWM Application

The PWM application can be run either through the c ommand line or by running the script. The application has a delay for 10 seconds for user to see waveform on CRO if required.

4.5.4 Using the Command line for PWM

For this, refer the README provided in the PWM test suite. The sample logs for the same are provided below.

Go to bin directory of the PWM test suite and run t he executables as shown in different cases below: Case 1- Execution of test without providing any co mmand line options(Runs with default values). (Here xxxxxx could be DM644x, DM646x or DM355)

# ./DM644x_pwm_tests

| TRACE LOG| The Test is going to start with fol lowing values |

| TRACE LOG| The device node | /dev/davinci_pwm0

| TRACE LOG| The mode is | 1

| TRACE LOG| The period is | 100 msec

| TRACE LOG| The duration is | 50 msec

| TEST START| PWMTests

| TRACE LOG| PWM device instance 0 opened |

| TRACE LOG| Set mode Ioctl Passed |

| TRACE LOG| Set Period Ioctl Passed |

| TRACE LOG| Set Duration Ioctl Passed |

| TRACE LOG| Start Ioctl Passed |

| TRACE LOG| Stop Ioctl Passed |

| TRACE LOG| PWM device instance 0 closed sucess fully |

| TRACE LOG| PWM Test complete |

| TEST RESULT|PASS| PWMTests

| TEST END| PWMTests

Using the Test Suite

4-18

Case 2 - Execution of test with some command line o ptions passed(overrides the default values)

(Here xxxxxx could be DM644x, DM646x or DM355)

# ./DM644x_pwm_tests -d /dev/davinci_pwm1 -m 0 -I 200 -i 100 -r 2 -s 1 -p 1

| TRACE LOG| The Test is going to start with follow ing values |

| TRACE LOG| The device node | /dev/davinci_pwm1

| TRACE LOG| The mode is | 0

| TRACE LOG| The period is | 200

| TRACE LOG| The duration is | 100

|TEST START| PWMTests

| TRACE LOG| PWM device instance 1 opened |

| TRACE LOG| Set mode Ioctl Passed |

| TRACE LOG| Set Period Ioctl Passed |

| TRACE LOG| Set Duration Ioctl Passed |

| TRACE LOG| Start Ioctl Passed |

| TRACE LOG| Stop Ioctl Passed |

| TRACE LOG| PWM device instance 1 closed sucessful ly |

| TRACE LOG| PWM Test complete |

|TEST RESULT|PASS| PWMTests

|TEST END| PWMTests

4.5.5 Using Script for PWM

To use PWM application by running the script:

1. See to respective Linux PSP Release User Guides and flash the EVM.

2. Open HyperTerminal/Teraterm (Output/Input console). Set the required settings for HyperTerminal/TeraTerm (see s ection A.1). Switch on the power for EVM to boot.

3. See the Linux PSP Release User Guides for enabli ng PWM driver, compiling and running Linux Kernel.

4. Environment variables needs to be updated as spe cified in Linux PSP Release User Guides. Press CTRL+C to stop booting immediately after bootup prints starts. Use the com mand printenv to see the environment variables and update them, if necessary. Then boot up the kernel.

Using the Test Suite

4-19

5. With the Linux command prompt, we are now ready to run the PWM test.

6. In the console, run the PWM script. There are sc ripts present under scripts directory of the PWM test suite top l evel directory. There is a script for each platform. For e.g. to ru n the Resizer tests for DM646x platform, run the script as below. /DM646x_sample_usage_script and press Enter .

PWM Script Details

The DM646x_sample_usage_script.sh will perform the following operations on the target:

1. Displays help for the test suite

2. Displays the version of the test suite

3. Runs default test (without any command line opti ons) with period as 100 msec and pulse width duration as 50 msec.

4. Runs test on different PWM instance with differe nt period(200 msec) and duration(100 msec).

5. Runs api and stability tests.

A-1

Appendix A

General Setup Details

This appendix provides Output/Input console setting details.

A.1 HyperTerminal/TeraTerm Settings

Table A-1. HyperTerminal/TeraTerm Settings

Serial Port Go to setup > Serial Port and select the following:

◊ Port: COM1

◊ Baud rate: 115200

◊ Data: 8 bit

◊ Parity: none

◊ Stop: 1 bit

◊ Flow Control: none

General Go to setup > General and select the following:

◊ Default port: COM1

◊ Language: English

B-1

Appendix B

Adding New Test Case

This appendix provides details on how a test case c an be added to the test bench..

B.1 Adding a new test module to the LFTB package

The test bench is designed to be extensible in term s of test methodologies. Create a new directory for the module. The module s hould have sub directories – src, bin, and scripts. Create these s ub directories.

The explanation of each is provided below-

• The Makefile is available at the top level in the test suite package. Add the toolchain, kernel include directory informa tion in the Makefile, according to the requirements.

• src is the directory containing source files. Crea te sub directories- interface, parser and testcases under it.

• The interface directory contains common and the pl atform specific directories. There will be an interface file for ea ch platform. Add your interface files here. The common directory has the common functions which are being used across platforms.

• The parser directory contains the parser file. Thi s will have core logic to parse all the command line options. Add yo ur parser file here.

• The testcases directory has all the test case file s. Add test case files here.

• The bin directory contains executable for all plat forms.

• There is a README available in the top level direc tory of each test suite. This explains the procedure to build and run .

• The scripts contain the scripts for all platforms in their respective directories. They show how the test suite executabl e can be used for carrying out various types of tests. Add your s cripts here.

Using the Test Suite

B-2

Figure B-2. Functional Test Bench Directory structure

B.2 Adding a new test case to an existing test suit e

To add a new test case -

1. Add the test case file under test cases director y.

2. Update the parser file to call the test case fil e function. If a command line option needs to be added for the same, implement it in the parser file.

3. Edit the Makefile in case a new file is added in the testcases directory and compile the test suite.

4. Write the script to execute the tests.