(→Building packages) |
|||
| Line 35: | Line 35: | ||
The test device must include a watchdog device, and the driver for the watchdog device must be loaded. The test environment must have the following packages installed: | The test device must include a watchdog device, and the driver for the watchdog device must be loaded. The test environment must have the following packages installed: | ||
| - | * | + | ;*[[../BLTS Common Library | libbltscommon1]] |
=== Building packages === | === Building packages === | ||
| Line 41: | Line 41: | ||
The build environment must have the following packages installed: | The build environment must have the following packages installed: | ||
| - | * libbltscommon-devel | + | ;*[[../BLTS Common Library | libbltscommon-devel]] |
{{:Quality/TestSuite/Building_BLTS_Packages}} | {{:Quality/TestSuite/Building_BLTS_Packages}} | ||
Contents |
A Watchdog Timer (WDT) is a hardware circuit that can reset the computer system in case of a software fault. The blts-watchdog test module includes tests for watchdog devices via kernel's watchdog driver. Basically the watchdog timer is 'pinged' by an application (usually by a user space watchdog daemon), and if a 'ping' is not received within certain time, the watchdog device resets the device.
The test driver module accesses watchdog driver via /dev/watchdog device. The watchdog is controlled with ioctls;
* WDIOC_GETTIMEOUT: Get current watchdog timeout * WDIOC_SETTIMEOUT: Set current watchdog timeout * WDIOC_GETSUPPORT: Get information about the watchdog device * WDIOC_KEEPALIVE: Keep alive ping
Hardware watchdog timers.
Only one process can use the watchdog timer at a time, so the test module cannot access the watchdog device if there is some watchdog daemon, or some other process using the watchdog running.
TBD
The test device must include a watchdog device, and the driver for the watchdog device must be loaded. The test environment must have the following packages installed:
The build environment must have the following packages installed:
The source package includes the pack.sh script, which is used for building RPM and Debian packages and source tar packages. To build an RPM package with the script, execute this command in the top level source directory of asset:
./pack.sh -r
To get help about the packaging script, execute
./pack.sh -h
The asset can also be built manually by executing:
./autogen.sh ./configure make
The watchdog test package does not require any separate configuration package.
The test package can be installed in the device with a command:
rpm -ivh blts-watchdog-tests_{version}.rpm
Arguments:
| General Switch | Function |
|---|---|
| -l | Used log file |
| -e | Execute single or multiple selected tests, for example -e 1,4,5. |
| -en | Execute test by name, for example -en "My test X" |
| -s | Show list of all tests |
| -C | Used configuration file |
| -? | Help message |
| -xml, -axml | Create result XML. -axml appends results to an existing XML file. |
| -auto | Silent logging for test automation. Only the results are printed to stdout. |
| -v | Verbose logging (default) |
| -vv | Even more verbose logging |
Test cases must be executed with root privileges.
Test case descriptions and execution instructions:
blts-watchdog-tests -en "Core-Watchdog presence check"
blts-watchdog-tests -en "Core-Open and close watchdog"
blts-watchdog-tests -en "Core-Send keepalive messages"
The test module can be compiled to a self-sufficient command line program. Debian and RPM packaging is provided.
| Watchdog API | Watchdog Driver api |
| blts-watchdog | blts-watchdog sources |
| Version | Date | Handled By | Status | Comments |
|---|---|---|---|---|
| 0.1 | 10-Dec-2010 | Pasi Matilainen | Draft | Page created |