Snowball Test Cases

Setup Instructions

  1. download image and the Snowball hardware pack from http://snapshots.linaro.org for the image you are trying to test, and write to SD card using instructions at: Releases/DailyBuilds. When writing the image to the SD card, make sure to use the appropriate --dev option for Snowball, use --dev ux500.

  2. Connect to the Snowball board using a serial console with USB cable plugged. The recommended method for invoking a serial console from your machine to the development board, is to use minicom. For example, if your baudrate is 115200 and your serial port is attached via ttyUSB0 to your system:

    minicom -D /dev/ttyUSB0 -b 115200
  3. Connect a monitor and keyboard to the Snowball board, You need a powered USB hub and video HDMI to DVI adapter cable,

see http://www.igloocommunity.org/support/Setting_up_the_hardware for more information.

Test Cases


Accelerometer (LSM303DLH) test

Steps

  1. Activate the accelerometer with echo 1 > /sys/class/i2c-dev/i2c-2/device/2-0019/mode

  2. Move the Snowball board and notice the value changes with:

    while :; do cat /sys/class/i2c-dev/i2c-2/device/2-0019/data ; done

Validation

  • Check with 'dmesg' to see if there is an I2C error on @0018 device.


Magnetometer (LSM303DLH) test

Steps

  1. Activate the magnetometer with echo 0 > /sys/class/i2c-dev/i2c-2/device/2-001e/mode

  2. Move the Snowball board and notice the value changes with

    while :; do cat /sys/class/i2c-dev/i2c-2/device/2-001e/data ; done

Validation

  • Check with 'dmesg' to see if there is an I2C error on @001e device.


Barometer (LPS001WP) test

Steps

  1. Enable Barometer with echo 1 > /sys/class/i2c-dev/i2c-2/device/2-005c/enable

  2. Put your finger on the chip that has a hole on it and notice the pressure value changes with

    while :; do cat /sys/class/i2c-dev/i2c-2/device/2-005c/press_data ; echo ; done

Validation

  • Check with 'dmesg' to see if there is an I2C error on @005c device.


Gyroscope (L3G4200D) test

Steps

  1. Activate the Gyroscope with echo 1 > /sys/class/i2c-dev/i2c-2/device/2-0068/powermode

  2. Move the Snowball board and notice the value changes with

    while :; do cat /sys/class/i2c-dev/i2c-2/device/2-0068/gyrodata ; done

Validation

  • Check with 'dmesg' to see if there is an I2C error on @0068 device.


Audio Capture and Playback test

Steps

  1. Install alsa-utils, if missing:

sudo apt-get install alsa-utils
  1. Record your own speech to a local file by using the microphone on the board:

gst-launch-0.10 alsasrc ! audioconvert ! wavenc ! filesink location=capture.wav
  1. Play the recorded speech:

gst-launch-0.10 filesrc location=capture.wav ! wavparse ! audioresample ! "audio/x-raw-int,rate=48000" ! alsasink

Or try:

  1. Record the WAV streams and play it.

arecord -c 2 -f S16_LE -d 10 -r 44100 samples44k16S.wav && aplay samples44k16S.wav

Validation

  • WAV file can be captured and playback successfully
  • No error when recording and playing, check 'dmesg' to see if there is an error or I2C error.


Real Time Clock (RTC) Time Set Test

Steps

  1. Set the system time. such as:

    date -u 081023592011

  2. Transfer the system time to the RTC and read back

    hwclock -w

  3. RTC reads it back

    hwclock

Validation

  • Verify that hwclock executes without error
  • RTC reads back the correct time


RTC-Board Reset Test

Steps

  1. Reboot the board after RTC time set test

     reboot 

  2. Login as root and read RTC back

     hwclock 

Validation

  • RTC reads back the correct time in RTC time set test


RTC-Board Poweroff Test

Steps

  1. Power off the board after RTC time set test

     halt 

  2. Unplug the power line for 2 minutes
  3. Plug in the power line and boot up the board
  4. Login as root and read date and RTC back
    date 
    hwclock 

Validation

  • RTC reads back the correct time in RTC time set test


HDMI Framebuffer Display output Test

Steps

  1. Enable CONFIG_HDMI_FB8AUTO_CREATE to have a /dev/fb0 device
  2. Get fbdemo test application and launch it fbdemo and see the on screen animation,

if you have a DVI screen do echo 2 > /sys/devices/av8100_hdmi.3/hdmisdtvswitch before

  1. After you able to write random data to the display (default it is HDMI):

    dd if=/dev/urandom of=/dev/fb0

Validation

  • The 'dd' application complains there is no space left on /dev/fb0
  • Random pixel data appears on the display


SD/MMC-Inserting and ejecting MMC/SD cards on MMC1 slot

Steps

  1. Insert MMC/SD card in SD/MMC slot
  2. Check the device is found
    ls /sys/block/mmcblk1
    cat /proc/partitions | grep mmcblk1
  3. Read MMC/SD card information
    cat /sys/block/mmcblk1/device/name
    cat /sys/block/mmcblk1/device/date
  4. Eject MMC/SD card and verify
     ls /sys/block

Validation

  • MMC/SD card is found after inserting, and card information is correct.
  • No 'mmcblk1' entry is present in /sys/block after ejecting.


USB Host Test

Steps

  1. Insert USB disk to one USB Host port
  2. Use 'dmesg|tail' to determine the USB disk device node, like /dev/sda
  3. Mount USB disk:

    mkdir -p /mnt/msc && mount -t vfat /dev/<udisk dev node>1 /mnt/msc

  4. Write something to USB disk:

    dd if=/dev/urandom of=/mnt/msc/10M bs=1M count=10

  5. Umount USB disk:

    cd && umount /mnt/msc

Validation

  • USB disk can be recognized, partition can be mounted, dd operation succeed
  • Umount successfully.


USB OTG Port Host Function Test

Steps

  1. Insert USB disk to USB OTG port
  2. Use 'dmesg|tail' to determine the USB disk device node, like /dev/sda
  3. Mount USB disk:

    mkdir -p /mnt/msc && mount -t vfat /dev/<udisk dev node>1 /mnt/msc

  4. Write something to USB disk:

    dd if=/dev/urandom of=/mnt/msc/10M bs=1M count=10

  5. Umount USB disk:

    cd && umount /mnt/msc

Validation

  • By connecting USB disk to USB OTG port, USB disk can be recognized, partition can be mounted, dd operation succeed
  • Umount successfully.


USB device g_file_storage test

Steps

  1. Insert module to enable g_file_storage mode

     modprobe g_file_storage file=/dev/mmcblk0p2 removable=1 

  2. Connect USB OTG port with host machine
  3. Copy some files from/to the mounted partition
    cp /media/boot/uImage ~ 
    echo "abcdqwer" > /media/boot/tmp.txt
  4. Remove module

     modprobe -r g_file_storage 

Validation

  • USB device can be recognized by host machine, by 'dmesg' on host, there are messages like:
    [  155.057164] Initializing USB Mass Storage driver...
    [  155.057400] scsi6 : SCSI emulation for USB Mass Storage devices
    [  155.057568] usbcore: registered new interface driver usb-storage
    [  155.057574] USB Mass Storage support registered.
    [  155.057974] usb-storage: device found at 5
    [  155.057979] usb-storage: waiting for device to settle before scanning
  • No error when copy and remove module operation.


USB Ethernet gadget test

Steps

  1. Check if USB Ethernet Gadget (CONFIG_USB_ETH) is activated in your kernel configuration
  2. Insert module to enable USB Ethernet

     modprobe g_ether 

  3. Connect USB OTG port with host machine
  4. Configure USB ethernet IP on target board

     ifconfig usb0 up 192.168.2.1 

  5. Configure USB ethernet IP on host
    ifconfig usb0 192.168.2.2
  6. Ping each other, from Snowball:

     ping 192.168.2.2 

  7. Remove module
    ifconfig usb0 down
    modprobe g_ether -r

Validation

  • USB Ethernet can be recognized by host machine, by 'dmesg' on host, there are messages like:
    [152211.421401] cdc_ether 1-3:1.0: usb0: register 'cdc_ether' at usb-0000:00:1d.7-3, CDC Ethernet Device, ba:4b:ee:d0:78:34
    [152211.421647] usbcore: registered new interface driver cdc_ether
  • Ping is ok.


USB serial gadget test

Steps

  1. Check if USB Serial Gadget (CONFIG_USB_G_SERIAL) is activated in your kernel configuration
  2. Insert module to enable USB serial

     modprobe g_serial 

  3. Connect USB OTG port with host machine
  4. Open ttyACM0 on host machine

     minicom -D /dev/ttyACM0 -b 115200 

  5. Transmit data to the host machine, on target board:

     echo "hi" > /dev/ttyGS0 

  6. Open serial port on the target board (redirected into console output)

     cat /dev/ttyGS0 >& 1 

  7. Transmit data to the target board:

     echo "hi Snowball" > /dev/ttyACM0 

  8. Remove module

     modprobe g_serial -r 

Validation

  • USB Ethernet can be recognized by host machine, by 'dmesg' on host, there are messages like:
    [153122.424281] cdc_acm 1-3:2.0: This device cannot do calls on its own. It is not a modem.
    [153122.424439] cdc_acm 1-3:2.0: ttyACM0: USB ACM device
    [153122.425287] usbcore: registered new interface driver cdc_acm
    [153122.425291] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
  • See strings on the host machine serial port.
  • Check console message on the target board.


Storage-iozone test

Steps

  1. Use already mounted SD card rootfs partition (ext3) if you boot on SD

    else mount a vfat partition > 1GB with for example mount /dev/mmcblk1p2 /mnt/mmcblk1p2

  2. iozone test on SD card

    iozone -a -i 1 -i 0 -s 900m -f /iozone.test {or -f /mnt/mmcblk1p2/iozone.test} -b /mnt/iozone_sd_result.xls -R

  3. Mount USB disk

    mount -t vfat /dev/sda1 /mnt/msc

  4. iozone test on USB disk

    iozone -a -i 1 -i 0 -s 900m -f /mnt/msc/iozone.test -b /mnt/iozone_usb_result.xls -R

  5. Open the xls file in /mnt to calculate the average reader and writer data of SD and USB.

Validation

  • iozone test can pass in one or two hours.
  • Performance is not much worse.


Power-CPU Frequency Scaling test

Steps

  1. When DVFS is off, set CPU frequency to 800MHz.

    echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

  2. See if the CPU frequency adjusted to 800MHz,

    cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq

  3. Set CPU frequency back to 200MHz,

    echo 200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
    cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq

Validation

  • CPUFreq interface.
  • CPU frequency can adjust low to 200MHz and then to 1000MHz.


Power-Dynamic Frequency Voltage Scaling(DVFS) test

Steps

  1. Enable DVFS.

    echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

  2. Disable DVFS

    echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Validation

  • When there is low system loading, CPU frequency should be 200MHz, check by

    cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
    or 'cat /proc/cpuinfo'

  • Check the time running on different CPU frequency:

     cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state 


Power-Suspend and resume test

Steps

  1. Add 'no_console_suspend' in uboot bootargs environment.
  2. Repeat to set system standby mode for three times, press PWR button to resume it.

    i=0; while [ "$i" -lt 3 ]; do echo standby > /sys/power/state ; sleep 5; i=`expr $i + 1`; done

  3. Repeat to set system mem mode for three times, press PWR button to resume it.

    i=0; while [ "$i" -lt 3 ]; do echo mem > /sys/power/state ; sleep 5; i=`expr $i + 1`; done

  4. Validate the functions of every modules.(<can be expanded>)

Validation

  • System can suspend without error.
  • System can resume successfully, check 'dmesg' to see if there is an error.
  • Every modules work fine.


Video decode test

Steps

  1. Playback MPEG2, H.264 and others format stream by gstreamer or other tool(TBD)

Validation

  • VPU can decode MPEG2, DIVX, H.263, H.264, RV, MJPEG format stream.


Video encode test

Steps

  1. Encode MPEG2, H.264 and others format by gstreamer or other tool(TBD)

Validation

  • VPU can encode MPEG2, DIVX, H.263, H.264, RV, MJPEG format stream.


Ethernet Controller(LAN9221) performance test

Steps

  1. Connect the Snowball to your LAN

    Behind a DHCP server do  ifconfig eth0 up ; dhclient eth0  or static IP @  ifconfig eth0 192.168.99.14 netmask 255.255.255.0 up 

  2. On the host, ping the Snowball IP @

     ping -f -w 10 <SNOWBALL_IP> 

Validation

  • 0% packet loss in ping.


Camera-Preview test

Steps

  1. Insert an accessory card with an ov3640 camera on Snowball board
  2. Insert necessary v4l2 and camera modules

    <TBD>

  3. Run camera preview test

    <TBD>

Validation

  • Camera preview can display on the screen.


Camera-Capture test

Steps

  1. Insert an accessory card with an ov3640 camera on Snowball board
  2. Insert necessary camera modules

    <TBD>

  3. Run camera still image capture test

    <TBD>

  4. Run camera video capture test

    <TBD>

Validation

  • There is an image or video file generated.
  • Use some applications to view the captured files.


Video & Graphics tests

Steps

  1. Test MCDE, B2R2 functions like resize<to be expanded>

Validation

  • Verify the functions.


GPS tests

Steps

  1. <to be expanded>

Validation

  • Verify the functions.


Bluetooth tests

Steps

Steps

  1. If it's not installed, you need to install bluez:

sudo apt-get install bluez
  1. Start the driver:

hciattach -n -s 115200 /dev/ttyAMA0 any 115200 flow &
  1. Bring up hci0:

hciconfig hci0 up
  1. Display local Bluetooth devices:

hcitool dev
Devices:
        hci0    00:BE:AD:DE:80:00
  1. Give your device a name:

hciconfig -a hci0 name "u8500"
  1. Make the device visible:

hciconfig hci0 piscan

Validation

  • Use some other Bluetooth-enabled device (mobile phone, laptop, etc.) and scan for available devices. Verify that your device “u8500” is detected.


WLAN (CW1200) tests

Steps


WLAN test

Steps

  1. Check that cw1200 driver module is loaded (lsmod). If it is not, load it with this command:

modprobe cw1200_wlan
  1. Start WLAN:

ifconfig wlan0 up
  1. Check that WLAN is started:

ifconfig wlan0
  1. Run network scan:

iwlist wlan0 sc

Validation

  • Verify that the network scan returns available WLAN networks.


LandingTeams/ST-Ericsson/TestCases/Snowball (last modified 2012-02-22 12:57:02)