Spdk/test/app/fuzz/iscsi_fuzz
paul luse 7fc8a7dd45 add Intel copyright notices (and/or SPDX lic) where missing
per Intel policy to include file commit date using git cmd
below.  The policy does not apply to non-Intel (C) notices.

git log --follow -C90% --format=%ad --date default <file> | tail -1

and then pull just the year from the result.

Intel copyrights were not added to files where Intel either had
no contribution ot the contribution lacked substance (ie license
header updates, formatting changes, etc)

Note that several files in this patch didn't end the license/(c)
block with a blank comment line so these were added as the vast
majority of files do have this last blank line.  Simply there for
consistency.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: If1bf46b4e1902585c318dc35b1673f980366076e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15199
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-11-10 08:28:53 +00:00
..
.gitignore test/iscsi: add application for target fuzz testing. 2020-03-13 08:53:46 +00:00
iscsi_fuzz.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
Makefile add Intel copyright notices (and/or SPDX lic) where missing 2022-11-10 08:28:53 +00:00
README.md spelling: test 2021-12-03 08:13:22 +00:00

Overview

This application is intended to fuzz test the iSCSI target by submitting randomized PDU commands through a simulated iSCSI initiator.

Input

  1. iSCSI initiator send a login request PDU to iSCSI Target. Once a session is connected,
  2. iSCSI initiator send huge amount and random PDUs continuously to iSCSI Target.
  3. iSCSI initiator send a logout request PDU to iSCSI Target in the end.

Especially, iSCSI initiator need to build different bhs according to different bhs opcode. Then iSCSI initiator will receive all kinds of response opcodes from iSCSI Target. The application will terminate when run time expires (see the -t flag).

Output

By default, the fuzzer will print commands that:

  1. Complete successfully back from the target, or
  2. Are outstanding at the time of a connection error occurs.

Commands are dumped as named objects in json format which can then be supplied back to the script for targeted debugging on a subsequent run.

At the end of each test run, a summary is printed in the following format:

device 0x11c3b90 stats: Sent 1543 valid opcode PDUs, 16215 invalid opcode PDUs.