diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | testsuite/buildok/scsi.stp | 17 |
2 files changed, 21 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2006-07-19 David Smith <dsmith@redhat.com> + + * testsuite/buildok/scsi.stp: Only run the scsi test if the scsi + kernel subsystem is running. + 2006-07-17 David Smith <dsmith@redhat.com> * stapfuncs.5.in: Removed retval function description, since it diff --git a/testsuite/buildok/scsi.stp b/testsuite/buildok/scsi.stp index 82eee0a5..e058327f 100755 --- a/testsuite/buildok/scsi.stp +++ b/testsuite/buildok/scsi.stp @@ -1,4 +1,18 @@ -#! stap -p4 +#! /bin/sh + +# This test should only be run when the scsi module is loaded (or scsi +# functionality is built into the kernel). + +# We test for scsi functionality by grepping in /proc/kallsyms for +# 'scsi_dispatch_cmd', which is what 'scsi.iodispatching' maps to. +# If that mapping changes this grep command will also need changing. +if ! grep scsi_dispatch_cmd /proc/kallsyms >/dev/null 2>&1 ; then + echo "scsi funtionality not present - not running test"; + exit 0; +fi + + +./stap -p4 - << EOF probe scsi.ioentry { printf("ppname: %s, %d, %d, %d\n", probefunc(), @@ -26,3 +40,4 @@ probe scsi.iocompleted host_no, channel, lun, dev_id, device_state, data_direction, goodbytes) } +EOF |