test/llvm_nvme_fuzz: add DELETE I/O COMPLETION QUEUE and DELETE I/O SUBMISSION QUEUE command test cases
Change-Id: Idf20d03077ea24d347170ada955dda6d92efce49 Signed-off-by: Yifan Bian <yifan.bian@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10984 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
8e9bf1815d
commit
89f253dd20
@ -184,6 +184,30 @@ fuzz_admin_create_io_submission_queue_command(struct fuzz_command *cmd)
|
||||
g_data += 9;
|
||||
}
|
||||
|
||||
static void
|
||||
fuzz_admin_delete_io_completion_queue_command(struct fuzz_command *cmd)
|
||||
{
|
||||
memset(&cmd->cmd, 0, sizeof(cmd->cmd));
|
||||
cmd->cmd.opc = SPDK_NVME_OPC_DELETE_IO_CQ;
|
||||
|
||||
cmd->cmd.cdw10_bits.raw = 0;
|
||||
cmd->cmd.cdw10_bits.delete_io_q.qid = (g_data[0] << 8) + g_data[1];
|
||||
|
||||
g_data += 2;
|
||||
}
|
||||
|
||||
static void
|
||||
fuzz_admin_delete_io_submission_queue_command(struct fuzz_command *cmd)
|
||||
{
|
||||
memset(&cmd->cmd, 0, sizeof(cmd->cmd));
|
||||
cmd->cmd.opc = SPDK_NVME_OPC_DELETE_IO_SQ;
|
||||
|
||||
cmd->cmd.cdw10_bits.raw = 0;
|
||||
cmd->cmd.cdw10_bits.delete_io_q.qid = (g_data[0] << 8) + g_data[1];
|
||||
|
||||
g_data += 2;
|
||||
}
|
||||
|
||||
static struct fuzz_type g_fuzzers[] = {
|
||||
{ .fn = fuzz_admin_command, .bytes_per_cmd = sizeof(struct spdk_nvme_cmd) },
|
||||
{ .fn = fuzz_admin_get_log_page_command, .bytes_per_cmd = 6 },
|
||||
@ -191,6 +215,8 @@ static struct fuzz_type g_fuzzers[] = {
|
||||
{ .fn = fuzz_admin_abort_command, .bytes_per_cmd = 4},
|
||||
{ .fn = fuzz_admin_create_io_completion_queue_command, .bytes_per_cmd = 7},
|
||||
{ .fn = fuzz_admin_create_io_submission_queue_command, .bytes_per_cmd = 9},
|
||||
{ .fn = fuzz_admin_delete_io_completion_queue_command, .bytes_per_cmd = 2},
|
||||
{ .fn = fuzz_admin_delete_io_submission_queue_command, .bytes_per_cmd = 2},
|
||||
{ .fn = NULL, .bytes_per_cmd = 0 }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user