diff options
author | fche <fche> | 2006-08-12 05:13:09 +0000 |
---|---|---|
committer | fche <fche> | 2006-08-12 05:13:09 +0000 |
commit | 814bc89d4635f101b2c0077598f31aad95ed15b7 (patch) | |
tree | 407a49dbaf446af4751f5068607a7fb8dad0611d /testsuite/systemtap.syscall/README | |
parent | 6b6d04673a1ef175821afc7d4fabdb496698e8e3 (diff) | |
download | systemtap-steved-814bc89d4635f101b2c0077598f31aad95ed15b7.tar.gz systemtap-steved-814bc89d4635f101b2c0077598f31aad95ed15b7.tar.xz systemtap-steved-814bc89d4635f101b2c0077598f31aad95ed15b7.zip |
2006-08-12 Frank Ch. Eigler <fche@elastic.org>
* configure.ac, Makefile.am: Descend into testsuite/
directory. Remove local test logic.
* configure, Makefile.in: Regenerated.
* runtest.sh: Not yet removed.
* HACKING: Update for new testsuite layout.
2006-08-12 Frank Ch. Eigler <fche@elastic.org>
* all: Reorganized old pass-1..4 tests one dejagnu bucket.
Moved over old pass-5 tests, except for disabled syscalls tests.
* Makefile (installcheck): New target for running pass-1..5
tests against installed systemtap.
Diffstat (limited to 'testsuite/systemtap.syscall/README')
-rw-r--r-- | testsuite/systemtap.syscall/README | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/testsuite/systemtap.syscall/README b/testsuite/systemtap.syscall/README new file mode 100644 index 00000000..41e6d895 --- /dev/null +++ b/testsuite/systemtap.syscall/README @@ -0,0 +1,52 @@ +How these tests work: + +Dejagnu finds all *.c files, compiles them and runs them in a temporary +directory while running the systemtap script sys.stp. To avoid +recompiling sys.stp over and over, the test.exp is smart enough to +compile sys.stp once and save the module. + + +You can run all the tests here with +> runtest test.exp + +You can run single tests with +> gcc -o testname testname.c +>./test.tcl testname + +OR, if you want to run multiple tests and don't want all the delays +with recompiling sys.stp each time, + +> stap -kp4 sys.stp +Keeping temporary directory "/tmp/stapPThTaQ" +> ./test.tcl testname /tmp/stapPThTaQ/*.ko +> ./test.tcl testname2 /tmp/stapPThTaQ/*.ko +... +> rm -rf /tmp/stapPThTaQ + +Finally, if you need to know why a test is failing, use +"test-debug.tcl" exactly as above. After running the test, it will open a +window with the results and expected results. + + + +HOW TO WRITE TESTS + +1. write a test case C file using some system calls. + +2. After each system call, put a comment on the next line starting with "//" +The comment should have the expected output. Where an arbitrary number +is expected, put "NNNN" (for decimal) or "XXXX" (for hex). Or you can +just write regular expressions. The "NNNN" and "XXXX" are just shorthand to +aid readability and are converted to regular expressions in test.tcl. + +3. Somewhere is your test program puts a comment line like this: +/* COVERAGE: syscall1 syscall2 ... */ +where you list the systemcalls that are tested. Then you can run +coverage.tcl and get a coverage report. + +You probably want to write your test case without the comments first. Make +sure it compiles and works as expected. Then try it with +"stap sys.stp -c ./testname" or test-debug.tcl to see the output. + +IMPORTANT: Note that the test scripts create a temporary directory for each +test program. Each program will run in an empty directory. |