test/llvm_nvme_fuzz: add CREATE I/O COMPLETION QUEUE command test case
Change-Id: Id5c6e81c2691942380450f2ebabdf818494f76a2 Signed-off-by: Yifan Bian <yifan.bian@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10953 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> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
This commit is contained in:
parent
2bd41c5187
commit
0ac16751a5
@ -145,11 +145,30 @@ fuzz_admin_abort_command(struct fuzz_command *cmd)
|
||||
g_data += 4;
|
||||
}
|
||||
|
||||
static void
|
||||
fuzz_admin_create_io_completion_queue_command(struct fuzz_command *cmd)
|
||||
{
|
||||
memset(&cmd->cmd, 0, sizeof(cmd->cmd));
|
||||
cmd->cmd.opc = SPDK_NVME_OPC_CREATE_IO_CQ;
|
||||
|
||||
cmd->cmd.cdw10_bits.raw = 0;
|
||||
cmd->cmd.cdw10_bits.create_io_q.qid = (g_data[0] << 8) + g_data[1];
|
||||
cmd->cmd.cdw10_bits.create_io_q.qsize = (g_data[2] << 8) + g_data[3];
|
||||
|
||||
cmd->cmd.cdw11_bits.raw = 0;
|
||||
cmd->cmd.cdw11_bits.create_io_cq.iv = (g_data[4] << 8) + g_data[5];
|
||||
cmd->cmd.cdw11_bits.create_io_cq.pc = (g_data[6] >> 7) & 0x01;
|
||||
cmd->cmd.cdw11_bits.create_io_cq.ien = (g_data[6] >> 6) & 0x01;
|
||||
|
||||
g_data += 7;
|
||||
}
|
||||
|
||||
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 },
|
||||
{ .fn = fuzz_admin_identify_command, .bytes_per_cmd = 7 },
|
||||
{ .fn = fuzz_admin_abort_command, .bytes_per_cmd = 4},
|
||||
{ .fn = fuzz_admin_create_io_completion_queue_command, .bytes_per_cmd = 7},
|
||||
{ .fn = NULL, .bytes_per_cmd = 0 }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user