PREV UP next The Ftape Tools Manual - Installation


2.3: Testing the programs

There are some DejaGnu tests available for some programs. Some of them require a spare tape cartridge and a tape drive installed, all data on this cartridge will be lost! Those tests are disabled by default, you need to set a special configuration option to enable them. See Running tests after compilation of the programs.

All the tests can be executed by running make with the check target, i.e. by running

make check

from either the top level directory of the distribution or from one of its subdirectories.

If any one of the tests fails, then please first check whether your tape drive and the ftape driver is installed correctly. If this is the case, contact Claus-Justus Heine.

The easiest way to send me the test results is the following. Change to the directory of the program with the failing test cases. Then do a

make RUNTESTFLAGS="--mail heine@math1.rwth-aachen.de" check

which will email me a summary of the test run. Of course, for this to work you need an active Internet connection, or an otherwise properly configured email delivery system.

Currently, only three of the programs come with DejaGnu test-suites, and there is a tiny testsuite which checks for general ftape features respectively bugs.

swapout

Non-destructive tests, simply check whether the options parsing works. See Swapout.


vtblc

Destructive tests. Require a spare cartridge and an installed floppy tape drive. Checks have to be enabled using the --enable-tapetests option. See Running tests after compilation of the programs. See Vtblc.


ftmt

Destructive tests. Require a spare cartridge and an installed floppy tape drive. Checks have to be enabled using the --enable-tapetests option. See Running tests after compilation of the programs. See Ftmt.


signal handling

This is a non-destructive test, but nevertheless it has to be enabled using the --enable-tapetests option. See Running tests after compilation of the programs. The test-suite is located under `[/usr/src/ftape-tools-1.07/]testsuite/'. There was a bug report that sometimes the ftape-4.02 driver messes up the pending signals of a process.

The test requires to insert a tape cartridge into your tape drive, but it does nothing but to retension that cartridge.

In case the test fails, please first try to run the test program

[/usr/src/ftape-tools-1.07/]testsuite/ftsignal

manually. The -f TAPEDEV switch can be used to specify an alternate tape device, such as -f /dev/qft1 it this is required with your setup. A successful ftsignal run should terminate with messages (among others) like

PARENT: Successfully retensioned the tape cartridge
PARENT: expectedly got signal 10 while retensioning cartridge

End Of Data Handling

This is a non-destructive test, but nevertheless it has to be enabled using the --enable-tapetests option. See Running tests after compilation of the programs. Some versions of ftape reset the EOM counter when the device is closed.

The following example shows how the ftape driver should behave when trying to read past the area which contains already recorded data:

claus@anaximander > ftmt -f /dev/nqft0 eom
claus@anaximander > dd if=/dev/nqft0 bs=10k of=/dev/null count=1
0+0 records in
0+0 records out
claus@anaximander > dd if=/dev/nqft0 bs=10k of=/dev/null count=1
0+0 records in
0+0 records out
claus@anaximander > dd if=/dev/nqft0 bs=10k of=/dev/null count=1
dd: /dev/nqft0: I/O error
0+0 records in
0+0 records out
claus@anaximander > dd if=/dev/nqft0 bs=10k of=/dev/null count=1
dd: /dev/nqft0: I/O error
0+0 records in
0+0 records out

In other words, the expected behaviour is to return two times a zero byte count and -EIO afterwards.

Writing tests for the Tcl/Tk front-end ftape-tool would probably a little bit hard, testing the ftformat program would consume much time. Formatting an average Travan-3 cartridge takes about 8 hours.

A DejaGnu test for the listtape.pl program could easily be written, but this hasn't been done yet.


ftape logo Use these buttons to jump to the top menu

TOP (previous node) TOP (parent node) TOP (next node) TOP (this node)