Don't require scsi_debug but check if TEST_DEV is a SCSI device and use it
instead.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
QUICK=1
requires() {
- _have_src_program sg/syzkaller1 && _have_scsi_debug
+ _have_src_program sg/syzkaller1
}
-test() {
+test_device() {
echo "Running ${TEST_NAME}"
- if ! _get_scsi_debug_dev; then
- return 1
- fi
-
SG_DEV="/dev/$(_get_sg_from_blockdev "$SCSI_DEBUG_NAME")"
cd "$TMPDIR" || return 1
timeout -s INT 10s "$SRCDIR/sg/syzkaller1" "$SG_DEV"
- _put_scsi_debug_dev
-
echo "Test complete"
}