Commit 5551ce9
scsi: scsi_debug: Add new error injection type: Abort Failed
Add error injection type 3 to make scsi_debug_abort() return FAILED. Fail
abort command format:
+--------+------+-------------------------------------------------------+
| Column | Type | Description |
+--------+------+-------------------------------------------------------+
| 1 | u8 | Error type, fixed to 0x3 |
+--------+------+-------------------------------------------------------+
| 2 | s32 | Error count |
| | | 0: this rule will be ignored |
| | | positive: the rule will always take effect |
| | | negative: the rule takes effect n times where -n is |
| | | the value given. Ignored after n times |
+--------+------+-------------------------------------------------------+
| 3 | x8 | SCSI command opcode, 0xff for all commands |
+--------+------+-------------------------------------------------------+
Examples:
error=/sys/kernel/debug/scsi_debug/0:0:0:1/error
echo "3 -10 0x12" > ${error}
will make the device return FAILED when aborting inquiry command 10 times.
Signed-off-by: Wenchao Hao <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Tested-by: Douglas Gilbert <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>1 parent 3359227 commit 5551ce9
1 file changed
+40
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| 296 | + | |
| 297 | + | |
296 | 298 | | |
297 | 299 | | |
298 | 300 | | |
| |||
970 | 972 | | |
971 | 973 | | |
972 | 974 | | |
| 975 | + | |
973 | 976 | | |
974 | 977 | | |
975 | 978 | | |
| |||
1031 | 1034 | | |
1032 | 1035 | | |
1033 | 1036 | | |
| 1037 | + | |
1034 | 1038 | | |
1035 | 1039 | | |
1036 | 1040 | | |
| |||
5512 | 5516 | | |
5513 | 5517 | | |
5514 | 5518 | | |
| 5519 | + | |
| 5520 | + | |
| 5521 | + | |
| 5522 | + | |
| 5523 | + | |
| 5524 | + | |
| 5525 | + | |
| 5526 | + | |
| 5527 | + | |
| 5528 | + | |
| 5529 | + | |
| 5530 | + | |
| 5531 | + | |
| 5532 | + | |
| 5533 | + | |
| 5534 | + | |
| 5535 | + | |
| 5536 | + | |
| 5537 | + | |
| 5538 | + | |
| 5539 | + | |
| 5540 | + | |
| 5541 | + | |
| 5542 | + | |
| 5543 | + | |
| 5544 | + | |
| 5545 | + | |
| 5546 | + | |
5515 | 5547 | | |
5516 | 5548 | | |
5517 | 5549 | | |
| 5550 | + | |
| 5551 | + | |
5518 | 5552 | | |
5519 | 5553 | | |
5520 | 5554 | | |
| |||
5523 | 5557 | | |
5524 | 5558 | | |
5525 | 5559 | | |
| 5560 | + | |
| 5561 | + | |
| 5562 | + | |
| 5563 | + | |
| 5564 | + | |
| 5565 | + | |
5526 | 5566 | | |
5527 | 5567 | | |
5528 | 5568 | | |
| |||
0 commit comments